$stateChange* events are deprecated in upcoming angular-ui-router 1.0.0
See original GitHub issueWhile digging into routing, I realized the upcoming update of angular-ui-router is deprecating $stateChange events: https://github.com/angular-ui/ui-router/issues/2219
Instead, the following is recommended:
$transitions.onStart({}, function() {});
$transitions.onSuccess({}, function() {});
However a solution is proposed here but I was wondering if there should be any adjustment to redux-ui-router as a consequence?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:7 (3 by maintainers)
Top Results From Across the Web
UI Router 1.0 state change events not working - Stack Overflow
State change events are supported in component routing, but UI Router handles events differently in v1.0. Try this:
Read more >Guide: UI-Router 1.0 Migration
All state events, (i.e. $stateChange* and friends) are now deprecated and disabled by default. Instead of listening for events, use the ...
Read more >ui-router: Deprecated events and hooks | Stepan Suvorov Blog
All of them are deprecated in 1.0.0-alpha.3 and you can not use them anymore in 1.0.0-alpha.5. If you want to move to new...
Read more >Angular UI-Router: An Elegant & Maintainable Way to Prevent ...
In this version of UI-router, the best practice for preventing a state change is listening to an event. In the new UI-Router 1.0.0....
Read more >$stateChangeStart not being fired when state Changes in UI ...
angular-ui-router angularjsecmascript-6javascriptwebpack ... had a similar problem and eventually realised that the stateChange* events have been deprecated ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just ran into this myself. I was confused that master was showing things have already been upgraded to work with the new $transitions callbacks. Wasn’t until I went digging around my node_modules, I realized NPM had an old version. Any news when there will be a release?
Thank you so much for this lib, example is minimal and clear, I am learning Redux and it helped a lot. In a typical angularjs application, your state is usually stored in services, controllers (scopes), router states… it can get messy real fast…
Even if you isolate all side effects to a single place (rootscope or a dedicated state service) it’s decoupled from ui-router, big problem solved with redux-ui-router.
I’m rewriting a angularjs app with typescript. I can confirm that 0.7.1-rc.1 works nicely with 1.0.0-rc.1.