
This reverts commit cf7292fcb1f41bef4bda425c65be169588f357f4. This commit triggered an existing race condition in Google code. More work is needed on the Router to fix this condition before this refactor can land.
30 lines
766 B
TypeScript
30 lines
766 B
TypeScript
import {CONST, Type} from 'angular2/src/facade/lang';
|
|
|
|
/**
|
|
* `RouteDefinition` defines a route within a {@link RouteConfig} decorator.
|
|
*
|
|
* Supported keys:
|
|
* - `path` or `aux` (requires exactly one of these)
|
|
* - `component`, `loader`, `redirectTo` (requires exactly one of these)
|
|
* - `name` or `as` (optional) (requires exactly one of these)
|
|
* - `data` (optional)
|
|
*
|
|
* See also {@link Route}, {@link AsyncRoute}, {@link AuxRoute}, and {@link Redirect}.
|
|
*/
|
|
export interface RouteDefinition {
|
|
path?: string;
|
|
aux?: string;
|
|
component?: Type | ComponentDefinition;
|
|
loader?: Function;
|
|
redirectTo?: string;
|
|
as?: string;
|
|
name?: string;
|
|
data?: any;
|
|
}
|
|
|
|
export interface ComponentDefinition {
|
|
type: string;
|
|
loader?: Function;
|
|
component?: Type;
|
|
}
|