2015-07-28 01:12:30 -04:00
p.location-badge.
exported from <a href='../router'>angular2/router</a>
2015-09-01 16:55:47 -04:00
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/router/route_registry.ts#L37-L279">angular2/src/router/route_registry.ts (line 37)</a>
2015-07-28 01:12:30 -04:00
:markdown
2015-09-01 16:55:47 -04:00
Maps application URLs into application states, to support deep-linking and navigation.
2015-07-28 16:28:47 -04:00
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Injectable
pre.prettyprint
code.
@Injectable()
2015-07-28 01:12:30 -04:00
.l-main-section
h2 Members
.l-sub-section
h3 config
pre.prettyprint
code.
2015-08-11 20:09:57 -04:00
config(parentComponent: any, config: RouteDefinition)
2015-07-28 01:12:30 -04:00
:markdown
Given a component and a configuration object, add the route to this registry
.l-sub-section
h3 configFromComponent
pre.prettyprint
code.
2015-08-11 20:09:57 -04:00
configFromComponent(component: any)
2015-07-28 01:12:30 -04:00
:markdown
Reads the annotations of a component and configures the registry based on them
.l-sub-section
h3 recognize
pre.prettyprint
code.
recognize(url: string, parentComponent: any)
:markdown
Given a URL and a parent component, return the most specific instruction for navigating
the application into the state specified by the url
.l-sub-section
h3 generate
pre.prettyprint
code.
2015-09-01 16:55:47 -04:00
generate(linkParams: any[], parentComponent: any)
2015-07-28 01:12:30 -04:00
:markdown
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`.