Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
popping ( poppage() ) back to the top in one go
-
I have taken the user through a few pages using pushpage() and then, at the final page, they have the option of saving what they have chosen. Thereby negating the need to go back through the previous pages. Can I ‘jump’ straight back to the homepage?
-
@StevieC Yes, per the documents here: https://onsen.io/v2/docs/js/ons-navigator.html
You would want to use:
resetToPage(page, [options])
-
@StevieC As @munsterlander said, you can use
resetToPage
, but it has a push animation by default. Here I implemented a simple pop animation with a new animator (works from 2.0.5).Otherwise, you can remove pages from the stack before popPage. The best way would be doing
myNavigator.pageLoader.unload( pageElement )
. You can access to the page stack withmyNavigator.pages
.
-
Excellent. Thanks chaps.