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

View File

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

View File

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