Files
Angular-Docs-Cn/modules/angular2/src/router/sync_route_handler.ts
T
Alex Eagle 867c08ac84 chore(typings): mark underscore methods @internal.
This allows TypeScript to produce an API surface which matches the Dart semantics.
I found these with:
gulp build.js.dev && find dist/js/dev/es5/angular2/src -name "*.d.ts" -exec grep -H -n '^ *_' {} \;

Closes #4638
2015-10-10 02:18:33 +00:00

15 lines
507 B
TypeScript

import {RouteHandler} from './route_handler';
import {Promise, PromiseWrapper} from 'angular2/src/core/facade/async';
import {Type} from 'angular2/src/core/facade/lang';
export class SyncRouteHandler implements RouteHandler {
/** @internal */
_resolvedComponent: Promise<any> = null;
constructor(public componentType: Type, public data?: Object) {
this._resolvedComponent = PromiseWrapper.resolve(componentType);
}
resolveComponentType(): Promise<any> { return this._resolvedComponent; }
}