[Vuejs]-Unable to understand how vue-router query params work

0👍

If you store your parameters in vuex and you don’t use vuex-persistedstate, when you refresh the page state will be removed.

So, my suggestion for you:

your-awesome-site.com/dashboard?first=hello&second=hi

In your Dashboard component, you can do like this

mounted () { 
  console.log(this.$route.params)
  // Update vuex state filterScope
}

So you will retrieve your parameters from url and save it in vuex.

Also you can solve your second issue using this.$route.params

Leave a comment