mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
f66ce096d8
Closes #2642
14 lines
456 B
TypeScript
14 lines
456 B
TypeScript
import {RouteHandler} from './route_handler';
|
|
import {Promise, PromiseWrapper} from 'angular2/src/facade/async';
|
|
import {Type} from 'angular2/src/facade/lang';
|
|
|
|
export class SyncRouteHandler implements RouteHandler {
|
|
_resolvedComponent: Promise<any> = null;
|
|
|
|
constructor(public componentType: Type) {
|
|
this._resolvedComponent = PromiseWrapper.resolve(componentType);
|
|
}
|
|
|
|
resolveComponentType(): Promise<any> { return this._resolvedComponent; }
|
|
}
|