Oct 6, 2019
0
Level 1
Vue-router query params
hello,
I have a route defined so:
{
path: '/newModule/:id',
component: () =>
import(/* webpackChunkName: "newModule" */ './NewModule/NewModuleId.vue').then((m: any) => m.default),
},
Say I wanted to add "?user=john to the url? The docs say:
this.$router.push({ path: '/newModule/:id', query: { user: 'john' }})
The result I get is http://localhost:3000/newModule/:id?user=john but what I want is http://localhost:3000/ah;h;oiah;oh;aoihoh?user=john
what am I doing wrong?
Please or to participate in this conversation.