How can I get query parameters from a URL in Vue.js?

If you have url like this in your application http://127.0.0.1:8000/purchaseorders#/products/5/view?page=2

and you want to get the value of the page parameter.

You can use following code to achieve it
console.log(this.$route.query.page)