Nuxt.js: Ability to dynamically change the url's query params

Created on 17 Jul 2017  路  5Comments  路  Source: nuxt/nuxt.js

Is it possible to change the url's query params based on a change in a field input ?

This question is available on Nuxt.js community (#c964)

Most helpful comment

Hi. Please try this:

this.$router.push({path: this.$route.path, query: { foo: 'bar' }})

All 5 comments

Hi. Please try this:

this.$router.push({path: this.$route.path, query: { foo: 'bar' }})

flawless, thank you

hmm, push doesn't seem to be updating the url is there a specific place I should be doing this ?
this.$router.push({path: this.$route.path, query: { site: this.site }});

got it I was hard assigning the query param in an earlier attempt.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vadimsg picture vadimsg  路  3Comments

nassimbenkirane picture nassimbenkirane  路  3Comments

jaredreich picture jaredreich  路  3Comments

vadimsg picture vadimsg  路  3Comments

gary149 picture gary149  路  3Comments