Skip to content

Commit

Permalink
feat(Transition): Added getResolvable(token) method
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherthielen committed Jul 19, 2016
1 parent 7c0d87a commit 3aee2b7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/transition/transition.ts
Expand Up @@ -246,6 +246,19 @@ export class Transition implements IHookRegistry {
return getData(token);
}

/**
* Gets a [[Resolvable]] primitive
*
* This is a lower level API that returns a [[Resolvable]] from the Transition for a given token.
*
* @param token the DI token
*
* @returns the [[Resolvable]] in the transition's to path, or undefined
*/
getResolvable(token: any): Resolvable {
return new ResolveContext(this._treeChanges.to).getResolvable(token);
}

/**
* Dynamically adds a new [[Resolvable]] (`resolve`) to this transition.
*
Expand Down

0 comments on commit 3aee2b7

Please sign in to comment.