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?