Where to install Navigation Guards. Before Enter, Before Each, and After Each #406
-
Right now I use the three navigation guards and since I'm trying to use the router/auto-routes im not sure how to implement them. Originally they were added as such
but after some testing i learned if i add anything to my router/index.ts file it would completely break out how router/auto worked. If possible a small example and explaining on where this code will go would be very appreciated. Thank you |
Beta Was this translation helpful? Give feedback.
Answered by
posva
May 30, 2024
Replies: 1 comment 4 replies
-
|
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
TomT15
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
beforeEnter()
: https://uvr.esm.is/guide/extending-routes.html#definepagebeforeEach()
andafterEach()
goes where you define the router instance