feat(router): user metadata in route configs

Provide the ability to attach custom data onto a route and retrieve
that data as an injectable (RouteData) inside the component.

Closes #2777

Closes #3541
This commit is contained in:
Daniel Rasmuson
2015-08-10 20:29:40 -04:00
committed by Brian Ford
parent 1f54e64fcf
commit ed81cb94b0
10 changed files with 138 additions and 15 deletions

View File

@ -6,7 +6,7 @@ export class AsyncRouteHandler implements RouteHandler {
_resolvedComponent: Promise<any> = null;
componentType: Type;
constructor(private _loader: Function) {}
constructor(private _loader: Function, public data?: Object) {}
resolveComponentType(): Promise<any> {
if (isPresent(this._resolvedComponent)) {