3👍
✅
You could use the Watched property of Vue to watch for changes in your route like:
watch: {
$route(to, from) {
console.log("route changed");
this.someVariable = false;
}
}
More about the Route Object in the documentation.
Source:stackexchange.com