I would like to specify the route to be used on a swipeback. Or put another way, I would like to remove the page-previous class from one page, and add page-previous class to another.
I am trying:
$('.page-previous').removeClass('page-previous');
$('#home').addClass('page-previous');
but #home is not shown to be in the main view, so I’m assuming I need another method to make that happen?
Appreciate any pointers here.
Thanks,
–Ken
You can reload previous page to another one after you navigated to current one using router.navigate
with reloadPrevious: true
parameter:
router.navigate('/some-path/', { reloadPrevious: true })
https://framework7.io/docs/view.html#router-api-methods-properties
1 Like
I knew it would be easy. Thanks for taking the time to reply. Love the framework!
This doesn’t seem to impact the swipeback though.
mainView.router.navigate('/menu_item/post_review/',);
mainView.router.navigate('/home/', { reloadPrevious: true});
version 4.5.2
You should call reladPrevious
one when your /menu_item/post_review/
loaded, so you need to call that, for example in page:afterin
event handler of that page
Got it…now working fine. Headed over to make contribution. 