-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Documentation for $transitions #2746
Comments
agreed, the alpha docs are difficult to find at the moment. --http://angular-ui.github.io/ui-router/1.0.0-alpha.3/interfaces/transition.ihookregistry.html-- Edit: Docs have a new home! http://ui-router.github.io/docs/latest Read about the Transition Service ( |
Even just expanding upon the intent of this service. The $stateChange events were deprecated and I assume this service was meant as a 'replacement' for that functionality. I wrote a question on stackoverflow asking about how to obtain parity between these in the context of Angular 1. http://stackoverflow.com/questions/39169207/ui-router-v1-0-transitions-service-in-angular-1-x But without more detailed documentation it's hard for me to understand if this is really meant as a full replacement or even what exactly is defined as a 'transition' let alone the syntax allowed for the |
The
They are meant as a full replacement for the state change Events.
A Transition is the process of changing from one state+params (the from state) to another (the to state).
See here for the gory details |
@christopherthielen Thanks for the detailed answer and for answering that SO question 👍 Definitely did not know about the visualizer.. such an awesome tool! |
@christopherthielen Concluding from the fact that the $transitions.on* should replace the $stateChangeStart events, how can we access the next state's parameters in the same manner as how we used to do it via (event, nextState, nextStateParams, ...) inside the run block with $transitions? I can't find a way of getting the parameters of the next state inside the run block. I have exactly the same problem as depicted here: [http://stackoverflow.com/questions/40242765/ui-router-how-to-get-next-state-params-in-transition]. Could you help me by answering the question on SO?. Thanks and keep it up the good work! |
@timobehrens I answered the SOF question |
@christopherthielen Thank you sir! Works like a charm. |
Documentation is available at https://ui-router.github.io/docs/latest/ |
Thanks, I have added a redirect. |
I can't seem to find anywhere a description on how to access the transitions from state params.
How would I get the state params of the state that I am leaving? |
|
There is hardly any documentation for the $transitions service [or at least I can't find it]; I'm not sure exactly how to use it properly. This is what i want to do:
The wiki in https://github.com/angular-ui/ui-router/wiki is outdated; it uses the old 'OnStateChange' services. These breaking changes came from this #2219
The text was updated successfully, but these errors were encountered: