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