D
D
Daria It doesn't matter2021-10-28 12:32:32
Vue.js
Daria It doesn't matter, 2021-10-28 12:32:32

How to change get parameters on the go in vue router?

The project has a carousel with product patterns
when choosing a pattern, the get parameter in the url should change,

for example,
there is a page with such a url blablablabla/product/1?p=1
and when choosing pattern 2, we must pass the id of the pattern to ?p
I don’t know how to implement this because I work with get parameters for the first time

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AndromedaStar, 2021-10-28
@AndromedaStar

router.push({ path: 'blablabla', query: { p: 'pValue' }})

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question