refactor(ivy): separate container into 2 instructions (#25509)

PR Close #25509
This commit is contained in:
Kara Erickson
2018-08-15 18:37:03 -07:00
committed by Jason Aden
parent abcc430310
commit 6482f6f0fe
26 changed files with 228 additions and 208 deletions

View File

@ -648,7 +648,7 @@ describe('compiler compliance', () => {
template: function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵelementStart(0, "ul", null, $c1$);
$r3$container(2, MyComponent_li_Template_2, null, $c2$);
$r3$template(2, MyComponent_li_Template_2, null, $c2$);
$r3$.ɵelementEnd();
}
},
@ -1345,7 +1345,7 @@ describe('compiler compliance', () => {
if (rf & 1) {
$r3$.ɵelementStart(0, "div");
$r3$.ɵtext(1);
$r3$container(2, MyComponent_div_span_Template_2, null, $c2$);
$r3$template(2, MyComponent_div_span_Template_2, null, $c2$);
$r3$.ɵelement(3, "span", null, $c4$);
$r3$.ɵelementEnd();
}
@ -1366,7 +1366,7 @@ describe('compiler compliance', () => {
if (rf & 1) {
$r3$.ɵelement(0, "div", null, $c1$);
$r3$.ɵtext(2);
$r3$container(3, MyComponent_div_Template_3, null, $c2$);
$r3$template(3, MyComponent_div_Template_3, null, $c2$);
$r3$.ɵelement(4, "div", null, $c3$);
}
if (rf & 2) {
@ -1430,7 +1430,7 @@ describe('compiler compliance', () => {
if (rf & 1) {
$i0$.ɵelementStart(0, "div");
$i0$.ɵelement(1, "div", null, $c1$);
$i0$container(3, MyComponent_div_span_Template_3, null, $c2$);
$i0$template(3, MyComponent_div_span_Template_3, null, $c2$);
$i0$.ɵelementEnd();
}
if (rf & 2) {
@ -1442,7 +1442,7 @@ describe('compiler compliance', () => {
// ...
template:function MyComponent_Template(rf, ctx){
if (rf & 1) {
$i0$container(0, MyComponent_div_Template_0, null, $c0$);
$i0$template(0, MyComponent_div_Template_0, null, $c0$);
}
if (rf & 2) {
$i0$.ɵelementProperty(0, "ngForOf", $i0$.ɵbind(ctx.items));
@ -1647,7 +1647,7 @@ describe('compiler compliance', () => {
if (rf & 1) {
$r3$.ɵnamespaceSVG();
$r3$.ɵelementStart(0,"svg");
$r3$container(1,MyComponent__svg_g_Template_1,null,$_c0$);
$r3$template(1,MyComponent__svg_g_Template_1,null,$_c0$);
$r3$.ɵelementEnd();
}
if (rf & 2) { $r3$.ɵelementProperty(1,"forOf",$r3$.ɵbind(ctx.items)); }
@ -1723,7 +1723,7 @@ describe('compiler compliance', () => {
template: function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵelementStart(0, "ul");
$r3$container(1, MyComponent_li_Template_1, null, $_c0$);
$r3$template(1, MyComponent_li_Template_1, null, $_c0$);
$r3$.ɵelementEnd();
}
if (rf & 2) {
@ -1801,7 +1801,7 @@ describe('compiler compliance', () => {
$r3$.ɵtext(2);
$r3$.ɵelementEnd();
$r3$.ɵelementStart(3, "ul");
$r3$container(4, MyComponent_li_li_Template_4, null, $c1$);
$r3$template(4, MyComponent_li_li_Template_4, null, $c1$);
$r3$.ɵelementEnd();
$r3$.ɵelementEnd();
}
@ -1821,7 +1821,7 @@ describe('compiler compliance', () => {
template: function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵelementStart(0, "ul");
$r3$container(1, MyComponent_li_Template_1, null, $c1$);
$r3$template(1, MyComponent_li_Template_1, null, $c1$);
$r3$.ɵelementEnd();
}
if (rf & 2) {

View File

@ -112,7 +112,7 @@ describe('compiler compliance: listen()', () => {
// ...
template: function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$container(0, MyComponent_div_Template_0, null, $c0$);
$r3$template(0, MyComponent_div_Template_0, null, $c0$);
}
if (rf & 2) {
$i0$.ɵelementProperty(0, "ngIf", $i0$.ɵbind(ctx.showing));

View File

@ -81,7 +81,7 @@ describe('compiler compliance: template', () => {
function MyComponent_ul_li_Template_1(rf, ctx) {
if (rf & 1) {
$i0$.ɵelementStart(0, "li");
$i0$container(1, MyComponent_ul_li_div_Template_1, null, _c0);
$i0$template(1, MyComponent_ul_li_div_Template_1, null, _c0);
$i0$.ɵelementEnd();
}
if (rf & 2) {
@ -93,7 +93,7 @@ describe('compiler compliance: template', () => {
function MyComponent_ul_Template_0(rf, ctx) {
if (rf & 1) {
$i0$.ɵelementStart(0, "ul");
$i0$container(1, MyComponent_ul_li_Template_1, null, _c0);
$i0$template(1, MyComponent_ul_li_Template_1, null, _c0);
$i0$.ɵelementEnd();
}
if (rf & 2) {
@ -104,7 +104,7 @@ describe('compiler compliance: template', () => {
// ...
template:function MyComponent_Template(rf, ctx){
if (rf & 1) {
$i0$container(0, MyComponent_ul_Template_0, null, _c0);
$i0$template(0, MyComponent_ul_Template_0, null, _c0);
}
if (rf & 2) {
$i0$.ɵelementProperty(0, "ngForOf", $i0$.ɵbind(ctx.items));
@ -155,7 +155,7 @@ describe('compiler compliance: template', () => {
// ...
template:function MyComponent_Template(rf, ctx){
if (rf & 1) {
$i0$container(0, MyComponent_span_Template_0, null, _c0);
$i0$template(0, MyComponent_span_Template_0, null, _c0);
}
if (rf & 2) {
$i0$.ɵelementProperty(0, "ngForOf", $i0$.ɵbind(ctx.items));
@ -211,7 +211,7 @@ describe('compiler compliance: template', () => {
function MyComponent_div_Template_0(rf, ctx) {
if (rf & 1) {
$i0$.ɵelementStart(0, "div");
$i0$container(1, MyComponent_div_span_Template_1, null, $c1$);
$i0$template(1, MyComponent_div_span_Template_1, null, $c1$);
$i0$.ɵelementEnd();
}
if (rf & 2) {
@ -223,7 +223,7 @@ describe('compiler compliance: template', () => {
// ...
template:function MyComponent_Template(rf, ctx){
if (rf & 1) {
$i0$container(0, MyComponent_div_Template_0, null, $c0$);
$i0$template(0, MyComponent_div_Template_0, null, $c0$);
}
if (rf & 2) {
$i0$.ɵelementProperty(0, "ngForOf", $i0$.ɵbind(ctx.items));
@ -279,7 +279,7 @@ describe('compiler compliance: template', () => {
function MyComponent_div_div_Template_1(rf, ctx) {
if (rf & 1) {
$i0$.ɵelementStart(0, "div");
$i0$container(1, MyComponent_div_div_div_Template_1, null, _c0);
$i0$template(1, MyComponent_div_div_div_Template_1, null, _c0);
$i0$.ɵelementEnd();
}
if (rf & 2) {
@ -291,7 +291,7 @@ describe('compiler compliance: template', () => {
function MyComponent_div_Template_0(rf, ctx) {
if (rf & 1) {
$i0$.ɵelementStart(0, "div");
$i0$container(1, MyComponent_div_div_Template_1, null, _c0);
$i0$template(1, MyComponent_div_div_Template_1, null, _c0);
$i0$.ɵelementEnd();
}
if (rf & 2) {
@ -302,7 +302,7 @@ describe('compiler compliance: template', () => {
// ...
template:function MyComponent_Template(rf, ctx){
if (rf & 1) {
$i0$container(0, MyComponent_div_Template_0, null, _c0);
$i0$template(0, MyComponent_div_Template_0, null, _c0);
}
if (rf & 2) {
$i0$.ɵelementProperty(0, "ngForOf", $i0$.ɵbind(ctx.items));
@ -348,7 +348,7 @@ describe('compiler compliance: template', () => {
template: function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$i0$container(0, Template_0, null, $c0$);
$i0$template(0, Template_0, null, $c0$);
}
if (rf & 2) {
$i0$.ɵelementProperty(0, "boundAttr", $i0$.ɵbind(ctx.b));