refactor(router): rename "alias" to "as"

This commit is contained in:
Brian Ford 2015-05-03 20:36:36 -07:00
parent 9153331303
commit 28feac9411
2 changed files with 2 additions and 2 deletions
modules/angular2
src/router
test/router

@ -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) {

@ -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();