castillo-io / castillo-io/angular-css
Support for UI-Router 1.x
- Dominant language
- JavaScript
- Stars
- 464
- Forks
- 84
- PR merge metrics
- No merged PRs in 30d
Description
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.
``` javascript
var previousState;
$transitionsProvider.onEnter({}, function(trans, state) {
var $rootScope = trans.injector().get('$rootScope');
$rootScope.$emit('$stateChangeSuccess', state, null, previousState);
previousState = state;
});
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.