0👍
The simplest way to do this is to add a name to your routes.
{path: '/home',component: Home, name: 'home'}
and then simply use v-bind:to
:
<router-link v-bind:to="{name: 'home'}">MyLink</router-link>
Source:stackexchange.com
0👍
The simplest way to do this is to add a name to your routes.
{path: '/home',component: Home, name: 'home'}
and then simply use v-bind:to
:
<router-link v-bind:to="{name: 'home'}">MyLink</router-link>