Replies: 1 comment
-
If you need to execute async code before redirecting, that's a navigation guard. There is already plenty of ways to add them. If you are sure your |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I recently strugled to execute async code before a redirect as you can see in this discussion. I was able to achieve this redirecting inside the
beforeEnter
instead of in theredirect
attribute.Althought it works, this approach still requires a component atrribute even thought I'm always redirecting. It would be interesting to have a guard that is executed before the redirect (beforeRedirect or a more generic name). I believe it would make the code more intuitive instead of setting a
component
just to fill the attribute.Thanks.
Beta Was this translation helpful? Give feedback.
All reactions