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>
- [Vuejs]-Having issues understanding flow – HTML form data handling by vue and axios
- [Vuejs]-How to use 2 v-for and pass props data to child components in Vue.js
0👍
As I had an array, I had to select which one using data[id].name
- [Vuejs]-Vue js error "Uncaught SyntaxError: import not found: default" when trying to import firebase
- [Vuejs]-Vue 3 can't set value when using axios request in vee-validate
Source:stackexchange.com