perf(ivy): split view processing into render (create) and refresh (update) pass (#32020)

PR Close #32020
This commit is contained in:
Pawel Kozlowski
2019-08-02 16:43:10 +02:00
committed by Kara Erickson
parent 4d96cf5197
commit b9dfe66028
14 changed files with 247 additions and 274 deletions

View File

@ -61,6 +61,22 @@ describe('ViewContainerRef', () => {
expect(fixture.componentInstance.foo).toBeAnInstanceOf(TemplateRef);
});
it('should construct proper TNode / DOM tree when embedded views are created in a directive constructor',
() => {
@Component({
selector: 'view-insertion-test-cmpt',
template:
`<div>before<ng-template constructorDir><span>|middle|</span></ng-template>after</div>`
})
class ViewInsertionTestCmpt {
}
TestBed.configureTestingModule({declarations: [ViewInsertionTestCmpt, ConstructorDir]});
const fixture = TestBed.createComponent(ViewInsertionTestCmpt);
expect(fixture.nativeElement).toHaveText('before|middle|after');
});
it('should use comment node of host ng-container as insertion marker', () => {
@Component({template: 'hello'})
class HelloComp {