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
@ -31,7 +31,7 @@ import {
|
||||
AuxRoute,
|
||||
AsyncRoute,
|
||||
Redirect
|
||||
} from 'angular2/src/router/route_config_decorator';
|
||||
} from 'angular2/src/router/route_config/route_config_decorator';
|
||||
|
||||
import {
|
||||
OnActivate,
|
||||
@ -40,7 +40,7 @@ import {
|
||||
CanDeactivate,
|
||||
CanReuse
|
||||
} from 'angular2/src/router/interfaces';
|
||||
import {CanActivate} from 'angular2/src/router/lifecycle_annotations';
|
||||
import {CanActivate} from 'angular2/src/router/lifecycle/lifecycle_annotations';
|
||||
import {ComponentInstruction} from 'angular2/src/router/instruction';
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user