feat(ICU): enable ICU extraction even when when in is not used
BREAKING CHANGES: "{" is used a a delimiter for ICU messages then it could not be used in text nodes. "{" should be escaped as "{{ '{' }}" Before: <span>some { valid } text</span> After: <span>some { invalid } text<span> <!-- throw parse error --> <span>some {{ '{' }} valid } text</span>
This commit is contained in:
@ -261,27 +261,27 @@ function asyncRoutesWithSyncChildrenWithoutDefaultRoutes() {
|
||||
}));
|
||||
|
||||
it('should navigate by URL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(tcb, `outer { <router-outlet></router-outlet> }`)
|
||||
compile(tcb, `outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([new AsyncRoute(
|
||||
{path: '/a/...', loader: parentCmpLoader, name: 'Parent'})]))
|
||||
.then((_) => rtr.navigateByUrl('/a/b'))
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('outer { inner { hello } }');
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('outer [ inner [ hello ] ]');
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
|
||||
it('should navigate by link DSL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(tcb, `outer { <router-outlet></router-outlet> }`)
|
||||
compile(tcb, `outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([new AsyncRoute(
|
||||
{path: '/a/...', loader: parentCmpLoader, name: 'Parent'})]))
|
||||
.then((_) => rtr.navigate(['/Parent', 'Child']))
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('outer { inner { hello } }');
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('outer [ inner [ hello ] ]');
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
@ -289,7 +289,7 @@ function asyncRoutesWithSyncChildrenWithoutDefaultRoutes() {
|
||||
it('should generate a link URL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(
|
||||
tcb,
|
||||
`<a [routerLink]="['Parent']">nav to child</a> | outer { <router-outlet></router-outlet> }`)
|
||||
`<a [routerLink]="['Parent']">nav to child</a> | outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([new AsyncRoute(
|
||||
{path: '/a/...', loader: parentCmpLoader, name: 'Parent'})]))
|
||||
@ -306,18 +306,18 @@ function asyncRoutesWithSyncChildrenWithoutDefaultRoutes() {
|
||||
(async: AsyncTestCompleter, location: any /** TODO #9100 */) => {
|
||||
compile(
|
||||
tcb,
|
||||
`<a [routerLink]="['Parent', 'Child']">nav to child</a> | outer { <router-outlet></router-outlet> }`)
|
||||
`<a [routerLink]="['Parent', 'Child']">nav to child</a> | outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([new AsyncRoute(
|
||||
{path: '/a/...', loader: parentCmpLoader, name: 'Parent'})]))
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('nav to child | outer { }');
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('nav to child | outer [ ]');
|
||||
|
||||
rtr.subscribe((_: any /** TODO #9100 */) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement)
|
||||
.toHaveText('nav to child | outer { inner { hello } }');
|
||||
.toHaveText('nav to child | outer [ inner [ hello ] ]');
|
||||
expect(location.urlChanges).toEqual(['/a/b']);
|
||||
async.done();
|
||||
});
|
||||
@ -343,27 +343,27 @@ function asyncRoutesWithSyncChildrenWithDefaultRoutes() {
|
||||
}));
|
||||
|
||||
it('should navigate by URL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(tcb, `outer { <router-outlet></router-outlet> }`)
|
||||
compile(tcb, `outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([new AsyncRoute(
|
||||
{path: '/a/...', loader: parentWithDefaultCmpLoader, name: 'Parent'})]))
|
||||
.then((_) => rtr.navigateByUrl('/a'))
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('outer { inner { hello } }');
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('outer [ inner [ hello ] ]');
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
|
||||
it('should navigate by link DSL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(tcb, `outer { <router-outlet></router-outlet> }`)
|
||||
compile(tcb, `outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([new AsyncRoute(
|
||||
{path: '/a/...', loader: parentWithDefaultCmpLoader, name: 'Parent'})]))
|
||||
.then((_) => rtr.navigate(['/Parent']))
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('outer { inner { hello } }');
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('outer [ inner [ hello ] ]');
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
@ -371,7 +371,7 @@ function asyncRoutesWithSyncChildrenWithDefaultRoutes() {
|
||||
it('should generate a link URL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(
|
||||
tcb,
|
||||
`<a [routerLink]="['/Parent']">link to inner</a> | outer { <router-outlet></router-outlet> }`)
|
||||
`<a [routerLink]="['/Parent']">link to inner</a> | outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([new AsyncRoute(
|
||||
{path: '/a/...', loader: parentWithDefaultCmpLoader, name: 'Parent'})]))
|
||||
@ -388,19 +388,19 @@ function asyncRoutesWithSyncChildrenWithDefaultRoutes() {
|
||||
(async: AsyncTestCompleter, location: any /** TODO #9100 */) => {
|
||||
compile(
|
||||
tcb,
|
||||
`<a [routerLink]="['/Parent']">link to inner</a> | outer { <router-outlet></router-outlet> }`)
|
||||
`<a [routerLink]="['/Parent']">link to inner</a> | outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([new AsyncRoute(
|
||||
{path: '/a/...', loader: parentWithDefaultCmpLoader, name: 'Parent'})]))
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement)
|
||||
.toHaveText('link to inner | outer { }');
|
||||
.toHaveText('link to inner | outer [ ]');
|
||||
|
||||
rtr.subscribe((_: any /** TODO #9100 */) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement)
|
||||
.toHaveText('link to inner | outer { inner { hello } }');
|
||||
.toHaveText('link to inner | outer [ inner [ hello ] ]');
|
||||
expect(location.urlChanges).toEqual(['/a/b']);
|
||||
async.done();
|
||||
});
|
||||
@ -426,27 +426,27 @@ function asyncRoutesWithAsyncChildrenWithoutParamsWithoutDefaultRoutes() {
|
||||
}));
|
||||
|
||||
it('should navigate by URL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(tcb, `outer { <router-outlet></router-outlet> }`)
|
||||
compile(tcb, `outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {rootTC = rtc})
|
||||
.then((_) => rtr.config([new AsyncRoute(
|
||||
{path: '/a/...', loader: asyncParentCmpLoader, name: 'Parent'})]))
|
||||
.then((_) => rtr.navigateByUrl('/a/b'))
|
||||
.then((_) => {
|
||||
rootTC.detectChanges();
|
||||
expect(rootTC.debugElement.nativeElement).toHaveText('outer { inner { hello } }');
|
||||
expect(rootTC.debugElement.nativeElement).toHaveText('outer [ inner [ hello ] ]');
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
|
||||
it('should navigate by link DSL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(tcb, `outer { <router-outlet></router-outlet> }`)
|
||||
compile(tcb, `outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {rootTC = rtc})
|
||||
.then((_) => rtr.config([new AsyncRoute(
|
||||
{path: '/a/...', loader: asyncParentCmpLoader, name: 'Parent'})]))
|
||||
.then((_) => rtr.navigate(['/Parent', 'Child']))
|
||||
.then((_) => {
|
||||
rootTC.detectChanges();
|
||||
expect(rootTC.debugElement.nativeElement).toHaveText('outer { inner { hello } }');
|
||||
expect(rootTC.debugElement.nativeElement).toHaveText('outer [ inner [ hello ] ]');
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
@ -454,7 +454,7 @@ function asyncRoutesWithAsyncChildrenWithoutParamsWithoutDefaultRoutes() {
|
||||
it('should generate a link URL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(
|
||||
tcb,
|
||||
`<a [routerLink]="['Parent', 'Child']">nav to child</a> | outer { <router-outlet></router-outlet> }`)
|
||||
`<a [routerLink]="['Parent', 'Child']">nav to child</a> | outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {rootTC = rtc})
|
||||
.then((_) => rtr.config([new AsyncRoute(
|
||||
{path: '/a/...', loader: asyncParentCmpLoader, name: 'Parent'})]))
|
||||
@ -471,18 +471,18 @@ function asyncRoutesWithAsyncChildrenWithoutParamsWithoutDefaultRoutes() {
|
||||
(async: AsyncTestCompleter, location: any /** TODO #9100 */) => {
|
||||
compile(
|
||||
tcb,
|
||||
`<a [routerLink]="['Parent', 'Child']">nav to child</a> | outer { <router-outlet></router-outlet> }`)
|
||||
`<a [routerLink]="['Parent', 'Child']">nav to child</a> | outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {rootTC = rtc})
|
||||
.then((_) => rtr.config([new AsyncRoute(
|
||||
{path: '/a/...', loader: asyncParentCmpLoader, name: 'Parent'})]))
|
||||
.then((_) => {
|
||||
rootTC.detectChanges();
|
||||
expect(rootTC.debugElement.nativeElement).toHaveText('nav to child | outer { }');
|
||||
expect(rootTC.debugElement.nativeElement).toHaveText('nav to child | outer [ ]');
|
||||
|
||||
rtr.subscribe((_: any /** TODO #9100 */) => {
|
||||
rootTC.detectChanges();
|
||||
expect(rootTC.debugElement.nativeElement)
|
||||
.toHaveText('nav to child | outer { inner { hello } }');
|
||||
.toHaveText('nav to child | outer [ inner [ hello ] ]');
|
||||
expect(location.urlChanges).toEqual(['/a/b']);
|
||||
async.done();
|
||||
});
|
||||
@ -508,27 +508,27 @@ function asyncRoutesWithAsyncChildrenWithoutParamsWithDefaultRoutes() {
|
||||
}));
|
||||
|
||||
it('should navigate by URL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(tcb, `outer { <router-outlet></router-outlet> }`)
|
||||
compile(tcb, `outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {rootTC = rtc})
|
||||
.then((_) => rtr.config([new AsyncRoute(
|
||||
{path: '/a/...', loader: asyncDefaultParentCmpLoader, name: 'Parent'})]))
|
||||
.then((_) => rtr.navigateByUrl('/a'))
|
||||
.then((_) => {
|
||||
rootTC.detectChanges();
|
||||
expect(rootTC.debugElement.nativeElement).toHaveText('outer { inner { hello } }');
|
||||
expect(rootTC.debugElement.nativeElement).toHaveText('outer [ inner [ hello ] ]');
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
|
||||
it('should navigate by link DSL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(tcb, `outer { <router-outlet></router-outlet> }`)
|
||||
compile(tcb, `outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {rootTC = rtc})
|
||||
.then((_) => rtr.config([new AsyncRoute(
|
||||
{path: '/a/...', loader: asyncDefaultParentCmpLoader, name: 'Parent'})]))
|
||||
.then((_) => rtr.navigate(['/Parent']))
|
||||
.then((_) => {
|
||||
rootTC.detectChanges();
|
||||
expect(rootTC.debugElement.nativeElement).toHaveText('outer { inner { hello } }');
|
||||
expect(rootTC.debugElement.nativeElement).toHaveText('outer [ inner [ hello ] ]');
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
@ -536,7 +536,7 @@ function asyncRoutesWithAsyncChildrenWithoutParamsWithDefaultRoutes() {
|
||||
it('should generate a link URL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(
|
||||
tcb,
|
||||
`<a [routerLink]="['Parent']">nav to child</a> | outer { <router-outlet></router-outlet> }`)
|
||||
`<a [routerLink]="['Parent']">nav to child</a> | outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {rootTC = rtc})
|
||||
.then((_) => rtr.config([new AsyncRoute(
|
||||
{path: '/a/...', loader: asyncDefaultParentCmpLoader, name: 'Parent'})]))
|
||||
@ -553,18 +553,18 @@ function asyncRoutesWithAsyncChildrenWithoutParamsWithDefaultRoutes() {
|
||||
(async: AsyncTestCompleter, location: any /** TODO #9100 */) => {
|
||||
compile(
|
||||
tcb,
|
||||
`<a [routerLink]="['Parent']">nav to child</a> | outer { <router-outlet></router-outlet> }`)
|
||||
`<a [routerLink]="['Parent']">nav to child</a> | outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {rootTC = rtc})
|
||||
.then((_) => rtr.config([new AsyncRoute(
|
||||
{path: '/a/...', loader: asyncDefaultParentCmpLoader, name: 'Parent'})]))
|
||||
.then((_) => {
|
||||
rootTC.detectChanges();
|
||||
expect(rootTC.debugElement.nativeElement).toHaveText('nav to child | outer { }');
|
||||
expect(rootTC.debugElement.nativeElement).toHaveText('nav to child | outer [ ]');
|
||||
|
||||
rtr.subscribe((_: any /** TODO #9100 */) => {
|
||||
rootTC.detectChanges();
|
||||
expect(rootTC.debugElement.nativeElement)
|
||||
.toHaveText('nav to child | outer { inner { hello } }');
|
||||
.toHaveText('nav to child | outer [ inner [ hello ] ]');
|
||||
expect(location.urlChanges).toEqual(['/a/b']);
|
||||
async.done();
|
||||
});
|
||||
@ -590,7 +590,7 @@ function asyncRoutesWithAsyncChildrenWithParamsWithoutDefaultRoutes() {
|
||||
}));
|
||||
|
||||
it('should navigate by URL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(tcb, `{ <router-outlet></router-outlet> }`)
|
||||
compile(tcb, `[ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([new AsyncRoute(
|
||||
{path: '/team/:id/...', loader: asyncTeamLoader, name: 'Team'})]))
|
||||
@ -598,13 +598,13 @@ function asyncRoutesWithAsyncChildrenWithParamsWithoutDefaultRoutes() {
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement)
|
||||
.toHaveText('{ team angular | user { hello matias } }');
|
||||
.toHaveText('[ team angular | user [ hello matias ] ]');
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
|
||||
it('should navigate by link DSL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(tcb, `{ <router-outlet></router-outlet> }`)
|
||||
compile(tcb, `[ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([new AsyncRoute(
|
||||
{path: '/team/:id/...', loader: asyncTeamLoader, name: 'Team'})]))
|
||||
@ -612,7 +612,7 @@ function asyncRoutesWithAsyncChildrenWithParamsWithoutDefaultRoutes() {
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement)
|
||||
.toHaveText('{ team angular | user { hello matias } }');
|
||||
.toHaveText('[ team angular | user [ hello matias ] ]');
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
@ -620,7 +620,7 @@ function asyncRoutesWithAsyncChildrenWithParamsWithoutDefaultRoutes() {
|
||||
it('should generate a link URL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(
|
||||
tcb,
|
||||
`<a [routerLink]="['/Team', {id: 'angular'}, 'User', {name: 'matias'}]">nav to matias</a> { <router-outlet></router-outlet> }`)
|
||||
`<a [routerLink]="['/Team', {id: 'angular'}, 'User', {name: 'matias'}]">nav to matias</a> [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([new AsyncRoute(
|
||||
{path: '/team/:id/...', loader: asyncTeamLoader, name: 'Team'})]))
|
||||
@ -637,18 +637,18 @@ function asyncRoutesWithAsyncChildrenWithParamsWithoutDefaultRoutes() {
|
||||
(async: AsyncTestCompleter, location: any /** TODO #9100 */) => {
|
||||
compile(
|
||||
tcb,
|
||||
`<a [routerLink]="['/Team', {id: 'angular'}, 'User', {name: 'matias'}]">nav to matias</a> { <router-outlet></router-outlet> }`)
|
||||
`<a [routerLink]="['/Team', {id: 'angular'}, 'User', {name: 'matias'}]">nav to matias</a> [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([new AsyncRoute(
|
||||
{path: '/team/:id/...', loader: asyncTeamLoader, name: 'Team'})]))
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('nav to matias { }');
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('nav to matias [ ]');
|
||||
|
||||
rtr.subscribe((_: any /** TODO #9100 */) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement)
|
||||
.toHaveText('nav to matias { team angular | user { hello matias } }');
|
||||
.toHaveText('nav to matias [ team angular | user [ hello matias ] ]');
|
||||
expect(location.urlChanges).toEqual(['/team/angular/user/matias']);
|
||||
async.done();
|
||||
});
|
||||
|
@ -37,7 +37,7 @@ function auxRoutes() {
|
||||
inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(
|
||||
tcb,
|
||||
`main {<router-outlet></router-outlet>} | aux {<router-outlet name="modal"></router-outlet>}`)
|
||||
`main [<router-outlet></router-outlet>] | aux [<router-outlet name="modal"></router-outlet>]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([
|
||||
new Route({path: '/hello', component: HelloCmp, name: 'Hello'}),
|
||||
@ -46,7 +46,7 @@ function auxRoutes() {
|
||||
.then((_) => rtr.navigateByUrl('/(modal)'))
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('main {} | aux {modal}');
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('main [] | aux [modal]');
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
@ -55,7 +55,7 @@ function auxRoutes() {
|
||||
inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(
|
||||
tcb,
|
||||
`main {<router-outlet></router-outlet>} | aux {<router-outlet name="modal"></router-outlet>}`)
|
||||
`main [<router-outlet></router-outlet>] | aux [<router-outlet name="modal"></router-outlet>]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([
|
||||
new Route({path: '/hello', component: HelloCmp, name: 'Hello'}),
|
||||
@ -64,7 +64,7 @@ function auxRoutes() {
|
||||
.then((_) => rtr.navigate(['/', ['Modal']]))
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('main {} | aux {modal}');
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('main [] | aux [modal]');
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
@ -72,7 +72,7 @@ function auxRoutes() {
|
||||
it('should generate a link URL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(
|
||||
tcb,
|
||||
`<a [routerLink]="['/', ['Modal']]">open modal</a> | main {<router-outlet></router-outlet>} | aux {<router-outlet name="modal"></router-outlet>}`)
|
||||
`<a [routerLink]="['/', ['Modal']]">open modal</a> | main [<router-outlet></router-outlet>] | aux [<router-outlet name="modal"></router-outlet>]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([
|
||||
new Route({path: '/hello', component: HelloCmp, name: 'Hello'}),
|
||||
@ -91,7 +91,7 @@ function auxRoutes() {
|
||||
(async: AsyncTestCompleter, location: any /** TODO #9100 */) => {
|
||||
compile(
|
||||
tcb,
|
||||
`<a [routerLink]="['/', ['Modal']]">open modal</a> | <a [routerLink]="['/Hello']">hello</a> | main {<router-outlet></router-outlet>} | aux {<router-outlet name="modal"></router-outlet>}`)
|
||||
`<a [routerLink]="['/', ['Modal']]">open modal</a> | <a [routerLink]="['/Hello']">hello</a> | main [<router-outlet></router-outlet>] | aux [<router-outlet name="modal"></router-outlet>]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([
|
||||
new Route({path: '/hello', component: HelloCmp, name: 'Hello'}),
|
||||
@ -100,7 +100,7 @@ function auxRoutes() {
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement)
|
||||
.toHaveText('open modal | hello | main {} | aux {}');
|
||||
.toHaveText('open modal | hello | main [] | aux []');
|
||||
|
||||
var navCount = 0;
|
||||
|
||||
@ -109,7 +109,7 @@ function auxRoutes() {
|
||||
fixture.detectChanges();
|
||||
if (navCount == 1) {
|
||||
expect(fixture.debugElement.nativeElement)
|
||||
.toHaveText('open modal | hello | main {} | aux {modal}');
|
||||
.toHaveText('open modal | hello | main [] | aux [modal]');
|
||||
expect(location.urlChanges).toEqual(['/(modal)']);
|
||||
expect(getHref(getLinkElement(fixture, 0))).toEqual('/(modal)');
|
||||
expect(getHref(getLinkElement(fixture, 1))).toEqual('/hello(modal)');
|
||||
@ -118,7 +118,7 @@ function auxRoutes() {
|
||||
clickOnElement(getLinkElement(fixture, 1));
|
||||
} else if (navCount == 2) {
|
||||
expect(fixture.debugElement.nativeElement)
|
||||
.toHaveText('open modal | hello | main {hello} | aux {modal}');
|
||||
.toHaveText('open modal | hello | main [hello] | aux [modal]');
|
||||
expect(location.urlChanges).toEqual(['/(modal)', '/hello(modal)']);
|
||||
expect(getHref(getLinkElement(fixture, 0))).toEqual('/hello(modal)');
|
||||
expect(getHref(getLinkElement(fixture, 1))).toEqual('/hello(modal)');
|
||||
@ -150,7 +150,7 @@ function auxRoutesWithAPrimaryRoute() {
|
||||
inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(
|
||||
tcb,
|
||||
`main {<router-outlet></router-outlet>} | aux {<router-outlet name="modal"></router-outlet>}`)
|
||||
`main [<router-outlet></router-outlet>] | aux [<router-outlet name="modal"></router-outlet>]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([
|
||||
new Route({path: '/hello', component: HelloCmp, name: 'Hello'}),
|
||||
@ -159,7 +159,7 @@ function auxRoutesWithAPrimaryRoute() {
|
||||
.then((_) => rtr.navigateByUrl('/hello(modal)'))
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('main {hello} | aux {modal}');
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('main [hello] | aux [modal]');
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
@ -168,7 +168,7 @@ function auxRoutesWithAPrimaryRoute() {
|
||||
inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(
|
||||
tcb,
|
||||
`main {<router-outlet></router-outlet>} | aux {<router-outlet name="modal"></router-outlet>}`)
|
||||
`main [<router-outlet></router-outlet>] | aux [<router-outlet name="modal"></router-outlet>]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([
|
||||
new Route({path: '/hello', component: HelloCmp, name: 'Hello'}),
|
||||
@ -177,7 +177,7 @@ function auxRoutesWithAPrimaryRoute() {
|
||||
.then((_) => rtr.navigate(['/Hello', ['Modal']]))
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('main {hello} | aux {modal}');
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('main [hello] | aux [modal]');
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
@ -185,7 +185,7 @@ function auxRoutesWithAPrimaryRoute() {
|
||||
it('should generate a link URL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(
|
||||
tcb,
|
||||
`<a [routerLink]="['/Hello', ['Modal']]">open modal</a> | main {<router-outlet></router-outlet>} | aux {<router-outlet name="modal"></router-outlet>}`)
|
||||
`<a [routerLink]="['/Hello', ['Modal']]">open modal</a> | main [<router-outlet></router-outlet>] | aux [<router-outlet name="modal"></router-outlet>]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([
|
||||
new Route({path: '/hello', component: HelloCmp, name: 'Hello'}),
|
||||
@ -204,7 +204,7 @@ function auxRoutesWithAPrimaryRoute() {
|
||||
(async: AsyncTestCompleter, location: any /** TODO #9100 */) => {
|
||||
compile(
|
||||
tcb,
|
||||
`<a [routerLink]="['/Hello', ['Modal']]">open modal</a> | main {<router-outlet></router-outlet>} | aux {<router-outlet name="modal"></router-outlet>}`)
|
||||
`<a [routerLink]="['/Hello', ['Modal']]">open modal</a> | main [<router-outlet></router-outlet>] | aux [<router-outlet name="modal"></router-outlet>]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([
|
||||
new Route({path: '/hello', component: HelloCmp, name: 'Hello'}),
|
||||
@ -213,12 +213,12 @@ function auxRoutesWithAPrimaryRoute() {
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement)
|
||||
.toHaveText('open modal | main {} | aux {}');
|
||||
.toHaveText('open modal | main [] | aux []');
|
||||
|
||||
rtr.subscribe((_: any /** TODO #9100 */) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement)
|
||||
.toHaveText('open modal | main {hello} | aux {modal}');
|
||||
.toHaveText('open modal | main [hello] | aux [modal]');
|
||||
expect(location.urlChanges).toEqual(['/hello(modal)']);
|
||||
async.done();
|
||||
});
|
||||
@ -246,8 +246,8 @@ class ModalCmp {
|
||||
|
||||
@Component({
|
||||
selector: 'aux-cmp',
|
||||
template: 'main {<router-outlet></router-outlet>} | ' +
|
||||
'aux {<router-outlet name="modal"></router-outlet>}',
|
||||
template: 'main [<router-outlet></router-outlet>] | ' +
|
||||
'aux [<router-outlet name="modal"></router-outlet>]',
|
||||
directives: [ROUTER_DIRECTIVES],
|
||||
})
|
||||
@RouteConfig([
|
||||
|
@ -43,7 +43,7 @@ export function userCmpLoader() {
|
||||
|
||||
@Component({
|
||||
selector: 'parent-cmp',
|
||||
template: `inner { <router-outlet></router-outlet> }`,
|
||||
template: `inner [ <router-outlet></router-outlet> ]`,
|
||||
directives: [ROUTER_DIRECTIVES],
|
||||
})
|
||||
@RouteConfig([new Route({path: '/b', component: HelloCmp, name: 'Child'})])
|
||||
@ -57,7 +57,7 @@ export function parentCmpLoader() {
|
||||
|
||||
@Component({
|
||||
selector: 'parent-cmp',
|
||||
template: `inner { <router-outlet></router-outlet> }`,
|
||||
template: `inner [ <router-outlet></router-outlet> ]`,
|
||||
directives: [ROUTER_DIRECTIVES],
|
||||
})
|
||||
@RouteConfig([new AsyncRoute({path: '/b', loader: helloCmpLoader, name: 'Child'})])
|
||||
@ -70,7 +70,7 @@ export function asyncParentCmpLoader() {
|
||||
|
||||
@Component({
|
||||
selector: 'parent-cmp',
|
||||
template: `inner { <router-outlet></router-outlet> }`,
|
||||
template: `inner [ <router-outlet></router-outlet> ]`,
|
||||
directives: [ROUTER_DIRECTIVES],
|
||||
})
|
||||
@RouteConfig(
|
||||
@ -85,7 +85,7 @@ export function asyncDefaultParentCmpLoader() {
|
||||
|
||||
@Component({
|
||||
selector: 'parent-cmp',
|
||||
template: `inner { <router-outlet></router-outlet> }`,
|
||||
template: `inner [ <router-outlet></router-outlet> ]`,
|
||||
directives: [ROUTER_DIRECTIVES],
|
||||
})
|
||||
@RouteConfig([new Route({path: '/b', component: HelloCmp, name: 'Child', useAsDefault: true})])
|
||||
@ -99,7 +99,7 @@ export function parentWithDefaultCmpLoader() {
|
||||
|
||||
@Component({
|
||||
selector: 'team-cmp',
|
||||
template: `team {{id}} | user { <router-outlet></router-outlet> }`,
|
||||
template: `team {{id}} | user [ <router-outlet></router-outlet> ]`,
|
||||
directives: [ROUTER_DIRECTIVES],
|
||||
})
|
||||
@RouteConfig([new Route({path: '/user/:name', component: UserCmp, name: 'User'})])
|
||||
@ -110,7 +110,7 @@ export class TeamCmp {
|
||||
|
||||
@Component({
|
||||
selector: 'team-cmp',
|
||||
template: `team {{id}} | user { <router-outlet></router-outlet> }`,
|
||||
template: `team {{id}} | user [ <router-outlet></router-outlet> ]`,
|
||||
directives: [ROUTER_DIRECTIVES],
|
||||
})
|
||||
@RouteConfig([new AsyncRoute({path: '/user/:name', loader: userCmpLoader, name: 'User'})])
|
||||
@ -140,7 +140,7 @@ export class RedirectToParentCmp {
|
||||
}
|
||||
|
||||
|
||||
@Component({selector: 'dynamic-loader-cmp', template: `{ <div #viewport></div> }`})
|
||||
@Component({selector: 'dynamic-loader-cmp', template: `[ <div #viewport></div> ]`})
|
||||
@RouteConfig([new Route({path: '/', component: HelloCmp})])
|
||||
export class DynamicLoaderCmp {
|
||||
private _componentRef: ComponentRef<any> = null;
|
||||
|
@ -221,7 +221,7 @@ function syncRoutesWithSyncChildrenWithoutDefaultRoutesWithoutParams() {
|
||||
}));
|
||||
|
||||
it('should navigate by URL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(tcb, `outer { <router-outlet></router-outlet> }`)
|
||||
compile(tcb, `outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then(
|
||||
(_) =>
|
||||
@ -229,13 +229,13 @@ function syncRoutesWithSyncChildrenWithoutDefaultRoutesWithoutParams() {
|
||||
.then((_) => rtr.navigateByUrl('/a/b'))
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('outer { inner { hello } }');
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('outer [ inner [ hello ] ]');
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
|
||||
it('should navigate by link DSL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(tcb, `outer { <router-outlet></router-outlet> }`)
|
||||
compile(tcb, `outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then(
|
||||
(_) =>
|
||||
@ -243,7 +243,7 @@ function syncRoutesWithSyncChildrenWithoutDefaultRoutesWithoutParams() {
|
||||
.then((_) => rtr.navigate(['/Parent', 'Child']))
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('outer { inner { hello } }');
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('outer [ inner [ hello ] ]');
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
@ -251,7 +251,7 @@ function syncRoutesWithSyncChildrenWithoutDefaultRoutesWithoutParams() {
|
||||
it('should generate a link URL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(
|
||||
tcb,
|
||||
`<a [routerLink]="['Parent', 'Child']">nav to child</a> | outer { <router-outlet></router-outlet> }`)
|
||||
`<a [routerLink]="['Parent', 'Child']">nav to child</a> | outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then(
|
||||
(_) =>
|
||||
@ -269,18 +269,18 @@ function syncRoutesWithSyncChildrenWithoutDefaultRoutesWithoutParams() {
|
||||
(async: AsyncTestCompleter, location: any /** TODO #9100 */) => {
|
||||
compile(
|
||||
tcb,
|
||||
`<a [routerLink]="['Parent', 'Child']">nav to child</a> | outer { <router-outlet></router-outlet> }`)
|
||||
`<a [routerLink]="['Parent', 'Child']">nav to child</a> | outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([new Route(
|
||||
{path: '/a/...', component: ParentCmp, name: 'Parent'})]))
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('nav to child | outer { }');
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('nav to child | outer [ ]');
|
||||
|
||||
rtr.subscribe((_: any /** TODO #9100 */) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement)
|
||||
.toHaveText('nav to child | outer { inner { hello } }');
|
||||
.toHaveText('nav to child | outer [ inner [ hello ] ]');
|
||||
expect(location.urlChanges).toEqual(['/a/b']);
|
||||
async.done();
|
||||
});
|
||||
@ -306,7 +306,7 @@ function syncRoutesWithSyncChildrenWithoutDefaultRoutesWithParams() {
|
||||
}));
|
||||
|
||||
it('should navigate by URL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(tcb, `{ <router-outlet></router-outlet> }`)
|
||||
compile(tcb, `[ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([new Route(
|
||||
{path: '/team/:id/...', component: TeamCmp, name: 'Team'})]))
|
||||
@ -314,13 +314,13 @@ function syncRoutesWithSyncChildrenWithoutDefaultRoutesWithParams() {
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement)
|
||||
.toHaveText('{ team angular | user { hello matias } }');
|
||||
.toHaveText('[ team angular | user [ hello matias ] ]');
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
|
||||
it('should navigate by link DSL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(tcb, `{ <router-outlet></router-outlet> }`)
|
||||
compile(tcb, `[ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([new Route(
|
||||
{path: '/team/:id/...', component: TeamCmp, name: 'Team'})]))
|
||||
@ -328,7 +328,7 @@ function syncRoutesWithSyncChildrenWithoutDefaultRoutesWithParams() {
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement)
|
||||
.toHaveText('{ team angular | user { hello matias } }');
|
||||
.toHaveText('[ team angular | user [ hello matias ] ]');
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
@ -336,7 +336,7 @@ function syncRoutesWithSyncChildrenWithoutDefaultRoutesWithParams() {
|
||||
it('should generate a link URL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(
|
||||
tcb,
|
||||
`<a [routerLink]="['/Team', {id: 'angular'}, 'User', {name: 'matias'}]">nav to matias</a> { <router-outlet></router-outlet> }`)
|
||||
`<a [routerLink]="['/Team', {id: 'angular'}, 'User', {name: 'matias'}]">nav to matias</a> [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([new Route(
|
||||
{path: '/team/:id/...', component: TeamCmp, name: 'Team'})]))
|
||||
@ -353,18 +353,18 @@ function syncRoutesWithSyncChildrenWithoutDefaultRoutesWithParams() {
|
||||
(async: AsyncTestCompleter, location: any /** TODO #9100 */) => {
|
||||
compile(
|
||||
tcb,
|
||||
`<a [routerLink]="['/Team', {id: 'angular'}, 'User', {name: 'matias'}]">nav to matias</a> { <router-outlet></router-outlet> }`)
|
||||
`<a [routerLink]="['/Team', {id: 'angular'}, 'User', {name: 'matias'}]">nav to matias</a> [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([new Route(
|
||||
{path: '/team/:id/...', component: TeamCmp, name: 'Team'})]))
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('nav to matias { }');
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('nav to matias [ ]');
|
||||
|
||||
rtr.subscribe((_: any /** TODO #9100 */) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement)
|
||||
.toHaveText('nav to matias { team angular | user { hello matias } }');
|
||||
.toHaveText('nav to matias [ team angular | user [ hello matias ] ]');
|
||||
expect(location.urlChanges).toEqual(['/team/angular/user/matias']);
|
||||
async.done();
|
||||
});
|
||||
@ -390,27 +390,27 @@ function syncRoutesWithSyncChildrenWithDefaultRoutesWithoutParams() {
|
||||
}));
|
||||
|
||||
it('should navigate by URL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(tcb, `outer { <router-outlet></router-outlet> }`)
|
||||
compile(tcb, `outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([new Route(
|
||||
{path: '/a/...', component: ParentWithDefaultCmp, name: 'Parent'})]))
|
||||
.then((_) => rtr.navigateByUrl('/a'))
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('outer { inner { hello } }');
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('outer [ inner [ hello ] ]');
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
|
||||
it('should navigate by link DSL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(tcb, `outer { <router-outlet></router-outlet> }`)
|
||||
compile(tcb, `outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([new Route(
|
||||
{path: '/a/...', component: ParentWithDefaultCmp, name: 'Parent'})]))
|
||||
.then((_) => rtr.navigate(['/Parent']))
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('outer { inner { hello } }');
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('outer [ inner [ hello ] ]');
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
@ -418,7 +418,7 @@ function syncRoutesWithSyncChildrenWithDefaultRoutesWithoutParams() {
|
||||
it('should generate a link URL', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
compile(
|
||||
tcb,
|
||||
`<a [routerLink]="['/Parent']">link to inner</a> | outer { <router-outlet></router-outlet> }`)
|
||||
`<a [routerLink]="['/Parent']">link to inner</a> | outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([new Route(
|
||||
{path: '/a/...', component: ParentWithDefaultCmp, name: 'Parent'})]))
|
||||
@ -435,19 +435,19 @@ function syncRoutesWithSyncChildrenWithDefaultRoutesWithoutParams() {
|
||||
(async: AsyncTestCompleter, location: any /** TODO #9100 */) => {
|
||||
compile(
|
||||
tcb,
|
||||
`<a [routerLink]="['/Parent']">link to inner</a> | outer { <router-outlet></router-outlet> }`)
|
||||
`<a [routerLink]="['/Parent']">link to inner</a> | outer [ <router-outlet></router-outlet> ]`)
|
||||
.then((rtc) => {fixture = rtc})
|
||||
.then((_) => rtr.config([new Route(
|
||||
{path: '/a/...', component: ParentWithDefaultCmp, name: 'Parent'})]))
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement)
|
||||
.toHaveText('link to inner | outer { }');
|
||||
.toHaveText('link to inner | outer [ ]');
|
||||
|
||||
rtr.subscribe((_: any /** TODO #9100 */) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement)
|
||||
.toHaveText('link to inner | outer { inner { hello } }');
|
||||
.toHaveText('link to inner | outer [ inner [ hello ] ]');
|
||||
expect(location.urlChanges).toEqual(['/a/b']);
|
||||
async.done();
|
||||
});
|
||||
@ -481,7 +481,7 @@ function syncRoutesWithDynamicComponents() {
|
||||
.then((_) => rtr.config([new Route({path: '/', component: HelloCmp})]))
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('{ }');
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('[ ]');
|
||||
return fixture.componentInstance.onSomeAction();
|
||||
})
|
||||
.then((_) => {
|
||||
@ -490,7 +490,7 @@ function syncRoutesWithDynamicComponents() {
|
||||
})
|
||||
.then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('{ hello }');
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('[ hello ]');
|
||||
|
||||
return fixture.componentInstance.onSomeAction();
|
||||
})
|
||||
@ -502,7 +502,7 @@ function syncRoutesWithDynamicComponents() {
|
||||
// stable and we don't know when that is, only zones know.
|
||||
PromiseWrapper.resolve(null).then((_) => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('{ hello }');
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('[ hello ]');
|
||||
async.done();
|
||||
});
|
||||
})}));
|
||||
|
Reference in New Issue
Block a user