You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(globals): Removed UIRouterGlobals interface. Renamed Globals class to UIRouterGlobals
BREAKING CHANGE:
This change will likely only affect a small subset of typescript users and probably only those using `ui-router-ng2`.
If you're injecting the `Globals` class somewhere, e.g.:
```
@Injectable()
class MyService {
_globals: UIRouterGlobals;
constructor(globals: Globals) {
this._globals = <UIRouterGlobals> globals;
}
}
```
you should now inject `UIRouterGlobals`, e.g.:
```
@Injectable()
class MyService {
constructor(public globals: UIRouterGlobals) { }
}
```
Likewise, if you were casting the `UIRouter.globals` object as a `UIRouterGlobals`, it is no longer necessary:
```js
function myHook(trans: Transition) {
let globals: UIRouterGlobals = trans.router.globals; // cast is no longer necessary
}
```
Closes#31
0 commit comments