Hello.
I was wondering if there is a method to get the name of the previous route (the route that you get by calling $router.back()?
So if I make a navigation button, instead of saying just "Go back", i could make it say e.g "Go back to {name}"?
Hello @thomas-alrek,
Thank your for your interest in this project.
However, your issue is a usage/support question, and the issue tracker is reserved exclusively for bug reports and feature requests (as outlined in our Contributing Guide).
We encourage you to ask it on the forum , Stack Overflow or on gitter and are happy to help you out there.
Hint: use an router.afterEach() nagigation guard to cache the previous route object.
.....
Basically he's saying that you can use router.beforeEach or router.afterEach to intercept the route the browser is moving from and going to and cache that data in localstorage/Vuex/cookies essentially maintaining your own browser history stack.
I think it's kind of dumb that browser API's and Vue Router don't offer this for you. I mean, clearly that stack data lives back there somewhere or else they wouldn't know where to put you when you call go(-1) so why not make that data publicly available.
Most helpful comment
.....