I am using vue/router
to make a spa, and I am having difficulty sending the id of a certain product through url ...
I'm doing this in the link:
<router-link :to="{name:'editar',params:{id:item.id}}">editar2</router-link>
route:
const routes = [{
path: '/',
component: Vue.component('home-page')
}, {
path: '/teste',
component: Vue.component('home-page')
}, {
path: '/editar',
'name': editar,
component: Vue.component('home-page')
}]
const myRouter = new VueRouter({
routes
})
But it does not work at all ... how do I make this guy send the id to url
?