-
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
$stateChangeStart not being fired on v1.0 #2720
Comments
+1 on v1.0.0-alpha0 |
Same here on 1.0.0-alpha.4 |
Don't forget to add 'ui.router.state.events' as a dependancy for your project too |
Thanks all. $stateChange* events are deprecatedThe However, they can be re-enabled for backwards compatibility by including
Note: the code in |
Are there any examples of how to use |
@yangmillstheory @alexleung there are some samples in the alpha docs: http://angular-ui.github.io/ui-router/1.0.0-alpha.3/interfaces/transition.ihookregistry.html See also the sample app: https://github.com/ui-router/sample-app/tree/master/app/routerhooks |
Thanks @christopherthielen! |
Can you update the document for $stateChange* events? |
Can you help me?
And at startup the application loads state like this:
How do I have the same effect is achieved in the new version? How can I create an event handler that will receive information about the new state? I tried to do something like this:
But |
I see 10 thumbs up wanting updated docs, just letting you know they are found here: https://ui-router.github.io/docs/latest/modules/ng1_state_events.html |
|
@christopherthielen perhaps it would be nice to have a way too install the stateEvents.js thru a package.json file? perhaps add it as a separate module? |
State events file is packaged with ui.router so you can do following.
|
@christopherthielen Is there anyway to unhook? Say in a controller, I hook to Update
|
If only the docs were a little more simple I wouldn't have to spend a few days studying every aspect of the complicated $transition to ultimately figure out how to just grab one parameter before switching states. ugh |
Maybe useful for any other user facing with the same issue: |
Here's a complete example of how to use new |
Hi, $rootScope.$on('$stateChangeStart') is depracated in ui-rotuer 1.0\ angular-ui/ui-router#2720
Works fine on v0.2.13
The text was updated successfully, but these errors were encountered: