Vue JS - Get Query String Parameters Example

By Hardik Savani | August 8, 2019 | Category : Vue.JS

Here, i will show you how to get url parameters in vue js. we can get query string params in vue js. we will get query string parameter using vue js route.

I will give you very simple example using vue router and we will getting all url query parameters in vue.js application.

In this example you can see to getting all params and also you can get single particular field parameter value. let's see bellow example:

You can try this type of url

http://localhost:8000?name=Hardik&[email protected]


<!DOCTYPE html>



<title>Vue JS - Get Query Parameters Example -</title>

<script src=""></script>

<script src=""></script>



<div id="app">


<script type="text/javascript">

var router = new VueRouter({

mode: 'history',

routes: []


var myApp = new Vue({


el: '#app',

mounted: function() {

parameters = this.$route.query


name = this.$







I hope it can help you...

Tags : Vue.JS

Hardik Savani
My name is Hardik Savani. I'm a full-stack developer, entrepreneur and owner of Aatman Infotech. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.
Follow Me: Github Twitter
***Do you want me hire for your Project Work? Then Contact US.

We are Recommending you: