Hi!
I’m using cordova + f7. I want to disable previous pages after user login/registration.
I try this way:
beforeLeave: function (routeTo, routeFrom, resolve, reject) {
var index;
if (mainView.router.history.length > 1){
index = mainView.router.history.length - 2;
} else {
index = 0;
}
if ( routeTo.url != mainView.router.history[index] ) {
resolve();
} else {
reject();
}
}
It works fine when I click back button the first time. The page doesn’t change, but url changes to index.html. And I can see splash screen when I click back button second time.
How can I prevent app reloading?
Br,
Alex.