refactor(ivy): insert embedded views immediately (#24629)

PR Close #24629
This commit is contained in:
Marc Laval
2018-06-22 15:37:38 +02:00
committed by Miško Hevery
parent 6e20e0aac8
commit f229449c67
7 changed files with 171 additions and 81 deletions

View File

@ -261,6 +261,11 @@ describe('ViewContainerRef', () => {
insertTpl(ctx: {}) { this._vcRef.createEmbeddedView(this._tplRef, ctx); }
insertTpl2(ctx: {}) {
const viewRef = this._tplRef.createEmbeddedView(ctx);
this._vcRef.insert(viewRef);
}
remove(index?: number) { this._vcRef.remove(index); }
}
@ -327,7 +332,7 @@ describe('ViewContainerRef', () => {
fixture.update();
expect(fixture.html).toEqual('before|A|after');
directiveInstance !.insertTpl({});
directiveInstance !.insertTpl2({});
expect(fixture.html).toEqual('before|AA|after');
fixture.component.condition = true;