Dose Framework7 Vue(0.9.2) - Routes Equivalent to Vue-Router lifecyfle hook?

use Framework7 Vue(0.9.2) + Framework7(1.6.4) in my project.I want to use lifecycle hook in routes just like Vue-Router.I’ve tried searching in the Framework7 Documentation(v1.x) but nothing seems to mention it.Dose F7-vue(0.9.2) - Routes has this lifecycle hook?

You can try to check preroute parameter

I tried using this function for loading ‘QianBao’ component.But throw this erro.Would you mind telling me how to deal whit this problem.Thanks a lot!

using v2 + vue instead of v1 , easily. i swear :blush:

1 Like

But I saw this in the Docs.It confuse me :dizzy_face:

Because you on v1 documentation, there is a f7-vue-v2 plugin

And i see you missed a / in the beginning of url, should be .loadPage('/QianBao')

But @edoofx is right, it worths migrating to v2

Thanks for bearing my poor English.
I just changeing the URL in my code,but it didn’t work.I find my code jumping between 49 line - 50line all the time when test my code.Do I writed anything wrong in my code? Thanks a lot:grinning:

check what is in preroute options, and just return true in case requested url is '/QianBao', not i guess you have infinite loop

I figured out why there was a infinite loop.Each time I load component,I will run the code which is in If I have infinit loop.For example,the user is not logged in but he want to load ‘Qianbao’ component.
The program will running if judgment.Now the program will load ‘Login’ component and it will run if judgment again.But the judgement condition is ‘true’ all the time,so it has infinite loop.:sweat_smile:
Thanks again for your patience :smiley: