refactor(ivy): insert embedded views immediately (#24629)
PR Close #24629
This commit is contained in:
@ -57,10 +57,10 @@
|
||||
"name": "RENDERER"
|
||||
},
|
||||
{
|
||||
"name": "ROOT_DIRECTIVE_INDICES"
|
||||
"name": "RENDER_PARENT"
|
||||
},
|
||||
{
|
||||
"name": "SANITIZER"
|
||||
"name": "ROOT_DIRECTIVE_INDICES"
|
||||
},
|
||||
{
|
||||
"name": "TVIEW"
|
||||
@ -156,7 +156,7 @@
|
||||
"name": "firstTemplatePass"
|
||||
},
|
||||
{
|
||||
"name": "getCurrentSanitizer"
|
||||
"name": "getChildLNode"
|
||||
},
|
||||
{
|
||||
"name": "getDirectiveInstance"
|
||||
|
@ -83,6 +83,9 @@
|
||||
{
|
||||
"name": "RENDERER"
|
||||
},
|
||||
{
|
||||
"name": "RENDER_PARENT"
|
||||
},
|
||||
{
|
||||
"name": "ROOT_DIRECTIVE_INDICES"
|
||||
},
|
||||
@ -335,6 +338,9 @@
|
||||
{
|
||||
"name": "generatePropertyAliases"
|
||||
},
|
||||
{
|
||||
"name": "getChildLNode"
|
||||
},
|
||||
{
|
||||
"name": "getCleanup"
|
||||
},
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user