We can use native javascript location.hash property to hash(#) url. Here in this artical we are going to explain how you can use this property in vue.js. You can also use our online editor to edit and run the code online.
Vue.js set hash URL JavaScript Example
You can set the hash url string in vuejs simply as below-
Example:
<div id="app"> <p>{{result}}</p> <button>Click Me</button> </div> |
The above example will set new hash(#) url.
Output of above example-