[Vuejs]-Vue – Cannot redirect route to another

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>

Leave a comment