Vue.js get Current Url


Vue.js get Current Url – It is very simple to get current url in vue.js. We can use window.location.pathname to get the current url in JavaScript.


Vue.js get Current Url | Get Current Route Example

You get the current url/current Route in Vue.Js Simply as below-

Vue.js get Current Url Syntax:

var currentUrl = window.location.pathname;

So you can get current url using the above example without using anything else.


Advertisements

Add Comment

📖 Read More