Answer the question
In order to leave comments, you need to log in
What is the correct way to make a vue-router route?
When working with vue-roter, I encountered a problem
, there is such a route
{
path: "/news/:slug",
name: "News",
component: () => import( /* webpackChunkName: "promo" */ '../pages/News.vue'),
}
{
"url": "/news/eksklyuzivy",
"name": "Эксклюзивы",
"type": 2,
"icon": null,
"slug": "article/eksklyuzivy"
},
<router-link
:to="{
name: 'News',
params: { slug: 'article/eksklyuzivy' },
}">Новини</router-link>
news/article%2Feksklyuzivy
<router-link
:to="{
path: '/article/eksklyuzivy',
}">Новини</router-link>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question