Answer the question
In order to leave comments, you need to log in
How to pass dynamic route id to tabs?
Good afternoon, I have a question.
There are tabs that I create like this:
data() {
return {
tabs: [
{title: "Данные машины", url: '/cars/data/:id', exact: true},
{title: "Модификации машины", url: '/cars/data/:id/modified'},
{title: "Запчасти на машину", url: '/user/data/:id/spares'}
]
};
},
<router-link
v-for="tab of tabs"
v-bind:key="tab.url"
v-bind:tab="tab"
tag="a"
active-class="navbar__link--active"
class="navbar__link"
:to="tab.url"
:exact="tab.exact"
>
{{tab.title}}
</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