refactor(ivy): generate vars in component defs (#25562)
PR Close #25562
This commit is contained in:

committed by
Jason Aden

parent
d2be3d5775
commit
21a14407f6
@ -33,6 +33,7 @@ describe('components & directives', () => {
|
||||
selectors: [['child']],
|
||||
factory: function ChildComponent_Factory() { return new ChildComponent(); },
|
||||
consts: 1,
|
||||
vars: 0,
|
||||
template: function ChildComponent_Template(rf: $RenderFlags$, ctx: $ChildComponent$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵtext(0, 'child-view');
|
||||
@ -69,6 +70,7 @@ describe('components & directives', () => {
|
||||
selectors: [['my-component']],
|
||||
factory: () => new MyComponent(),
|
||||
consts: 2,
|
||||
vars: 0,
|
||||
template: function(rf: $RenderFlags$, ctx: $MyComponent$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelement(0, 'child', $e0_attrs$);
|
||||
@ -123,6 +125,7 @@ describe('components & directives', () => {
|
||||
selectors: [['my-app']],
|
||||
factory: function MyApp_Factory() { return new MyApp(); },
|
||||
consts: 1,
|
||||
vars: 0,
|
||||
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelement(0, 'div', $e0_attrs$);
|
||||
@ -175,6 +178,7 @@ describe('components & directives', () => {
|
||||
selectors: [['my-app']],
|
||||
factory: function MyApp_Factory() { return new MyApp(); },
|
||||
consts: 2,
|
||||
vars: 0,
|
||||
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementStart(0, 'button', $e0_attrs$);
|
||||
@ -223,6 +227,7 @@ describe('components & directives', () => {
|
||||
selectors: [['my-app']],
|
||||
factory: function MyApp_Factory() { return new MyApp(); },
|
||||
consts: 1,
|
||||
vars: 0,
|
||||
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelement(0, 'div', $e0_attrs$);
|
||||
@ -274,6 +279,7 @@ describe('components & directives', () => {
|
||||
selectors: [['my-app']],
|
||||
factory: function MyApp_Factory() { return new MyApp(); },
|
||||
consts: 1,
|
||||
vars: 0,
|
||||
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelement(0, 'div', $e0_attrs$);
|
||||
@ -311,11 +317,14 @@ describe('components & directives', () => {
|
||||
selectors: [['my-comp']],
|
||||
factory: function MyComp_Factory() { return new MyComp(); },
|
||||
consts: 1,
|
||||
vars: 1,
|
||||
template: function MyComp_Template(rf: $RenderFlags$, ctx: $MyComp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵtext(0);
|
||||
}
|
||||
$r3$.ɵtextBinding(0, $r3$.ɵbind(ctx.name));
|
||||
if (rf & 2) {
|
||||
$r3$.ɵtextBinding(0, $r3$.ɵbind(ctx.name));
|
||||
}
|
||||
},
|
||||
inputs: {name: 'name'},
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
@ -337,6 +346,7 @@ describe('components & directives', () => {
|
||||
selectors: [['my-app']],
|
||||
factory: function MyApp_Factory() { return new MyApp(); },
|
||||
consts: 1,
|
||||
vars: 1,
|
||||
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelement(0, 'my-comp');
|
||||
@ -402,10 +412,11 @@ describe('components & directives', () => {
|
||||
selectors: [['my-component']],
|
||||
factory: () => new MyComponent(),
|
||||
consts: 3,
|
||||
vars: 0,
|
||||
template: function(rf: $RenderFlags$, ctx: $MyComponent$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementStart(0, 'ul', null, $e0_locals$);
|
||||
$r3$.ɵtemplate(2, C1, 2, '', ['if', '']);
|
||||
$r3$.ɵtemplate(2, C1, 2, 1, '', ['if', '']);
|
||||
$r3$.ɵelementEnd();
|
||||
}
|
||||
}
|
||||
@ -435,6 +446,7 @@ describe('components & directives', () => {
|
||||
selectors: [['my-array-comp']],
|
||||
factory: function MyArrayComp_Factory() { return new MyArrayComp(); },
|
||||
consts: 1,
|
||||
vars: 1,
|
||||
template: function MyArrayComp_Template(rf: $RenderFlags$, ctx: $MyArrayComp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵtext(0);
|
||||
@ -467,6 +479,7 @@ describe('components & directives', () => {
|
||||
selectors: [['my-app']],
|
||||
factory: function MyApp_Factory() { return new MyApp(); },
|
||||
consts: 1,
|
||||
vars: 1,
|
||||
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelement(0, 'my-array-comp');
|
||||
@ -512,6 +525,7 @@ describe('components & directives', () => {
|
||||
selectors: [['my-app']],
|
||||
factory: function MyApp_Factory() { return new MyApp(); },
|
||||
consts: 1,
|
||||
vars: 2,
|
||||
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelement(0, 'my-array-comp');
|
||||
@ -547,6 +561,7 @@ describe('components & directives', () => {
|
||||
selectors: [['my-comp']],
|
||||
factory: function MyComp_Factory() { return new MyComp(); },
|
||||
consts: 1,
|
||||
vars: 1,
|
||||
template: function MyComp_Template(rf: $RenderFlags$, ctx: $MyComp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵtext(0);
|
||||
@ -580,6 +595,7 @@ describe('components & directives', () => {
|
||||
selectors: [['my-app']],
|
||||
factory: function MyApp_Factory() { return new MyApp(); },
|
||||
consts: 1,
|
||||
vars: 2,
|
||||
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelement(0, 'my-comp');
|
||||
@ -624,13 +640,14 @@ describe('components & directives', () => {
|
||||
selectors: [['my-app']],
|
||||
factory: function MyApp_Factory() { return new MyApp(); },
|
||||
consts: 1,
|
||||
vars: 3,
|
||||
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelement(0, 'my-array-comp');
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵelementProperty(
|
||||
0, 'names', $r3$.ɵbind($r3$.ɵpureFunction1(2, $e0_ff$, ctx.customName)));
|
||||
0, 'names', $r3$.ɵbind($r3$.ɵpureFunction1(1, $e0_ff$, ctx.customName)));
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -673,6 +690,7 @@ describe('components & directives', () => {
|
||||
selectors: [['my-comp']],
|
||||
factory: function MyComp_Factory() { return new MyComp(); },
|
||||
consts: 12,
|
||||
vars: 12,
|
||||
template: function MyComp_Template(rf: $RenderFlags$, ctx: $MyComp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵtext(0);
|
||||
@ -737,6 +755,7 @@ describe('components & directives', () => {
|
||||
selectors: [['my-app']],
|
||||
factory: function MyApp_Factory() { return new MyApp(); },
|
||||
consts: 1,
|
||||
vars: 10,
|
||||
template: function MyApp_Template(rf: $RenderFlags$, c: $any$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelement(0, 'my-comp');
|
||||
@ -745,7 +764,7 @@ describe('components & directives', () => {
|
||||
$r3$.ɵelementProperty(
|
||||
0, 'names',
|
||||
$r3$.ɵbind($r3$.ɵpureFunctionV(
|
||||
10, $e0_ff$, [c.n0, c.n1, c.n2, c.n3, c.n4, c.n5, c.n6, c.n7, c.n8])));
|
||||
1, $e0_ff$, [c.n0, c.n1, c.n2, c.n3, c.n4, c.n5, c.n6, c.n7, c.n8])));
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -780,6 +799,7 @@ describe('components & directives', () => {
|
||||
selectors: [['object-comp']],
|
||||
factory: function ObjectComp_Factory() { return new ObjectComp(); },
|
||||
consts: 4,
|
||||
vars: 2,
|
||||
template: function ObjectComp_Template(rf: $RenderFlags$, ctx: $ObjectComp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementStart(0, 'p');
|
||||
@ -817,13 +837,14 @@ describe('components & directives', () => {
|
||||
selectors: [['my-app']],
|
||||
factory: function MyApp_Factory() { return new MyApp(); },
|
||||
consts: 1,
|
||||
vars: 3,
|
||||
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelement(0, 'object-comp');
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵelementProperty(
|
||||
0, 'config', $r3$.ɵbind($r3$.ɵpureFunction1(2, $e0_ff$, ctx.name)));
|
||||
0, 'config', $r3$.ɵbind($r3$.ɵpureFunction1(1, $e0_ff$, ctx.name)));
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -859,6 +880,7 @@ describe('components & directives', () => {
|
||||
selectors: [['nested-comp']],
|
||||
factory: function NestedComp_Factory() { return new NestedComp(); },
|
||||
consts: 6,
|
||||
vars: 3,
|
||||
template: function NestedComp_Template(rf: $RenderFlags$, ctx: $NestedComp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementStart(0, 'p');
|
||||
@ -905,6 +927,7 @@ describe('components & directives', () => {
|
||||
selectors: [['my-app']],
|
||||
factory: function MyApp_Factory() { return new MyApp(); },
|
||||
consts: 1,
|
||||
vars: 8,
|
||||
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelement(0, 'nested-comp');
|
||||
@ -913,9 +936,9 @@ describe('components & directives', () => {
|
||||
$r3$.ɵelementProperty(
|
||||
0, 'config',
|
||||
$r3$.ɵbind($r3$.ɵpureFunction2(
|
||||
7, $e0_ff_2$, ctx.name,
|
||||
5, $e0_ff_2$, ctx.name,
|
||||
$r3$.ɵpureFunction1(
|
||||
4, $e0_ff_1$, $r3$.ɵpureFunction1(2, $e0_ff$, ctx.duration)))));
|
||||
3, $e0_ff_1$, $r3$.ɵpureFunction1(1, $e0_ff$, ctx.duration)))));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -26,6 +26,7 @@ describe('content projection', () => {
|
||||
selectors: [['simple']],
|
||||
factory: () => new SimpleComponent(),
|
||||
consts: 1,
|
||||
vars: 0,
|
||||
template: function(rf: $RenderFlags$, ctx: $SimpleComponent$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵprojectionDef();
|
||||
@ -56,6 +57,7 @@ describe('content projection', () => {
|
||||
selectors: [['complex']],
|
||||
factory: () => new ComplexComponent(),
|
||||
consts: 4,
|
||||
vars: 0,
|
||||
template: function(rf: $RenderFlags$, ctx: $ComplexComponent$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵprojectionDef($pD_0P$, $pD_0R$);
|
||||
@ -80,6 +82,7 @@ describe('content projection', () => {
|
||||
selectors: [['my-app']],
|
||||
factory: () => new MyApp(),
|
||||
consts: 2,
|
||||
vars: 0,
|
||||
template: function(rf: $RenderFlags$, ctx: $MyApp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementStart(0, 'simple');
|
||||
|
@ -38,6 +38,7 @@ describe('elements', () => {
|
||||
selectors: [['my-component']],
|
||||
factory: () => new MyComponent(),
|
||||
consts: 5,
|
||||
vars: 0,
|
||||
template: function(rf: $RenderFlags$, ctx: $MyComponent$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementStart(0, 'div', $e0_attrs$);
|
||||
@ -90,16 +91,15 @@ describe('elements', () => {
|
||||
selectors: [['local-ref-comp']],
|
||||
factory: function LocalRefComp_Factory() { return new LocalRefComp(); },
|
||||
consts: 4,
|
||||
vars: 1,
|
||||
template: function LocalRefComp_Template(rf: $RenderFlags$, ctx: $LocalRefComp$) {
|
||||
let $tmp$: any;
|
||||
let $tmp_2$: any;
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelement(0, 'div', $e0_attrs$, $e0_locals$);
|
||||
$r3$.ɵtext(3);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$tmp$ = $r3$.ɵload(1);
|
||||
$tmp_2$ = $r3$.ɵload(2);
|
||||
const $tmp$ = $r3$.ɵreference(1) as any;
|
||||
const $tmp_2$ = $r3$.ɵreference(2) as any;
|
||||
$r3$.ɵtextBinding(
|
||||
3, $r3$.ɵinterpolation2(' ', $tmp$.value, ' - ', $tmp_2$.tagName, ''));
|
||||
}
|
||||
@ -136,6 +136,7 @@ describe('elements', () => {
|
||||
selectors: [['listener-comp']],
|
||||
factory: function ListenerComp_Factory() { return new ListenerComp(); },
|
||||
consts: 1,
|
||||
vars: 0,
|
||||
template: function ListenerComp_Template(rf: $RenderFlags$, ctx: $ListenerComp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementStart(0, 'button');
|
||||
@ -192,6 +193,7 @@ describe('elements', () => {
|
||||
selectors: [['my-component']],
|
||||
factory: () => new MyComponent(),
|
||||
consts: 5,
|
||||
vars: 0,
|
||||
template: function(rf: $RenderFlags$, ctx: $MyComponent$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementStart(0, 'div', $e0_attrs$);
|
||||
@ -225,6 +227,7 @@ describe('elements', () => {
|
||||
selectors: [['my-component']],
|
||||
factory: function MyComponent_Factory() { return new MyComponent(); },
|
||||
consts: 1,
|
||||
vars: 1,
|
||||
template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelement(0, 'div');
|
||||
@ -257,6 +260,7 @@ describe('elements', () => {
|
||||
selectors: [['my-component']],
|
||||
factory: function MyComponent_Factory() { return new MyComponent(); },
|
||||
consts: 1,
|
||||
vars: 1,
|
||||
template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelement(0, 'div');
|
||||
@ -290,6 +294,7 @@ describe('elements', () => {
|
||||
selectors: [['my-component']],
|
||||
factory: function MyComponent_Factory() { return new MyComponent(); },
|
||||
consts: 1,
|
||||
vars: 0,
|
||||
template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementStart(0, 'div');
|
||||
@ -330,6 +335,7 @@ describe('elements', () => {
|
||||
selectors: [['my-component']],
|
||||
factory: function MyComponent_Factory() { return new MyComponent(); },
|
||||
consts: 1,
|
||||
vars: 0,
|
||||
template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementStart(0, 'div');
|
||||
@ -382,6 +388,7 @@ describe('elements', () => {
|
||||
selectors: [['my-component']],
|
||||
factory: function MyComponent_Factory() { return new MyComponent(); },
|
||||
consts: 1,
|
||||
vars: 1,
|
||||
template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementStart(0, 'div');
|
||||
@ -421,6 +428,7 @@ describe('elements', () => {
|
||||
selectors: [['style-comp']],
|
||||
factory: function StyleComponent_Factory() { return new StyleComponent(); },
|
||||
consts: 1,
|
||||
vars: 0,
|
||||
template: function StyleComponent_Template(rf: $RenderFlags$, ctx: $StyleComponent$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementStart(0, 'div');
|
||||
|
@ -27,6 +27,7 @@ describe('i18n', () => {
|
||||
selectors: [['my-app']],
|
||||
factory: () => new MyApp(),
|
||||
consts: 2,
|
||||
vars: 0,
|
||||
template: function(rf: $RenderFlags$, ctx: $MyApp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementStart(0, 'div');
|
||||
@ -53,6 +54,7 @@ describe('i18n', () => {
|
||||
selectors: [['my-app']],
|
||||
factory: () => new MyApp(),
|
||||
consts: 2,
|
||||
vars: 1,
|
||||
template: function(rf: $RenderFlags$, ctx: $MyApp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementStart(0, 'div');
|
||||
@ -81,6 +83,7 @@ describe('i18n', () => {
|
||||
selectors: [['my-app']],
|
||||
factory: () => new MyApp(),
|
||||
consts: 2,
|
||||
vars: 1,
|
||||
template: function(rf: $RenderFlags$, ctx: $MyApp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementStart(0, 'div');
|
||||
@ -125,10 +128,11 @@ describe('i18n', () => {
|
||||
factory: () => new MyApp(),
|
||||
selectors: [['my-app']],
|
||||
consts: 2,
|
||||
vars: 1,
|
||||
template: (rf: $RenderFlags$, myApp: $MyApp$) => {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementStart(0, 'ul');
|
||||
$r3$.ɵtemplate(1, liTemplate, 2, null, ['ngForOf', '']);
|
||||
$r3$.ɵtemplate(1, liTemplate, 2, 1, null, ['ngForOf', '']);
|
||||
$r3$.ɵelementEnd();
|
||||
$r3$.ɵi18nApply(1, $i18n_1$[0]);
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ describe('injection', () => {
|
||||
return new MyComp($r3$.ɵinjectChangeDetectorRef());
|
||||
},
|
||||
consts: 1,
|
||||
vars: 1,
|
||||
template: function MyComp_Template(rf: $RenderFlags$, ctx: $MyComp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵtext(0);
|
||||
@ -53,6 +54,7 @@ describe('injection', () => {
|
||||
selectors: [['my-app']],
|
||||
factory: function MyApp_Factory() { return new MyApp(); },
|
||||
consts: 1,
|
||||
vars: 0,
|
||||
/** <my-comp></my-comp> */
|
||||
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
|
||||
if (rf & 1) {
|
||||
@ -83,6 +85,7 @@ describe('injection', () => {
|
||||
selectors: [['my-comp']],
|
||||
factory: function MyComp_Factory() { return new MyComp($r3$.ɵinjectAttribute('title')); },
|
||||
consts: 1,
|
||||
vars: 1,
|
||||
template: function MyComp_Template(rf: $RenderFlags$, ctx: $MyComp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵtext(0);
|
||||
@ -101,6 +104,7 @@ describe('injection', () => {
|
||||
selectors: [['my-app']],
|
||||
factory: function MyApp_Factory() { return new MyApp(); },
|
||||
consts: 1,
|
||||
vars: 0,
|
||||
/** <my-comp></my-comp> */
|
||||
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
|
||||
if (rf & 1) {
|
||||
@ -154,6 +158,7 @@ describe('injection', () => {
|
||||
$r3$.ɵdirectiveInject(ServiceA), $r3$.ɵdirectiveInject(ServiceB), inject(INJECTOR));
|
||||
},
|
||||
consts: 0,
|
||||
vars: 0,
|
||||
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {},
|
||||
providers: [ServiceA],
|
||||
viewProviders: [ServiceB],
|
||||
|
@ -47,6 +47,7 @@ describe('lifecycle hooks', () => {
|
||||
selectors: [['lifecycle-comp']],
|
||||
factory: function LifecycleComp_Factory() { return new LifecycleComp(); },
|
||||
consts: 0,
|
||||
vars: 0,
|
||||
template: function LifecycleComp_Template(rf: $RenderFlags$, ctx: $LifecycleComp$) {},
|
||||
inputs: {nameMin: ['name', 'nameMin']},
|
||||
features: [$r3$.ɵNgOnChangesFeature]
|
||||
@ -71,6 +72,7 @@ describe('lifecycle hooks', () => {
|
||||
selectors: [['simple-layout']],
|
||||
factory: function SimpleLayout_Factory() { return simpleLayout = new SimpleLayout(); },
|
||||
consts: 2,
|
||||
vars: 2,
|
||||
template: function SimpleLayout_Template(rf: $RenderFlags$, ctx: $SimpleLayout$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelement(0, 'lifecycle-comp');
|
||||
|
@ -26,6 +26,7 @@ describe('local references', () => {
|
||||
selectors: [['my-component']],
|
||||
factory: () => new MyComponent,
|
||||
consts: 3,
|
||||
vars: 1,
|
||||
template: function(rf: $RenderFlags$, ctx: $MyComponent$) {
|
||||
let l1_user: any;
|
||||
if (rf & 1) {
|
||||
@ -62,11 +63,13 @@ describe('local references', () => {
|
||||
selectors: [['my-component']],
|
||||
factory: () => new MyComponent,
|
||||
consts: 3,
|
||||
vars: 1,
|
||||
template: function(rf: $RenderFlags$, ctx: $MyComponent$) {
|
||||
let l1_tpl: any;
|
||||
if (rf & 1) {
|
||||
$r3$.ɵtemplate(
|
||||
0, MyComponent_Template_0, 0, null, null, ['tpl', ''], $r3$.ɵtemplateRefExtractor);
|
||||
0, MyComponent_Template_0, 0, 0, null, null, ['tpl', ''],
|
||||
$r3$.ɵtemplateRefExtractor);
|
||||
$r3$.ɵtext(2);
|
||||
}
|
||||
if (rf & 2) {
|
||||
|
@ -84,6 +84,7 @@ describe('pipes', () => {
|
||||
selectors: [['my-app']],
|
||||
factory: function MyApp_Factory() { return new MyApp(); },
|
||||
consts: 3,
|
||||
vars: 7,
|
||||
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵtext(0);
|
||||
@ -94,7 +95,7 @@ describe('pipes', () => {
|
||||
$r3$.ɵtextBinding(
|
||||
0,
|
||||
$r3$.ɵinterpolation1(
|
||||
'', $r3$.ɵpipeBind2(1, 6, $r3$.ɵpipeBind2(2, 3, ctx.name, ctx.size), ctx.size),
|
||||
'', $r3$.ɵpipeBind2(1, 4, $r3$.ɵpipeBind2(2, 1, ctx.name, ctx.size), ctx.size),
|
||||
''));
|
||||
}
|
||||
}
|
||||
@ -160,7 +161,7 @@ describe('pipes', () => {
|
||||
if (rf & 2) {
|
||||
const $comp$ = $r3$.ɵnextContext();
|
||||
$r3$.ɵtextBinding(
|
||||
1, $r3$.ɵinterpolation1('', $r3$.ɵpipeBind2(2, 3, $comp$.name, $comp$.size), ''));
|
||||
1, $r3$.ɵinterpolation1('', $r3$.ɵpipeBind2(2, 1, $comp$.name, $comp$.size), ''));
|
||||
}
|
||||
}
|
||||
|
||||
@ -179,13 +180,14 @@ describe('pipes', () => {
|
||||
selectors: [['my-app']],
|
||||
factory: function MyApp_Factory() { return new MyApp(); },
|
||||
consts: 5,
|
||||
vars: 9,
|
||||
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵtext(0);
|
||||
$r3$.ɵpipe(1, 'myPurePipe');
|
||||
$r3$.ɵtext(2);
|
||||
$r3$.ɵpipe(3, 'myPurePipe');
|
||||
$r3$.ɵtemplate(4, MyApp_div_Template_4, 3, '', ['oneTimeIf', '']);
|
||||
$r3$.ɵtemplate(4, MyApp_div_Template_4, 3, 4, '', ['oneTimeIf', '']);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵtextBinding(
|
||||
@ -193,8 +195,6 @@ describe('pipes', () => {
|
||||
$r3$.ɵtextBinding(
|
||||
2, $r3$.ɵinterpolation1('', $r3$.ɵpipeBind2(3, 6, ctx.name, ctx.size), ''));
|
||||
$r3$.ɵelementProperty(4, 'oneTimeIf', $r3$.ɵbind(ctx.more));
|
||||
$r3$.ɵcontainerRefreshStart(4);
|
||||
$r3$.ɵcontainerRefreshEnd();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -55,6 +55,7 @@ describe('queries', () => {
|
||||
selectors: [['view-query-component']],
|
||||
factory: function ViewQueryComponent_Factory() { return new ViewQueryComponent(); },
|
||||
consts: 3,
|
||||
vars: 0,
|
||||
template: function ViewQueryComponent_Template(
|
||||
rf: $RenderFlags$, ctx: $ViewQueryComponent$) {
|
||||
if (rf & 1) {
|
||||
@ -112,6 +113,7 @@ describe('queries', () => {
|
||||
selectors: [['content-query-component']],
|
||||
factory: function ContentQueryComponent_Factory() { return new ContentQueryComponent(); },
|
||||
consts: 2,
|
||||
vars: 0,
|
||||
contentQueries: function ContentQueryComponent_ContentQueries() {
|
||||
$r3$.ɵregisterContentQuery($r3$.ɵquery(null, SomeDirective, false));
|
||||
$r3$.ɵregisterContentQuery($r3$.ɵquery(null, SomeDirective, false));
|
||||
@ -155,6 +157,7 @@ describe('queries', () => {
|
||||
selectors: [['my-app']],
|
||||
factory: function MyApp_Factory() { return new MyApp(); },
|
||||
consts: 2,
|
||||
vars: 0,
|
||||
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementStart(0, 'content-query-component');
|
||||
|
@ -42,6 +42,7 @@ describe('compiler sanitization', () => {
|
||||
selectors: [['my-component']],
|
||||
factory: function MyComponent_Factory() { return new MyComponent(); },
|
||||
consts: 2,
|
||||
vars: 4,
|
||||
template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementStart(0, 'div');
|
||||
|
@ -78,13 +78,14 @@ class ToDoAppComponent {
|
||||
return new ToDoAppComponent(r3.directiveInject(AppState));
|
||||
},
|
||||
consts: 6,
|
||||
vars: 1,
|
||||
template: function ToDoAppComponent_Template(rf: $RenderFlags$, ctx: ToDoAppComponent) {
|
||||
if (rf & 1) {
|
||||
r3.elementStart(0, 'h1');
|
||||
r3.text(1, 'ToDo Application');
|
||||
r3.elementEnd();
|
||||
r3.elementStart(2, 'div');
|
||||
r3.template(3, ToDoAppComponent_NgForOf_Template, 1, '', ['ngForOf', '']);
|
||||
r3.template(3, ToDoAppComponent_NgForOf_Template, 1, 1, '', ['ngForOf', '']);
|
||||
r3.elementEnd();
|
||||
r3.elementStart(4, 'span');
|
||||
r3.text(5);
|
||||
@ -135,6 +136,7 @@ class ToDoItemComponent {
|
||||
selectors: [['todo']],
|
||||
factory: function ToDoItemComponent_Factory() { return new ToDoItemComponent(); },
|
||||
consts: 6,
|
||||
vars: 2,
|
||||
template: function ToDoItemComponent_Template(rf: $RenderFlags$, ctx: ToDoItemComponent) {
|
||||
if (rf & 1) {
|
||||
r3.elementStart(0, 'div');
|
||||
|
@ -110,10 +110,11 @@ describe('template variables', () => {
|
||||
selectors: [['my-component']],
|
||||
factory: function MyComponent_Factory() { return new MyComponent(); },
|
||||
consts: 2,
|
||||
vars: 1,
|
||||
template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementStart(0, 'ul');
|
||||
$r3$.ɵtemplate(1, MyComponent_ForOfDirective_Template_1, 2, '', ['forOf', '']);
|
||||
$r3$.ɵtemplate(1, MyComponent_ForOfDirective_Template_1, 2, 1, '', ['forOf', '']);
|
||||
$r3$.ɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
@ -152,7 +153,7 @@ describe('template variables', () => {
|
||||
$r3$.ɵelementEnd();
|
||||
$r3$.ɵelementStart(3, 'ul');
|
||||
$r3$.ɵtemplate(
|
||||
4, MyComponent_ForOfDirective_ForOfDirective_Template_3, 2, '', ['forOf', '']);
|
||||
4, MyComponent_ForOfDirective_ForOfDirective_Template_3, 2, 1, '', ['forOf', '']);
|
||||
$r3$.ɵelementEnd();
|
||||
$r3$.ɵelementEnd();
|
||||
}
|
||||
@ -203,16 +204,15 @@ describe('template variables', () => {
|
||||
selectors: [['my-component']],
|
||||
factory: function MyComponent_Factory() { return new MyComponent(); },
|
||||
consts: 2,
|
||||
vars: 1,
|
||||
template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementStart(0, 'ul');
|
||||
$r3$.ɵtemplate(1, MyComponent_ForOfDirective_Template_1, 5, '', ['forOf', '']);
|
||||
$r3$.ɵtemplate(1, MyComponent_ForOfDirective_Template_1, 5, 2, '', ['forOf', '']);
|
||||
$r3$.ɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵelementProperty(1, 'forOf', $r3$.ɵbind(ctx.items));
|
||||
$r3$.ɵcontainerRefreshStart(1);
|
||||
$r3$.ɵcontainerRefreshEnd();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user