Skip to content

4.0.0

Compare
Choose a tag to compare
@christopherthielen christopherthielen released this 29 Jan 23:18
· 1099 commits to master since this release

ui-router-core changes

4.0.0 (2017-01-22)

Bug Fixes

  • resolve: Allow hook and resolve's state context to be injected as $state$ (a06948b)

Features

  • core: Export all vanilla.* code from ui-router-core (f3392d1)
  • globals: Removed UIRouterGlobals interface. Renamed Globals class to UIRouterGlobals (8719334)

BREAKING CHANGES

  • 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:

function myHook(trans: Transition) {
  let globals: UIRouterGlobals = trans.router.globals; // cast is no longer necessary
}

Closes #31