You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A basic login component that calls this.$navigator.navigate('/landing').
The Landing component just console.logs this.$navigator.path within mounted and it spits out /login instead of /landing
The Landing template has a Label with $navigator.path and I see it update a split second after rendering, so it seems like there's just a delay when path is actually updated? I'm not sure.
Let me know if you need more details. The setup seems pretty basic, so maybe I'm just missing something obvious. I'd like to check if a component needs auth (in my meta prop of the route) on mounted, so that's my actual use case.
Note I'm on 1.2.0.
The text was updated successfully, but these errors were encountered:
After some more investigation, it looks like the $navigator.path is not updated (and therefore can't get meta options from route) until after the transition animation is complete.
The path is updated when the Frame updates it's current page - which happens to be right when the transition finishes, which is after the mounted hook - so that part is expected.
I guess you should not navigate if the target needs auth, but that's not currently possible without manually reading the routes file and the meta. I'll think about a neat solution, perhaps a beforeNavigate hook where you can cancel/change the target route.
I have a pretty simple setup:
this.$navigator.navigate('/landing')
.this.$navigator.path
within mounted and it spits out/login
instead of/landing
$navigator.path
and I see it update a split second after rendering, so it seems like there's just a delay when path is actually updated? I'm not sure.Let me know if you need more details. The setup seems pretty basic, so maybe I'm just missing something obvious. I'd like to check if a component needs auth (in my
meta
prop of the route) on mounted, so that's my actual use case.Note I'm on 1.2.0.
The text was updated successfully, but these errors were encountered: