Route guard
#410
-
Any way to put a route guard ? |
Beta Was this translation helpful? Give feedback.
Answered by
NamesMT
Sep 5, 2022
Replies: 1 comment 2 replies
-
After taking a peek at Edit: |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After taking a peek at
vite-plugin-pages
, I think we could use custom metadata andextendRoute
to implement guards.Edit:
Actually,
extendRoute
is not even needed, you could use the custom metadata along with a beforeEach that handles everything.It is, however, needed if you want to add per-route guards (
beforeEnter
).