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
***resolve:** Allow hook and resolve's state context to be injected as `$state$` ([a06948b](https://github.com/ui-router/core/commit/a06948b))
8
+
9
+
10
+
### Features
11
+
12
+
***core:** Export all vanilla.* code from `ui-router-core` ([f3392d1](https://github.com/ui-router/core/commit/f3392d1))
13
+
***globals:** Removed `UIRouterGlobals` interface. Renamed `Globals` class to `UIRouterGlobals` ([8719334](https://github.com/ui-router/core/commit/8719334))
14
+
15
+
16
+
### BREAKING CHANGES
17
+
18
+
* BREAKING CHANGE:
19
+
20
+
This change will likely only affect a small subset of typescript users and probably only those using `ui-router-ng2`.
21
+
If you're injecting the `Globals` class somewhere, e.g.:
22
+
```
23
+
@Injectable()
24
+
class MyService {
25
+
_globals: UIRouterGlobals;
26
+
constructor(globals: Globals) {
27
+
this._globals = <UIRouterGlobals> globals;
28
+
}
29
+
}
30
+
```
31
+
you should now inject `UIRouterGlobals`, e.g.:
32
+
```
33
+
@Injectable()
34
+
class MyService {
35
+
constructor(public globals: UIRouterGlobals) { }
36
+
}
37
+
```
38
+
39
+
Likewise, if you were casting the `UIRouter.globals` object as a `UIRouterGlobals`, it is no longer necessary:
40
+
41
+
```js
42
+
functionmyHook(trans:Transition) {
43
+
let globals: UIRouterGlobals =trans.router.globals; // cast is no longer necessary
0 commit comments