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.
How to navigate with vue-onsen
-
Hi,
In onsen angular we have the navigation possible as this.navigator.element.pushPage(SecondPageComponent).
How can I acheive the same in Onsenui-vue ?In Vue inside my method I want to redirect to another component/screen.
Please note that the redirected component is not there in the v-ons-navigator or in the pagestack. So how should I redirect?
Thanks in advance,
Hari
-
@shriharip Have you looked at the v-ons-navigator docs? The interactive tutorial there should show you exactly how to push pages.
-
The docs make the assumption that the pages are peers. A
vue-router
esque mechanism might be preferable to requiring pages be on the same level. It would be nice to nest as deeply as possible and still be able to push/pop as desired. The only way I can think of achieving this withons-navigator
is by using anevent bus
. Are there any better mechanisms out there?