Vue.js Get Url Query String

Vue.js Get Url Query String | Get Url Parameters– We can get query string in vue.js using route. Here in this post we are going to explain how you can get Query String from url.

How to get Url Query String Value in Vue.js ?

You can get query string using vue.js route. Here is an example-

Vue.js Get Url Query String | Get Url Parameters Example:

  //suppose current url is something like this 
  "/mypage?q=food"; 
  // you can get value of q simply as below- 
  this.$route.query.q; // this will give food

Thus you can get any query string value from url in vue.js


Advertisements

Add Comment

📖 Read More