Skip to content

how to use addRoute inside router.beforeEach ? #2003

Closed Answered by posva
jdkcoder asked this question in Help and Questions
Discussion options

You must be logged in to vote

You need to navigate again after adding routes: https://router.vuejs.org/guide/advanced/dynamic-routing.html#Adding-Routes-inside-navigation-guards

BTW: you should remove the computed from the guard, just read the value directly. It might create a leak otherwise

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@KevinDeAnDan
Comment options

Answer selected by posva
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants