problem description
recently, the project needs to listen for changes in vue routes. it is said on the Internet to use "hashchange" to monitor, but ordinary jumps cannot be triggered, only backward and forward can be triggered.
the environmental background of the problems and what methods you have tried
related codes
window.addEventListener("hashchange", function (e) {
console.log(e.oldURL);
console.log(e.newURL)
}, false)
what result do you expect? What is the error message actually seen?
1. Why didn"t "hashchange"? be triggered?
2. How does the external monitor the changes of a single page application page?