-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
willTransition is not called on first call of transitionTo #38
Comments
Its only called when transitioning away from the route - its actually an I may just have a misunderstanding of the purpose of willTransition here, Example of what I am seeing: router.addRoute("foo", Route.extend({ router.startRouting(); The above example will only log bar once. — |
Ohhhh ok that makes sense. So can you do transition.abort in activate? |
I think beforeModel or model hooks are best for redirects if that's what
|
Yeah basically I don't want to go into a certain resource if the user isn't authenticated since fetching the models won't work unless you are authenticated |
BeforeModel is intended for such cases. Activate hook is called when all
|
I've slightly clarified the docs via @4dd29454a7ce608bfb82c943934d9f83ec98816a and added a new issue about making |
I may just have a misunderstanding of the purpose of willTransition here, but I would have thought that willTransition would be called whenever a transition occurs?
Example of what I am seeing:
The above example will only log bar once.
The text was updated successfully, but these errors were encountered: