I have set a redirect to the DashboardPage within the page:beforein
callback, for preventing the logged user to see the LandingPage. I do this by doing
if(user.logged){
this.$f7.views.main.router.navigate('/dashboard/', {reloadAll : true});
}
I use reloadAll
because I want to clean the DOM stack and the history. But when navigating back to the LandingPage, the beforein callback generates an exception
Uncaught TypeError: Cannot read property 'f7Page' of undefined
at Router.removePage (webpack:///./node_modules/framework7-vue/utils/components-router.js?:59)
at afterAnimation (webpack:///./node_modules/framework7/modules/router/navigate.js?:550)
at eval (webpack:///./node_modules/framework7/modules/router/navigate.js?:595)
at onDone (webpack:///./node_modules/framework7/modules/router/router-class.js?:314)
at HTMLDivElement.eval (webpack:///./node_modules/framework7/modules/router/router-class.js?:318)
at HTMLDivElement.fireCallBack (webpack:///./node_modules/dom7/dist/dom7.module.js?:609)
at HTMLDivElement.handleEvent (webpack:///./node_modules/dom7/dist/dom7.module.js?:407)
The div.view-main
element still has the router-transition-backward
and router-transition
classes so the entire view is white. What is my mistake?