9
votes

I am using the following router link in a Vue component:

 <router-link :to="{ name: 'home'}"></router-link>

The rest of my app is as follows:

Router.js

  new VueRouter({
  mode: "history",
  routes: [
    {
      name: 'home',
      path: '/home',
      component: home,
    }
 ]})

Main.js

new Vue({
  render: (h) => h(App),
  router,
}).$mount("#app");

Getting the below error when using router-link, but router.push() is working fine with routes.

TypeError: Cannot read property '_normalized' of undefined (vue.min.js:6)
1

1 Answers

2
votes

In your Vue component use

<router-link to="/home"></router-link>