[Vuejs]-VueJS the single page template won´t render

0👍

there are 3 way to solved this problem:
first of all you can use this router link:

<router-link :to="{ path: 'detail', query: { id:data.id }}">{{ data.id }} - {{ data.name }}</router-link>
<!-- with query, resulting in `/detail?id=2` -->

the second way that can help you is:

<router-link :to="'/detail' + data.id">{{ data.id }} - {{ data.name }}</router-link>

and the third way is :

<router-link :to="{ name: 'detail', params: { id: data.id }}">{{ data.id }} - {{ data.name }}</router-link>

0👍

As I had an array, I had to select which one using data[id].name

Leave a comment