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)
In your Vue component use
<router-link to="/home"></router-link>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With