nativescript-vue / nativescript-vue-navigator

A simple router for NativeScript-Vue, built on top of $navigateTo to simplify routing from within components
MIT License
98 stars 10 forks source link

how to create router link? #1

Closed umefarooq closed 5 years ago

umefarooq commented 5 years ago

How to create router link with this package, same way vue router link are created or other way?

rigor789 commented 5 years ago

There is no <router-link> instead you need to call $navigator.navigate(to, options).

For example

<Button text="Navigate" @tap="$navigator.navigate('/some/other/route', { clearHistory: true })" />

Or if called from the component's methods

export default {
  methods: {
    doStuff() {
      this.$navigator.navigate('/some/route', { backstackVisible: false })
    }
  }
}