export class RouteRegistry
export class RouteRegistry
exported from angular2/router defined in angular2/src/router/route_registry.ts (line 71)
The RouteRegistry holds route configurations for each component in an Angular app. It is responsible for creating Instructions from URLs, and generating URLs based on route and parameters.
Annotations
@Injectable()
@Injectable()
Constructor
constructor(_rootComponent: Type)
constructor(_rootComponent: Type)
Not Yet Documented
Members
config(parentComponent: any, config: RouteDefinition) : void
config(parentComponent: any, config: RouteDefinition) : void
Given a component and a configuration object, add the route to this registry
configFromComponent(component: any) : void
configFromComponent(component: any) : void
Reads the annotations of a component and configures the registry based on them
recognize(url: string, ancestorInstructions: Instruction[]) : Promise<Instruction>
recognize(url: string, ancestorInstructions: Instruction[]) : Promise<Instruction>
Given a URL and a parent component, return the most specific instruction for navigating the application into the state specified by the url
generate(linkParams: any[], ancestorInstructions: Instruction[], _aux?: any) : Instruction
generate(linkParams: any[], ancestorInstructions: Instruction[], _aux?: any) : Instruction
Given a normalized list with component names and params like: ['user', {id: 3 }]
generates a url with a leading slash relative to the provided parentComponent
.
If the optional param _aux
is true
, then we generate starting at an auxiliary
route boundary.
hasRoute(name: string, parentComponent: any) : boolean
hasRoute(name: string, parentComponent: any) : boolean
Not Yet Documented
generateDefault(componentCursor: Type) : Instruction
generateDefault(componentCursor: Type) : Instruction
Not Yet Documented