Revert "feat(router): allow linking to auxiliary routes"

This reverts commit 0b1ff2db9e.
This commit is contained in:
Alex Rickabaugh
2015-11-23 16:34:40 -08:00
parent a3353a5e28
commit cee67e6fe0
4 changed files with 64 additions and 110 deletions

View File

@ -31,7 +31,6 @@ import {
RouterLink,
RouterOutlet,
AsyncRoute,
AuxRoute,
Route,
RouteParams,
RouteConfig,
@ -199,7 +198,7 @@ export function main() {
name: 'ChildWithGrandchild'
})
]))
.then((_) => router.navigateByUrl('/child-with-grandchild/grandchild'))
.then((_) => router.navigate(['/ChildWithGrandchild']))
.then((_) => {
fixture.detectChanges();
expect(DOM.getAttribute(fixture.debugElement.componentViewChildren[1]
@ -235,21 +234,6 @@ export function main() {
});
}));
it('should generate links to auxiliary routes', inject([AsyncTestCompleter], (async) => {
compile()
.then((_) => router.config([new Route({path: '/...', component: AuxLinkCmp})]))
.then((_) => router.navigateByUrl('/'))
.then((_) => {
rootTC.detectChanges();
expect(DOM.getAttribute(rootTC.debugElement.componentViewChildren[1]
.componentViewChildren[0]
.nativeElement,
'href'))
.toEqual('/(aside)');
async.done();
});
}));
describe('router-link-active CSS class', () => {
it('should be added to the associated element', inject([AsyncTestCompleter], (async) => {
@ -487,17 +471,3 @@ class AmbiguousBookCmp {
title: string;
constructor(params: RouteParams) { this.title = params.get('title'); }
}
@Component({selector: 'aux-cmp'})
@View({
template:
`<a [router-link]="[\'./Hello\', [ \'Aside\' ] ]">aside</a> |
<router-outlet></router-outlet> | aside <router-outlet name="aside"></router-outlet>`,
directives: ROUTER_DIRECTIVES
})
@RouteConfig([
new Route({path: '/', component: HelloCmp, name: 'Hello'}),
new AuxRoute({path: '/aside', component: Hello2Cmp, name: 'Aside'})
])
class AuxLinkCmp {
}