Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ludo1960's avatar

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?

0 likes
0 replies

Please or to participate in this conversation.