Skip to content
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

Support for UI-Router 1.x #71

Open
karudedios opened this issue Aug 2, 2016 · 0 comments
Open

Support for UI-Router 1.x #71

karudedios opened this issue Aug 2, 2016 · 0 comments

Comments

@karudedios
Copy link

As a User, I'd like to have native support for angular-ui-router#1.x so that I don't have to use workarounds that mimic angular-ui-router#0.x's deprecated behavior.

Cause

  • With ui-router 1.x the emission of $stateChangeXXX events were removed, for state load it now uses the method onEnter from the $transitionProvider on the config phase (or onEnter on state configuration).

AC

  • User should be able to use angular-css while using angular-ui-router#1.x without need for manual workaround.

Note

  • The workaround below could be used in the config phase of your module, although it's not the most desirable solution.
var previousState;
$transitionsProvider.onEnter({}, function(trans, state) {
  var $rootScope = trans.injector().get('$rootScope');
  $rootScope.$emit('$stateChangeSuccess', state, null, previousState);
  previousState = state;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant