feat(router): add regex matchers
@petebacondarwin deserves credit for most of this commit. This allows you to specify a regex and serializer function instead of the path DSL in your route declaration. ``` @RouteConfig([ { regex: '[a-z]+.[0-9]+', serializer: (params) => `{params.a}.params.b}`, component: MyComponent } ]) class Component {} ``` Closes #7325 Closes #7126
This commit is contained in:

committed by
Vikram Subramanian

parent
2548ce86db
commit
75343eb340
@ -21,7 +21,7 @@ import {RootRouter} from 'angular2/src/router/router';
|
||||
import {Router, ROUTER_DIRECTIVES, ROUTER_PRIMARY_COMPONENT} from 'angular2/router';
|
||||
|
||||
import {SpyLocation} from 'angular2/src/mock/location_mock';
|
||||
import {Location} from 'angular2/src/router/location';
|
||||
import {Location} from 'angular2/src/router/location/location';
|
||||
import {RouteRegistry} from 'angular2/src/router/route_registry';
|
||||
import {DirectiveResolver} from 'angular2/src/core/linker/directive_resolver';
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
|
Reference in New Issue
Block a user