Get Query Parameter In Vue Js using Vue Router



Hello vue devs in this quick example i will show you how you can get query parameter from url in Vue js. To do that i will use vue-router. So in this example i will use vue-router to fetch query string in vue js from url.

In this vue js get query parameter example from url you can see to getting all params and also you can get single particular field parameter value. let's have a look on the bellow example:

You can try using this type of url:

 

URL
http://localhost:3000?site=codecheef.org&topic=vuejs

 

Read also : JavaScript Pass Function as Parameter with Example

 

 

Hope this example help you to get query parameter in vue js.