Monaca Onsen UI Discord Chat Github Repo

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,

  • Onsen UI

    @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-routeresque 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 with ons-navigator is by using an event bus. Are there any better mechanisms out there?