angular/modules/angular2/src/router/route_definition.ts
vsavkin 79472b77ca refactor(core): move facades out of core
This is part of ongoing work to make core platform-independent.

BREAKING CHANGE

All private exports from 'angular2/src/core/facade/{lang,collection,exception_handler}' should be replaced with 'angular2/src/facade/{lang,collection,exception_handler}'.
2015-11-07 01:36:06 +00:00

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;
}