nativescript-vue / nativescript-vue-navigator

A simple router for NativeScript-Vue, built on top of $navigateTo to simplify routing from within components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple navigators doesn't work

butaminas opened this issue · comments

My stack:

✔ Component nativescript has 7.2.0
✔ Component @nativescript/core has 7.3.0
✔ Component @nativescript/ios has 7.2.0
✔ Component @nativescript/android has 7.0.1
 

First of all, I think the docs on how to use Multiple navigators are misleading.

Vue doesn't support multiple root elements and since we are using Nativescript-vue rather than Vue, there should be more info on how to properly use this.

my app.js looks like this:

import Root from './components/experimental/Root'

new Vue({
    render: h => h(Root),
    store
}).$start();

In the Root.vue I've tried wrapping navigators in Page Frame and many more tags but nothing seems to make both Navigators work.
I use 2 navigators like this:

<Navigator defaultRoute="/test1"/>
<Navigator id="second" defaultRoute="/test2"/>

But it would only show content from 1 Navigator.

Also, this.$navigator.paths always shows an empty object.