refactor(router): rename navigate and navigateInstruction methods

This commit is contained in:
Brian Ford
2015-09-08 21:41:56 -07:00
parent 5e49d7e624
commit acc2722cb8
17 changed files with 126 additions and 125 deletions

View File

@ -76,7 +76,7 @@ export function main() {
compile('<a href="hello" [router-link]="[\'./user\']"></a>')
.then((_) =>
router.config([new Route({path: '/user', component: UserCmp, as: 'user'})]))
.then((_) => router.navigate('/a/b'))
.then((_) => router.navigateByUrl('/a/b'))
.then((_) => {
rootTC.detectChanges();
expect(getHref(rootTC)).toEqual('/my/base/user');
@ -89,7 +89,7 @@ export function main() {
compile('<a href="hello" [router-link]="[\'./user\']"></a>')
.then((_) =>
router.config([new Route({path: '/user', component: UserCmp, as: 'user'})]))
.then((_) => router.navigate('/a/b'))
.then((_) => router.navigateByUrl('/a/b'))
.then((_) => {
rootTC.detectChanges();
expect(getHref(rootTC)).toEqual('/user');
@ -102,7 +102,7 @@ export function main() {
compile('<a href="hello" [router-link]="[\'./user\', {name: name}]">{{name}}</a>')
.then((_) => router.config(
[new Route({path: '/user/:name', component: UserCmp, as: 'user'})]))
.then((_) => router.navigate('/a/b'))
.then((_) => router.navigateByUrl('/a/b'))
.then((_) => {
rootTC.componentInstance.name = 'brian';
rootTC.detectChanges();
@ -118,7 +118,7 @@ export function main() {
compile()
.then((_) => router.config(
[new Route({path: '/page/:number', component: SiblingPageCmp, as: 'page'})]))
.then((_) => router.navigate('/page/1'))
.then((_) => router.navigateByUrl('/page/1'))
.then((_) => {
rootTC.detectChanges();
expect(DOM.getAttribute(
@ -159,7 +159,7 @@ export function main() {
compile()
.then((_) => router.config(
[new Route({path: '/book/:title/...', component: BookCmp, as: 'book'})]))
.then((_) => router.navigate('/book/1984/page/1'))
.then((_) => router.navigateByUrl('/book/1984/page/1'))
.then((_) => {
rootTC.detectChanges();
expect(DOM.getAttribute(
@ -206,7 +206,7 @@ export function main() {
async.done();
});
router.navigate('/better-child');
router.navigateByUrl('/better-child');
});
}));
@ -247,7 +247,7 @@ export function main() {
async.done();
});
router.navigate('/child-with-grandchild/grandchild');
router.navigateByUrl('/child-with-grandchild/grandchild');
});
}));
});
@ -265,7 +265,7 @@ export function main() {
compile('<a href="hello" [router-link]="[\'./user\']"></a>')
.then((_) => router.config(
[new Route({path: '/user', component: UserCmp, as: 'user'})]))
.then((_) => router.navigate('/a/b'))
.then((_) => router.navigateByUrl('/a/b'))
.then((_) => {
rootTC.detectChanges();
@ -286,7 +286,7 @@ export function main() {
compile('<a href="hello" [router-link]="[\'./user\']"></a>')
.then((_) => router.config(
[new Route({path: '/user', component: UserCmp, as: 'user'})]))
.then((_) => router.navigate('/a/b'))
.then((_) => router.navigateByUrl('/a/b'))
.then((_) => {
rootTC.detectChanges();