question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

$stateChange* events are deprecated in upcoming angular-ui-router 1.0.0

See original GitHub issue

While 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:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jhummelcommented, Dec 2, 2016

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?

1reaction
phil-lgrcommented, Mar 28, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found