refactor(router): rename "alias" to "as"
This commit is contained in:
parent
9153331303
commit
28feac9411
|
@ -43,7 +43,7 @@ export class RouteRegistry {
|
|||
this.configFromComponent(component);
|
||||
});
|
||||
|
||||
recognizer.addConfig(config['path'], config, config['alias']);
|
||||
recognizer.addConfig(config['path'], config, config['as']);
|
||||
}
|
||||
|
||||
configFromComponent(component) {
|
||||
|
|
|
@ -134,7 +134,7 @@ export function main() {
|
|||
it('should generate link hrefs', inject([AsyncTestCompleter], (async) => {
|
||||
ctx.name = 'brian';
|
||||
compile('<a href="hello" router-link="user" [router-params]="{name: name}">{{name}}</a>')
|
||||
.then((_) => rtr.config({'path': '/user/:name', 'component': UserCmp, 'alias': 'user'}))
|
||||
.then((_) => rtr.config({'path': '/user/:name', 'component': UserCmp, 'as': 'user'}))
|
||||
.then((_) => rtr.navigate('/a/b'))
|
||||
.then((_) => {
|
||||
view.detectChanges();
|
||||
|
|
Loading…
Reference in New Issue