fix(projection): allow to project to a non text node

We already had a test for this, but too low level that it did not catch this null value in `hasNativeShadowRoot`

Fixes #3230
Closes #3241
This commit is contained in:
Tobias Bosch
2015-07-23 12:02:40 -07:00
parent 5ec67ee2a7
commit b44b06c2c9
3 changed files with 22 additions and 2 deletions

View File

@ -73,6 +73,25 @@ export function main() {
});
}));
it('should support projecting text interpolation to a non bound element',
inject([TestComponentBuilder, AsyncTestCompleter], (tcb: TestComponentBuilder, async) => {
tcb.overrideView(
Simple,
new viewAnn.View(
{template: 'SIMPLE(<div><ng-content></ng-content></div>)', directives: []}))
.overrideView(
MainComp,
new viewAnn.View({template: '<simple>{{text}}</simple>', directives: [Simple]}))
.createAsync(MainComp)
.then((main) => {
main.componentInstance.text = 'A';
main.detectChanges();
expect(main.nativeElement).toHaveText('SIMPLE(A)');
async.done();
});
}));
it('should not show the light dom even if there is no content tag',
inject([TestComponentBuilder, AsyncTestCompleter], (tcb: TestComponentBuilder, async) => {
tcb.overrideView(MainComp,