Closed
Description
Hey there. This is more of a question than a bug, but could turn into a feature request, if there is no way to currently handle this.
tl;dr; - Is there some way for me to use a global hook and run some code regardless if the current page is the page that will be navigated too?
I'm trying to call some methods (Vuex commits actually) in the vue-router beforeEach
or afterEach
hooks. These methods do things like closing the navigation, which need to be ran when clicking every link in the application. Everything works like a charm, until the user clicks a link to the page they are currently on. It seems (as it should) that the page doesn't actually change, but also that none of the hooks are called.
Thanks!