As for Framework7 to catch the transition of the router?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
30 views
Hi! Does Framework7 in router analog router.beforeEach() ?
Need if the user has razlagalsa to redirectout it on the authorization form.
by | 30 views

2 Answers

0 like 0 dislike
by
0 like 0 dislike
In main.js
mounted () { this.$f7.view.main.router.on('pageBeforeIn', function () { if (userSignIn) { console.log('authorized'); } else { console.log('not authorized, redirected on the login page'); this.$f7.view.main.router.navigate('/login/',{reloadCurrent: true}); } }); }
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked May 2, 2019 by cimonlebedev
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
36,634 users