You can do it very elegantly and efficiently without using router. Use change or input event to update the hash.
new Vue({
el: "#app",
data: {
agility: 25,
hash: 0
},
methods: {
addHash() {
window.location.hash = this.agility;
this.hash = this.agility;
}
},
created: () => {
const
…
Top comments (0)