Answer the question
In order to leave comments, you need to log in
Dynamic nav from an array of objects how to generate?
for example, when going to the /questions route, json arrives from the server:
[
{id : 1, name : 'one', desc : 'desc one', data: {}},
{id : 2, name : 'two', desc : 'desc two', data: {}},
{id : 3, name : 'three', desc : 'desc three', data: {}},
{id : 4, name : 'four', desc : 'desc four', , data: {}}
]
<div v-for="question in questions">
<router-link to="{ name: 'question/:id', params: { data: {{ category.id }} }">{{question.name }}</router-link>
</div>
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