seems nobody had this question before...? (or i just don't know the right words for it :D )
i want to have a very basic heading on every page of my app, which allows the user to go "up". simple as that.
example: user is on page.com/users/browse/
, clicks on the heading, gets navigated to page.com/users/
, clicks again, gets navigated to page.com
. nothing more. it just has to be variable, so i can put it in a component and have it just work everywhere
how can i do that? i tried vue.$route, but there is only a string of the complete url. is there any convenient way to do it? or do i HAVE to split the url by /
and build the route myself?
thanks :)
Try using this: this.$router.replace("./");
I don't know how it is working though. The single dot(./
) will go up one path and double dots(../
) will go up 2 paths!
This functionality has a name "Breadcrumbs". Check this: 1, 2, 3 or look for this in your framework.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With