Answer the question
In order to leave comments, you need to log in
Routing within one page?
For example, I have a page with filters, /filters
I want each filter to have its own parameter /filters?color=red&price=1000
Or even like this /filters/advancedMode?color=red
What is the best way to do this in Vue js?
Answer the question
In order to leave comments, you need to log in
If you use vue router then you can do this for html
<router-link :to="{ query: { color: 'red', price: '1000' }}">User</router-link>
router.push({ query: { color: 'red', price: '1000' }})
<router-link :to="{ name: 'sales', query: { color: 'red', price: '1000' }}">User</router-link>
<router-link :to="{ path: '/filters', query: { color: 'red', price: '1000' }}">User</router-link>
router.push({ name: 'sales', query: { color: 'red', price: '1000' }})
router.push({ path: '/filters', query: { color: 'red', price: '1000' }})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question