How can you check if there is a previous route with Vue router? #11330
-
I am using Vue Router 4 and would like to show a back button on my website only if there is a previous route. Checking |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Are you sure you aren't doing anything unconventional? I just tested it and it adds entries to Maybe your links are replacing the current location instead of creating a new history entry? Also, for Vue Router related questions, I suggest to post your questions in Vue Router repo: https://github.com/vuejs/router/discussions |
Beta Was this translation helpful? Give feedback.
Are you sure you aren't doing anything unconventional? I just tested it and it adds entries to
window.history
.Maybe your links are replacing the current location instead of creating a new history entry?
Also, for Vue Router related questions, I suggest to post your questions in Vue Router repo: https://github.com/vuejs/router/discussions