
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
17 lines
322 B
TypeScript
17 lines
322 B
TypeScript
import {CONST, Type} from 'angular2/src/facade/lang';
|
|
|
|
export interface RouteDefinition {
|
|
path: string;
|
|
component?: Type | ComponentDefinition;
|
|
loader?: Function;
|
|
redirectTo?: string;
|
|
as?: string;
|
|
data?: any;
|
|
}
|
|
|
|
export interface ComponentDefinition {
|
|
type: string;
|
|
loader?: Function;
|
|
component?: Type;
|
|
}
|