refactor(ivy): remove short instruction names as they provide no value (#25493)

PR Close #25493
This commit is contained in:
Miško Hevery 2018-08-14 16:48:58 -07:00 committed by Jason Aden
parent 92c8752d0a
commit 9ee6702fa9
30 changed files with 1059 additions and 1036 deletions

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import {ɵC as C, ɵE as E, ɵRenderFlags as RenderFlags, ɵT as T, ɵV as V, ɵb as b, ɵcR as cR, ɵcr as cr, ɵdefineComponent as defineComponent, ɵdetectChanges as detectChanges, ɵe as e, ɵi1 as i1, ɵp as p, ɵs as s, ɵsa as sa, ɵsm as sm, ɵsp as sp, ɵt as t, ɵv as v} from '@angular/core'; import {ɵRenderFlags, ɵbind, ɵcontainer, ɵcontainerRefreshEnd, ɵcontainerRefreshStart, ɵdefineComponent, ɵdetectChanges, ɵelementEnd, ɵelementStart, ɵelementStyling, ɵelementStylingProp, ɵembeddedViewEnd, ɵembeddedViewStart, ɵtext, ɵtextBinding as ɵtextBinding} from '@angular/core';
import {ComponentDefInternal} from '@angular/core/src/render3/interfaces/definition'; import {ComponentDefInternal} from '@angular/core/src/render3/interfaces/definition';
import {TableCell, buildTable, emptyTable} from '../util'; import {TableCell, buildTable, emptyTable} from '../util';
@ -16,57 +16,57 @@ export class LargeTableComponent {
data: TableCell[][] = emptyTable; data: TableCell[][] = emptyTable;
/** @nocollapse */ /** @nocollapse */
static ngComponentDef: ComponentDefInternal<LargeTableComponent> = defineComponent({ static ngComponentDef: ComponentDefInternal<LargeTableComponent> = ɵdefineComponent({
type: LargeTableComponent, type: LargeTableComponent,
selectors: [['largetable']], selectors: [['largetable']],
template: function(rf: RenderFlags, ctx: LargeTableComponent) { template: function(rf: ɵRenderFlags, ctx: LargeTableComponent) {
if (rf & RenderFlags.Create) { if (rf & ɵRenderFlags.Create) {
E(0, 'table'); ɵelementStart(0, 'table');
{ {
E(1, 'tbody'); ɵelementStart(1, 'tbody');
{ C(2); } { ɵcontainer(2); }
e(); ɵelementEnd();
} }
e(); ɵelementEnd();
} }
if (rf & RenderFlags.Update) { if (rf & ɵRenderFlags.Update) {
cR(2); ɵcontainerRefreshStart(2);
{ {
for (let row of ctx.data) { for (let row of ctx.data) {
let rf1 = V(1); let rf1 = ɵembeddedViewStart(1);
{ {
if (rf1 & RenderFlags.Create) { if (rf1 & ɵRenderFlags.Create) {
E(0, 'tr'); ɵelementStart(0, 'tr');
C(1); ɵcontainer(1);
e(); ɵelementEnd();
} }
if (rf1 & RenderFlags.Update) { if (rf1 & ɵRenderFlags.Update) {
cR(1); ɵcontainerRefreshStart(1);
{ {
for (let cell of row) { for (let cell of row) {
let rf2 = V(2); let rf2 = ɵembeddedViewStart(2);
{ {
if (rf2 & RenderFlags.Create) { if (rf2 & ɵRenderFlags.Create) {
E(0, 'td'); ɵelementStart(0, 'td');
s(null, c0); ɵelementStyling(null, c0);
{ T(1); } { ɵtext(1); }
e(); ɵelementEnd();
} }
if (rf2 & RenderFlags.Update) { if (rf2 & ɵRenderFlags.Update) {
sp(0, 0, null, cell.row % 2 ? '' : 'grey'); ɵelementStylingProp(0, 0, null, cell.row % 2 ? '' : 'grey');
t(1, b(cell.value)); ɵtextBinding(1, ɵbind(cell.value));
} }
} }
v(); ɵembeddedViewEnd();
} }
} }
cr(); ɵcontainerRefreshEnd();
} }
} }
v(); ɵembeddedViewEnd();
} }
} }
cr(); ɵcontainerRefreshEnd();
} }
}, },
factory: () => new LargeTableComponent(), factory: () => new LargeTableComponent(),
@ -76,10 +76,10 @@ export class LargeTableComponent {
export function destroyDom(component: LargeTableComponent) { export function destroyDom(component: LargeTableComponent) {
component.data = emptyTable; component.data = emptyTable;
detectChanges(component); ɵdetectChanges(component);
} }
export function createDom(component: LargeTableComponent) { export function createDom(component: LargeTableComponent) {
component.data = buildTable(); component.data = buildTable();
detectChanges(component); ɵdetectChanges(component);
} }

View File

@ -6,25 +6,25 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import {ɵC as C, ɵE as E, ɵRenderFlags as RenderFlags, ɵT as T, ɵV as V, ɵb as b, ɵcR as cR, ɵcr as cr, ɵdefineComponent as defineComponent, ɵdetectChanges as _detectChanges, ɵe as e, ɵi1 as i1, ɵp as p, ɵs as s, ɵsa as sa, ɵsm as sm, ɵsp as sp, ɵt as t, ɵv as v} from '@angular/core'; import {ɵRenderFlags, ɵbind, ɵcontainer, ɵcontainerRefreshEnd, ɵcontainerRefreshStart, ɵdefineComponent, ɵdetectChanges, ɵelementEnd, ɵelementProperty, ɵelementStart, ɵelementStyling as s, ɵelementStylingProp, ɵembeddedViewEnd, ɵembeddedViewStart, ɵinterpolation1, ɵtext, ɵtextBinding as ɵtextBinding} from '@angular/core';
import {TreeNode, buildTree, emptyTree} from '../util'; import {TreeNode, buildTree, emptyTree} from '../util';
export function destroyDom(component: TreeComponent) { export function destroyDom(component: TreeComponent) {
component.data = emptyTree; component.data = emptyTree;
_detectChanges(component); ɵdetectChanges(component);
} }
export function createDom(component: TreeComponent) { export function createDom(component: TreeComponent) {
component.data = buildTree(); component.data = buildTree();
_detectChanges(component); ɵdetectChanges(component);
} }
const numberOfChecksEl = document.getElementById('numberOfChecks') !; const numberOfChecksEl = document.getElementById('numberOfChecks') !;
let detectChangesRuns = 0; let detectChangesRuns = 0;
export function detectChanges(component: TreeComponent) { export function detectChanges(component: TreeComponent) {
for (let i = 0; i < 10; i++) { for (let i = 0; i < 10; i++) {
_detectChanges(component); ɵdetectChanges(component);
} }
detectChangesRuns += 10; detectChangesRuns += 10;
numberOfChecksEl.textContent = `${detectChangesRuns}`; numberOfChecksEl.textContent = `${detectChangesRuns}`;
@ -35,55 +35,55 @@ export class TreeComponent {
data: TreeNode = emptyTree; data: TreeNode = emptyTree;
/** @nocollapse */ /** @nocollapse */
static ngComponentDef = defineComponent({ static ngComponentDef = ɵdefineComponent({
type: TreeComponent, type: TreeComponent,
selectors: [['tree']], selectors: [['tree']],
template: function(rf: RenderFlags, ctx: TreeComponent) { template: function(rf: ɵRenderFlags, ctx: TreeComponent) {
if (rf & RenderFlags.Create) { if (rf & ɵRenderFlags.Create) {
E(0, 'span'); ɵelementStart(0, 'span');
s(null, c0); s(null, c0);
{ T(1); } { ɵtext(1); }
e(); ɵelementEnd();
C(2); ɵcontainer(2);
C(3); ɵcontainer(3);
} }
if (rf & RenderFlags.Update) { if (rf & ɵRenderFlags.Update) {
sp(0, 0, ctx.data.depth % 2 ? '' : 'grey'); ɵelementStylingProp(0, 0, ctx.data.depth % 2 ? '' : 'grey');
t(1, i1(' ', ctx.data.value, ' ')); ɵtextBinding(1, ɵinterpolation1(' ', ctx.data.value, ' '));
cR(2); ɵcontainerRefreshStart(2);
{ {
if (ctx.data.left != null) { if (ctx.data.left != null) {
let rf0 = V(0); let rf0 = ɵembeddedViewStart(0);
{ {
if (rf0 & RenderFlags.Create) { if (rf0 & ɵRenderFlags.Create) {
E(0, 'tree'); ɵelementStart(0, 'tree');
e(); ɵelementEnd();
} }
if (rf0 & RenderFlags.Update) { if (rf0 & ɵRenderFlags.Update) {
p(0, 'data', b(ctx.data.left)); ɵelementProperty(0, 'data', ɵbind(ctx.data.left));
} }
} }
v(); ɵembeddedViewEnd();
} }
} }
cr(); ɵcontainerRefreshEnd();
cR(3); ɵcontainerRefreshStart(3);
{ {
if (ctx.data.right != null) { if (ctx.data.right != null) {
let rf0 = V(0); let rf0 = ɵembeddedViewStart(0);
{ {
if (rf0 & RenderFlags.Create) { if (rf0 & ɵRenderFlags.Create) {
E(0, 'tree'); ɵelementStart(0, 'tree');
e(); ɵelementEnd();
} }
if (rf0 & RenderFlags.Update) { if (rf0 & ɵRenderFlags.Update) {
p(0, 'data', b(ctx.data.right)); ɵelementProperty(0, 'data', ɵbind(ctx.data.right));
} }
} }
v(); ɵembeddedViewEnd();
} }
} }
cr(); ɵcontainerRefreshEnd();
} }
}, },
factory: () => new TreeComponent, factory: () => new TreeComponent,
@ -96,10 +96,10 @@ export class TreeFunction {
data: TreeNode = emptyTree; data: TreeNode = emptyTree;
/** @nocollapse */ /** @nocollapse */
static ngComponentDef = defineComponent({ static ngComponentDef = ɵdefineComponent({
type: TreeFunction, type: TreeFunction,
selectors: [['tree']], selectors: [['tree']],
template: function(rf: RenderFlags, ctx: TreeFunction) { template: function(rf: ɵRenderFlags, ctx: TreeFunction) {
// bit of a hack // bit of a hack
TreeTpl(rf, ctx.data); TreeTpl(rf, ctx.data);
}, },
@ -109,39 +109,39 @@ export class TreeFunction {
} }
const c1 = ['background-color']; const c1 = ['background-color'];
export function TreeTpl(rf: RenderFlags, ctx: TreeNode) { export function TreeTpl(rf: ɵRenderFlags, ctx: TreeNode) {
if (rf & RenderFlags.Create) { if (rf & ɵRenderFlags.Create) {
E(0, 'tree'); ɵelementStart(0, 'tree');
{ {
E(1, 'span'); ɵelementStart(1, 'span');
s(null, c1); s(null, c1);
{ T(2); } { ɵtext(2); }
e(); ɵelementEnd();
C(3); ɵcontainer(3);
C(4); ɵcontainer(4);
} }
e(); ɵelementEnd();
} }
if (rf & RenderFlags.Update) { if (rf & ɵRenderFlags.Update) {
sp(1, 0, ctx.depth % 2 ? '' : 'grey'); ɵelementStylingProp(1, 0, ctx.depth % 2 ? '' : 'grey');
t(2, i1(' ', ctx.value, ' ')); ɵtextBinding(2, ɵinterpolation1(' ', ctx.value, ' '));
cR(3); ɵcontainerRefreshStart(3);
{ {
if (ctx.left != null) { if (ctx.left != null) {
let rf0 = V(0); let rf0 = ɵembeddedViewStart(0);
{ TreeTpl(rf0, ctx.left); } { TreeTpl(rf0, ctx.left); }
v(); ɵembeddedViewEnd();
} }
} }
cr(); ɵcontainerRefreshEnd();
cR(4); ɵcontainerRefreshStart(4);
{ {
if (ctx.right != null) { if (ctx.right != null) {
let rf0 = V(0); let rf0 = ɵembeddedViewStart(0);
{ TreeTpl(rf0, ctx.right); } { TreeTpl(rf0, ctx.right); }
v(); ɵembeddedViewEnd();
} }
} }
cr(); ɵcontainerRefreshEnd();
} }
} }

View File

@ -140,7 +140,7 @@ describe('mock_compiler', () => {
expectEmit( expectEmit(
result.source, ` result.source, `
// TODO: this comment should not be taken into account // TODO: this comment should not be taken into account
$r3$.ɵT(0, "Hello!"); $r3$.ɵtext(0, "Hello!");
// TODO: this comment should not be taken into account // TODO: this comment should not be taken into account
`, `,
'todo comments should be ignored'); 'todo comments should be ignored');

View File

@ -53,17 +53,17 @@ describe('compiler compliance', () => {
template: function MyComponent_Template(rf, ctx) { template: function MyComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "div", $c1$); $r3$.ɵelementStart(0, "div", $c1$);
$r3$.ɵs($c2$); $r3$.ɵelementStyling($c2$);
$r3$.ɵNS(); $r3$.ɵnamespaceSVG();
$r3$.ɵE(1, "svg"); $r3$.ɵelementStart(1, "svg");
$r3$.ɵEe(2, "circle", $c3$); $r3$.ɵelement(2, "circle", $c3$);
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵNH(); $r3$.ɵnamespaceHTML();
$r3$.ɵE(3, "p"); $r3$.ɵelementStart(3, "p");
$r3$.ɵT(4, "test"); $r3$.ɵtext(4, "test");
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
} }
`; `;
@ -104,17 +104,17 @@ describe('compiler compliance', () => {
template: function MyComponent_Template(rf, ctx) { template: function MyComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "div", $c1$); $r3$.ɵelementStart(0, "div", $c1$);
$r3$.ɵs($c2$); $r3$.ɵelementStyling($c2$);
$r3$.ɵNM(); $r3$.ɵnamespaceMathML();
$r3$.ɵE(1, "math"); $r3$.ɵelementStart(1, "math");
$r3$.ɵEe(2, "infinity"); $r3$.ɵelement(2, "infinity");
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵNH(); $r3$.ɵnamespaceHTML();
$r3$.ɵE(3, "p"); $r3$.ɵelementStart(3, "p");
$r3$.ɵT(4, "test"); $r3$.ɵtext(4, "test");
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
} }
`; `;
@ -155,14 +155,14 @@ describe('compiler compliance', () => {
template: function MyComponent_Template(rf, ctx) { template: function MyComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "div", $c1$); $r3$.ɵelementStart(0, "div", $c1$);
$r3$.ɵs($c2$); $r3$.ɵelementStyling($c2$);
$r3$.ɵT(1, "Hello "); $r3$.ɵtext(1, "Hello ");
$r3$.ɵE(2, "b"); $r3$.ɵelementStart(2, "b");
$r3$.ɵT(3, "World"); $r3$.ɵtext(3, "World");
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵT(4, "!"); $r3$.ɵtext(4, "!");
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
} }
`; `;
@ -204,13 +204,13 @@ describe('compiler compliance', () => {
template: function MyComponent_Template(rf, ctx) { template: function MyComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "div", $e0_attrs$); $r3$.ɵelementStart(0, "div", $e0_attrs$);
$r3$.ɵT(1, "Hello "); $r3$.ɵtext(1, "Hello ");
$r3$.ɵE(2, "b"); $r3$.ɵelementStart(2, "b");
$r3$.ɵT(3, "World"); $r3$.ɵtext(3, "World");
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵT(4, "!"); $r3$.ɵtext(4, "!");
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
} }
`; `;
@ -246,10 +246,10 @@ describe('compiler compliance', () => {
template: function MyComponent_Template(rf, ctx) { template: function MyComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
i0.ɵEC(0); i0.ɵEC(0);
i0.ɵE(1, "span"); i0.ɵelementStart(1, "span");
i0.ɵT(2, "in a "); i0.ɵtext(2, "in a ");
i0.ɵe(); i0.ɵelementEnd();
i0.ɵT(3, "container"); i0.ɵtext(3, "container");
i0.ɵeC(); i0.ɵeC();
} }
} }
@ -317,10 +317,10 @@ describe('compiler compliance', () => {
const template = ` const template = `
template: function MyComponent_Template(rf, ctx) { template: function MyComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, "div"); $r3$.ɵelement(0, "div");
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp(0, "id", $r3$.ɵb(ctx.id)); $r3$.ɵelementProperty(0, "id", $r3$.ɵbind(ctx.id));
} }
} }
`; `;
@ -362,15 +362,15 @@ describe('compiler compliance', () => {
const template = ` const template = `
template: function MyComponent_Template(rf, ctx) { template: function MyComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, "div"); $r3$.ɵelement(0, "div");
$r3$.ɵPp(1,"pipe"); $r3$.ɵpipe(1,"pipe");
$r3$.ɵrS(10); $r3$.ɵreserveSlots(10);
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp(0, "ternary", $r3$.ɵb((ctx.cond ? $r3$.ɵf1(6, _c0, ctx.a): _c1))); $r3$.ɵelementProperty(0, "ternary", $r3$.ɵbind((ctx.cond ? $r3$.ɵpureFunction1(6, _c0, ctx.a): _c1)));
$r3$.ɵp(0, "pipe", $r3$.ɵb($r3$.ɵpb3(1, 4, ctx.value, 1, 2))); $r3$.ɵelementProperty(0, "pipe", $r3$.ɵbind($r3$.ɵpipeBind3(1, 4, ctx.value, 1, 2)));
$r3$.ɵp(0, "and", $r3$.ɵb((ctx.cond && $r3$.ɵf1(8, _c0, ctx.b)))); $r3$.ɵelementProperty(0, "and", $r3$.ɵbind((ctx.cond && $r3$.ɵpureFunction1(8, _c0, ctx.b))));
$r3$.ɵp(0, "or", $r3$.ɵb((ctx.cond || $r3$.ɵf1(10, _c0, ctx.c)))); $r3$.ɵelementProperty(0, "or", $r3$.ɵbind((ctx.cond || $r3$.ɵpureFunction1(10, _c0, ctx.c))));
} }
} }
`; `;
@ -416,14 +416,14 @@ describe('compiler compliance', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template:function MyComponent_Template(rf,ctx){ template:function MyComponent_Template(rf,ctx){
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "div"); $r3$.ɵelementStart(0, "div");
$r3$.ɵs(_c0, _c1); $r3$.ɵelementStyling(_c0, _c1);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵsp(0, 0, ctx.color); $r3$.ɵelementStylingProp(0, 0, ctx.color);
$r3$.ɵcp(0, 0, ctx.error); $r3$.ɵelementClassProp(0, 0, ctx.error);
$r3$.ɵsa(0); $r3$.ɵelementStylingApply(0);
} }
} }
}); });
@ -469,7 +469,7 @@ describe('compiler compliance', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template: function ChildComponent_Template(rf, ctx) { template: function ChildComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵT(0, "child-view"); $r3$.ɵtext(0, "child-view");
} }
} }
});`; });`;
@ -495,8 +495,8 @@ describe('compiler compliance', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template: function MyComponent_Template(rf, ctx) { template: function MyComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, "child", $c1$); $r3$.ɵelement(0, "child", $c1$);
$r3$.ɵT(1, "!"); $r3$.ɵtext(1, "!");
} }
}, },
directives: [ChildComponent, SomeDirective] directives: [ChildComponent, SomeDirective]
@ -580,7 +580,7 @@ describe('compiler compliance', () => {
selectors: [["", "hostBindingDir", ""]], selectors: [["", "hostBindingDir", ""]],
factory: function HostBindingDir_Factory(t) { return new (t || HostBindingDir)(); }, factory: function HostBindingDir_Factory(t) { return new (t || HostBindingDir)(); },
hostBindings: function HostBindingDir_HostBindings(dirIndex, elIndex) { hostBindings: function HostBindingDir_HostBindings(dirIndex, elIndex) {
$r3$.ɵp(elIndex, "id", $r3$.ɵb($r3$.ɵd(dirIndex).dirId)); $r3$.ɵelementProperty(elIndex, "id", $r3$.ɵbind($r3$.ɵloadDirective(dirIndex).dirId));
}, },
features: [$r3$.ɵPublicFeature] features: [$r3$.ɵPublicFeature]
}); });
@ -629,14 +629,14 @@ describe('compiler compliance', () => {
const $c2$ = ["if", ""]; const $c2$ = ["if", ""];
function MyComponent_li_Template_2(rf, ctx) { function MyComponent_li_Template_2(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "li"); $r3$.ɵelementStart(0, "li");
$r3$.ɵT(1); $r3$.ɵtext(1);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
const $myComp$ = $r3$.ɵx(); const $myComp$ = $r3$.ɵnextContext();
const $foo$ = $r3$.ɵr(1); const $foo$ = $r3$.ɵreference(1);
$r3$.ɵt(1, $r3$.ɵi2("", $myComp$.salutation, " ", $foo$, "")); $r3$.ɵtextBinding(1, $r3$.ɵinterpolation2("", $myComp$.salutation, " ", $foo$, ""));
} }
} }
@ -647,9 +647,9 @@ describe('compiler compliance', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template: function MyComponent_Template(rf, ctx) { template: function MyComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "ul", null, $c1$); $r3$.ɵelementStart(0, "ul", null, $c1$);
$r3$.ɵC(2, MyComponent_li_Template_2, null, $c2$); $r3$.ɵcontainer(2, MyComponent_li_Template_2, null, $c2$);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
}, },
directives:[IfDirective] directives:[IfDirective]
@ -707,11 +707,11 @@ describe('compiler compliance', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template: function MyApp_Template(rf, ctx) { template: function MyApp_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, "my-comp"); $r3$.ɵelement(0, "my-comp");
$r3$.ɵrS(2); $r3$.ɵreserveSlots(2);
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp(0, "names", $r3$.ɵb($r3$.ɵf1(2, $e0_ff$, ctx.customName))); $r3$.ɵelementProperty(0, "names", $r3$.ɵbind($r3$.ɵpureFunction1(2, $e0_ff$, ctx.customName)));
} }
}, },
directives: [MyComp] directives: [MyComp]
@ -787,13 +787,13 @@ describe('compiler compliance', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template: function MyApp_Template(rf, ctx) { template: function MyApp_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, "my-comp"); $r3$.ɵelement(0, "my-comp");
$r3$.ɵrS(10); $r3$.ɵreserveSlots(10);
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp( $r3$.ɵelementProperty(
0, "names", 0, "names",
$r3$.ɵb($r3$.ɵfV(10, $e0_ff$, [ctx.n0, ctx.n1, ctx.n2, ctx.n3, ctx.n4, ctx.n5, ctx.n6, ctx.n7, ctx.n8]))); $r3$.ɵbind($r3$.ɵpureFunctionV(10, $e0_ff$, [ctx.n0, ctx.n1, ctx.n2, ctx.n3, ctx.n4, ctx.n5, ctx.n6, ctx.n7, ctx.n8])));
} }
}, },
directives: [MyComp] directives: [MyComp]
@ -849,11 +849,11 @@ describe('compiler compliance', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template: function MyApp_Template(rf, ctx) { template: function MyApp_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, "object-comp"); $r3$.ɵelement(0, "object-comp");
$r3$.ɵrS(2); $r3$.ɵreserveSlots(2);
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp(0, "config", $r3$.ɵb($r3$.ɵf1(2, $e0_ff$, ctx.name))); $r3$.ɵelementProperty(0, "config", $r3$.ɵbind($r3$.ɵpureFunction1(2, $e0_ff$, ctx.name)));
} }
}, },
directives: [ObjectComp] directives: [ObjectComp]
@ -915,13 +915,13 @@ describe('compiler compliance', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template: function MyApp_Template(rf, ctx) { template: function MyApp_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, "nested-comp"); $r3$.ɵelement(0, "nested-comp");
$r3$.ɵrS(7); $r3$.ɵreserveSlots(7);
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp( $r3$.ɵelementProperty(
0, "config", 0, "config",
$r3$.ɵb($r3$.ɵf2(7, $e0_ff_2$, ctx.name, $r3$.ɵf1(4, $e0_ff_1$, $r3$.ɵf1(2, $e0_ff$, ctx.duration))))); $r3$.ɵbind($r3$.ɵpureFunction2(7, $e0_ff_2$, ctx.name, $r3$.ɵpureFunction1(4, $e0_ff_1$, $r3$.ɵpureFunction1(2, $e0_ff$, ctx.duration)))));
} }
}, },
directives: [NestedComp] directives: [NestedComp]
@ -973,10 +973,10 @@ describe('compiler compliance', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template: function SimpleComponent_Template(rf, ctx) { template: function SimpleComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵpD(); $r3$.ɵprojectionDef();
$r3$.ɵE(0, "div"); $r3$.ɵelementStart(0, "div");
$r3$.ɵP(1); $r3$.ɵprojection(1);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
} }
});`; });`;
@ -994,13 +994,13 @@ describe('compiler compliance', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template: function ComplexComponent_Template(rf, ctx) { template: function ComplexComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵpD($c1$, $c2$); $r3$.ɵprojectionDef($c1$, $c2$);
$r3$.ɵE(0, "div", $c3$); $r3$.ɵelementStart(0, "div", $c3$);
$r3$.ɵP(1, 1); $r3$.ɵprojection(1, 1);
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵE(2, "div", $c4$); $r3$.ɵelementStart(2, "div", $c4$);
$r3$.ɵP(3, 2); $r3$.ɵprojection(3, 2);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
} }
}); });
@ -1060,16 +1060,16 @@ describe('compiler compliance', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
viewQuery: function ViewQueryComponent_Query(rf, ctx) { viewQuery: function ViewQueryComponent_Query(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵQ(0, SomeDirective, true); $r3$.ɵquery(0, SomeDirective, true);
} }
if (rf & 2) { if (rf & 2) {
var $tmp$; var $tmp$;
($r3$.ɵqR(($tmp$ = $r3$.ɵld(0))) && (ctx.someDir = $tmp$.first)); ($r3$.ɵqueryRefresh(($tmp$ = $r3$.ɵload(0))) && (ctx.someDir = $tmp$.first));
} }
}, },
template: function ViewQueryComponent_Template(rf, ctx) { template: function ViewQueryComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(1, "div", $e0_attrs$); $r3$.ɵelement(1, "div", $e0_attrs$);
} }
}, },
directives: function () { return [SomeDirective]; } directives: function () { return [SomeDirective]; }
@ -1124,22 +1124,22 @@ describe('compiler compliance', () => {
return new (t || ContentQueryComponent)(); return new (t || ContentQueryComponent)();
}, },
contentQueries: function ContentQueryComponent_ContentQueries() { contentQueries: function ContentQueryComponent_ContentQueries() {
$r3$.ɵQr($r3$.ɵQ(null, SomeDirective, true)); $r3$.ɵregisterContentQuery($r3$.ɵquery(null, SomeDirective, true));
$r3$.ɵQr($r3$.ɵQ(null, SomeDirective, false)); $r3$.ɵregisterContentQuery($r3$.ɵquery(null, SomeDirective, false));
}, },
contentQueriesRefresh: function ContentQueryComponent_ContentQueriesRefresh(dirIndex, queryStartIndex) { contentQueriesRefresh: function ContentQueryComponent_ContentQueriesRefresh(dirIndex, queryStartIndex) {
const instance = $r3$.ɵd(dirIndex); const instance = $r3$.ɵloadDirective(dirIndex);
var $tmp$; var $tmp$;
($r3$.ɵqR(($tmp$ = $r3$.ɵql(queryStartIndex))) && ($instance$.someDir = $tmp$.first)); ($r3$.ɵqueryRefresh(($tmp$ = $r3$.ɵloadQueryList(queryStartIndex))) && ($instance$.someDir = $tmp$.first));
($r3$.ɵqR(($tmp$ = $r3$.ɵql((queryStartIndex + 1)))) && ($instance$.someDirList = $tmp$)); ($r3$.ɵqueryRefresh(($tmp$ = $r3$.ɵloadQueryList((queryStartIndex + 1)))) && ($instance$.someDirList = $tmp$));
}, },
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template: function ContentQueryComponent_Template(rf, ctx) { template: function ContentQueryComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵpD(); $r3$.ɵprojectionDef();
$r3$.ɵE(0, "div"); $r3$.ɵelementStart(0, "div");
$r3$.ɵP(1); $r3$.ɵprojection(1);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
} }
});`; });`;
@ -1221,18 +1221,18 @@ describe('compiler compliance', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template: function MyApp_Template(rf, ctx) { template: function MyApp_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵT(0); $r3$.ɵtext(0);
$r3$.ɵPp(1, "myPurePipe"); $r3$.ɵpipe(1, "myPurePipe");
$r3$.ɵPp(2, "myPipe"); $r3$.ɵpipe(2, "myPipe");
$r3$.ɵE(3, "p"); $r3$.ɵelementStart(3, "p");
$r3$.ɵT(4); $r3$.ɵtext(4);
$r3$.ɵPp(5, "myPipe"); $r3$.ɵpipe(5, "myPipe");
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵrS(15); $r3$.ɵreserveSlots(15);
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵt(0, $r3$.ɵi1("", $r3$.ɵpb2(1, 3, $r3$.ɵpb2(2, 6, ctx.name, ctx.size), ctx.size), "")); $r3$.ɵtextBinding(0, $r3$.ɵinterpolation1("", $r3$.ɵpipeBind2(1, 3, $r3$.ɵpipeBind2(2, 6, ctx.name, ctx.size), ctx.size), ""));
$r3$.ɵt(4, $r3$.ɵi1("", $r3$.ɵpbV(5, 13 , $r3$.ɵf1(15, $c0$, ctx.name)), "")); $r3$.ɵtextBinding(4, $r3$.ɵinterpolation1("", $r3$.ɵpipeBindV(5, 13 , $r3$.ɵpureFunction1(15, $c0$, ctx.name)), ""));
} }
}, },
pipes: [MyPurePipe, MyPipe] pipes: [MyPurePipe, MyPipe]
@ -1272,12 +1272,12 @@ describe('compiler compliance', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template: function MyComponent_Template(rf, ctx) { template: function MyComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, "input", null, $c1$); $r3$.ɵelement(0, "input", null, $c1$);
$r3$.ɵT(2); $r3$.ɵtext(2);
} }
if (rf & 2) { if (rf & 2) {
const $user$ = $r3$.ɵr(1); const $user$ = $r3$.ɵreference(1);
$r3$.ɵt(2, $r3$.ɵi1("Hello ", $user$.value, "!")); $r3$.ɵtextBinding(2, $r3$.ɵinterpolation1("Hello ", $user$.value, "!"));
} }
} }
}); });
@ -1328,32 +1328,32 @@ describe('compiler compliance', () => {
const $c4$ = ["bar", ""]; const $c4$ = ["bar", ""];
function MyComponent_div_span_Template_2(rf, ctx) { function MyComponent_div_span_Template_2(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "span"); $r3$.ɵelementStart(0, "span");
$r3$.ɵT(1); $r3$.ɵtext(1);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵx(); $r3$.ɵnextContext();
const $bar$ = $r3$.ɵr(4); const $bar$ = $r3$.ɵreference(4);
$r3$.ɵx(); $r3$.ɵnextContext();
const $foo$ = $r3$.ɵr(1); const $foo$ = $r3$.ɵreference(1);
const $baz$ = $r3$.ɵr(5); const $baz$ = $r3$.ɵreference(5);
$r3$.ɵt(1, $r3$.ɵi3("", $foo$, "-", $bar$, "-", $baz$, "")); $r3$.ɵtextBinding(1, $r3$.ɵinterpolation3("", $foo$, "-", $bar$, "-", $baz$, ""));
} }
} }
function MyComponent_div_Template_3(rf, ctx) { function MyComponent_div_Template_3(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "div"); $r3$.ɵelementStart(0, "div");
$r3$.ɵT(1); $r3$.ɵtext(1);
$r3$.ɵC(2, MyComponent_div_span_Template_2, null, $c2$); $r3$.ɵcontainer(2, MyComponent_div_span_Template_2, null, $c2$);
$r3$.ɵEe(3, "span", null, $c4$); $r3$.ɵelement(3, "span", null, $c4$);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
const $bar$ = $r3$.ɵr(4); const $bar$ = $r3$.ɵreference(4);
$r3$.ɵx(); $r3$.ɵnextContext();
const $foo$ = $r3$.ɵr(1); const $foo$ = $r3$.ɵreference(1);
$r3$.ɵt(1, $r3$.ɵi2(" ", $foo$, "-", $bar$, " ")); $r3$.ɵtextBinding(1, $r3$.ɵinterpolation2(" ", $foo$, "-", $bar$, " "));
} }
} }
@ -1364,14 +1364,14 @@ describe('compiler compliance', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template: function MyComponent_Template(rf, ctx) { template: function MyComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, "div", null, $c1$); $r3$.ɵelement(0, "div", null, $c1$);
$r3$.ɵT(2); $r3$.ɵtext(2);
$r3$.ɵC(3, MyComponent_div_Template_3, null, $c2$); $r3$.ɵcontainer(3, MyComponent_div_Template_3, null, $c2$);
$r3$.ɵEe(4, "div", null, $c3$); $r3$.ɵelement(4, "div", null, $c3$);
} }
if (rf & 2) { if (rf & 2) {
const $foo$ = $r3$.ɵr(1); const $foo$ = $r3$.ɵreference(1);
$r3$.ɵt(2, $r3$.ɵi1(" ", $foo$, " ")); $r3$.ɵtextBinding(2, $r3$.ɵinterpolation1(" ", $foo$, " "));
} }
}, },
directives:[IfDirective] directives:[IfDirective]
@ -1415,37 +1415,37 @@ describe('compiler compliance', () => {
function MyComponent_div_span_Template_3(rf, ctx) { function MyComponent_div_span_Template_3(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$i0$.ɵE(0, "span"); $i0$.ɵelementStart(0, "span");
$i0$.ɵT(1); $i0$.ɵtext(1);
$i0$.ɵe(); $i0$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
const $item$ = $i0$.ɵx().$implicit; const $item$ = $i0$.ɵnextContext().$implicit;
const $foo$ = $i0$.ɵr(2); const $foo$ = $i0$.ɵreference(2);
$i0$.ɵt(1, $i0$.ɵi2(" ", $foo$, " - ", $item$, " ")); $i0$.ɵtextBinding(1, $i0$.ɵinterpolation2(" ", $foo$, " - ", $item$, " "));
} }
} }
function MyComponent_div_Template_0(rf, ctx) { function MyComponent_div_Template_0(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$i0$.ɵE(0, "div"); $i0$.ɵelementStart(0, "div");
$i0$.ɵEe(1, "div", null, $c1$); $i0$.ɵelement(1, "div", null, $c1$);
$i0$.ɵC(3, MyComponent_div_span_Template_3, null, $c2$); $i0$.ɵcontainer(3, MyComponent_div_span_Template_3, null, $c2$);
$i0$.ɵe(); $i0$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
const $app$ = $i0$.ɵx(); const $app$ = $i0$.ɵnextContext();
$i0$.ɵp(3, "ngIf", $i0$.ɵb($app$.showing)); $i0$.ɵelementProperty(3, "ngIf", $i0$.ɵbind($app$.showing));
} }
} }
// ... // ...
template:function MyComponent_Template(rf, ctx){ template:function MyComponent_Template(rf, ctx){
if (rf & 1) { if (rf & 1) {
$i0$.ɵC(0, MyComponent_div_Template_0, null, $c0$); $i0$.ɵcontainer(0, MyComponent_div_Template_0, null, $c0$);
} }
if (rf & 2) { if (rf & 2) {
$i0$.ɵp(0, "ngForOf", $i0$.ɵb(ctx.items)); $i0$.ɵelementProperty(0, "ngForOf", $i0$.ɵbind(ctx.items));
} }
}`; }`;
@ -1517,12 +1517,12 @@ describe('compiler compliance', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template: function SimpleLayout_Template(rf, ctx) { template: function SimpleLayout_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, "lifecycle-comp"); $r3$.ɵelement(0, "lifecycle-comp");
$r3$.ɵEe(1, "lifecycle-comp"); $r3$.ɵelement(1, "lifecycle-comp");
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp(0, "name", $r3$.ɵb(ctx.name1)); $r3$.ɵelementProperty(0, "name", $r3$.ɵbind(ctx.name1));
$r3$.ɵp(1, "name", $r3$.ɵb(ctx.name2)); $r3$.ɵelementProperty(1, "name", $r3$.ɵbind(ctx.name2));
} }
}, },
directives: [LifecycleComp] directives: [LifecycleComp]
@ -1631,10 +1631,10 @@ describe('compiler compliance', () => {
const $_c0$ = ["for","","forOf",""]; const $_c0$ = ["for","","forOf",""];
function MyComponent__svg_g_Template_1(rf, ctx) { function MyComponent__svg_g_Template_1(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵNS(); $r3$.ɵnamespaceSVG();
$r3$.ɵE(0,"g"); $r3$.ɵelementStart(0,"g");
$r3$.ɵEe(1,"circle"); $r3$.ɵelement(1,"circle");
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
} }
@ -1645,12 +1645,12 @@ describe('compiler compliance', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template: function MyComponent_Template(rf, ctx){ template: function MyComponent_Template(rf, ctx){
if (rf & 1) { if (rf & 1) {
$r3$.ɵNS(); $r3$.ɵnamespaceSVG();
$r3$.ɵE(0,"svg"); $r3$.ɵelementStart(0,"svg");
$r3$.ɵC(1,MyComponent__svg_g_Template_1,null,$_c0$); $r3$.ɵcontainer(1,MyComponent__svg_g_Template_1,null,$_c0$);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { $r3$.ɵp(1,"forOf",$r3$.ɵb(ctx.items)); } if (rf & 2) { $r3$.ɵelementProperty(1,"forOf",$r3$.ɵbind(ctx.items)); }
}, },
directives: function() { return [ForOfDirective]; } directives: function() { return [ForOfDirective]; }
}); });
@ -1705,13 +1705,13 @@ describe('compiler compliance', () => {
const $_c0$ = ["for","","forOf",""]; const $_c0$ = ["for","","forOf",""];
function MyComponent_li_Template_1(rf, ctx) { function MyComponent_li_Template_1(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "li"); $r3$.ɵelementStart(0, "li");
$r3$.ɵT(1); $r3$.ɵtext(1);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
const $item$ = ctx.$implicit; const $item$ = ctx.$implicit;
$r3$.ɵt(1, $r3$.ɵi1("", $item$.name, "")); $r3$.ɵtextBinding(1, $r3$.ɵinterpolation1("", $item$.name, ""));
} }
} }
@ -1722,12 +1722,12 @@ describe('compiler compliance', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template: function MyComponent_Template(rf, ctx) { template: function MyComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "ul"); $r3$.ɵelementStart(0, "ul");
$r3$.ɵC(1, MyComponent_li_Template_1, null, $_c0$); $r3$.ɵcontainer(1, MyComponent_li_Template_1, null, $_c0$);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp(1, "forOf", $r3$.ɵb(ctx.items)); $r3$.ɵelementProperty(1, "forOf", $r3$.ɵbind(ctx.items));
} }
}, },
directives: function() { return [ForOfDirective]; } directives: function() { return [ForOfDirective]; }
@ -1783,32 +1783,32 @@ describe('compiler compliance', () => {
const $c1$ = ["for", "", "forOf", ""]; const $c1$ = ["for", "", "forOf", ""];
function MyComponent_li_li_Template_4(rf, ctx) { function MyComponent_li_li_Template_4(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "li"); $r3$.ɵelementStart(0, "li");
$r3$.ɵT(1); $r3$.ɵtext(1);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
const $info$ = ctx.$implicit; const $info$ = ctx.$implicit;
const $item$ = $r3$.ɵx().$implicit; const $item$ = $r3$.ɵnextContext().$implicit;
$r3$.ɵt(1, $r3$.ɵi2(" ", $item$.name, ": ", $info$.description, " ")); $r3$.ɵtextBinding(1, $r3$.ɵinterpolation2(" ", $item$.name, ": ", $info$.description, " "));
} }
} }
function MyComponent_li_Template_1(rf, ctx) { function MyComponent_li_Template_1(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "li"); $r3$.ɵelementStart(0, "li");
$r3$.ɵE(1, "div"); $r3$.ɵelementStart(1, "div");
$r3$.ɵT(2); $r3$.ɵtext(2);
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵE(3, "ul"); $r3$.ɵelementStart(3, "ul");
$r3$.ɵC(4, MyComponent_li_li_Template_4, null, $c1$); $r3$.ɵcontainer(4, MyComponent_li_li_Template_4, null, $c1$);
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
const $item$ = ctx.$implicit; const $item$ = ctx.$implicit;
$r3$.ɵt(2, $r3$.ɵi1("", IDENT.name, "")); $r3$.ɵtextBinding(2, $r3$.ɵinterpolation1("", IDENT.name, ""));
$r3$.ɵp(4, "forOf", $r3$.ɵb(IDENT.infos)); $r3$.ɵelementProperty(4, "forOf", $r3$.ɵbind(IDENT.infos));
} }
} }
@ -1820,12 +1820,12 @@ describe('compiler compliance', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template: function MyComponent_Template(rf, ctx) { template: function MyComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "ul"); $r3$.ɵelementStart(0, "ul");
$r3$.ɵC(1, MyComponent_li_Template_1, null, $c1$); $r3$.ɵcontainer(1, MyComponent_li_Template_1, null, $c1$);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp(1, "forOf", $r3$.ɵb(ctx.items)); $r3$.ɵelementProperty(1, "forOf", $r3$.ɵbind(ctx.items));
} }
}, },
directives: function () { return [ForOfDirective]; } directives: function () { return [ForOfDirective]; }

View File

@ -39,12 +39,12 @@ describe('compiler compliance: bindings', () => {
const template = ` const template = `
template:function MyComponent_Template(rf, $ctx$){ template:function MyComponent_Template(rf, $ctx$){
if (rf & 1) { if (rf & 1) {
$i0$.ɵE(0, "div"); $i0$.ɵelementStart(0, "div");
$i0$.ɵT(1); $i0$.ɵtext(1);
$i0$.ɵe(); $i0$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
$i0$.ɵt(1, $i0$.ɵi1("Hello ", $ctx$.name, "")); $i0$.ɵtextBinding(1, $i0$.ɵinterpolation1("Hello ", $ctx$.name, ""));
} }
}`; }`;
const result = compile(files, angularFiles); const result = compile(files, angularFiles);
@ -75,10 +75,10 @@ describe('compiler compliance: bindings', () => {
const template = ` const template = `
template:function MyComponent_Template(rf, $ctx$){ template:function MyComponent_Template(rf, $ctx$){
if (rf & 1) { if (rf & 1) {
$i0$.ɵEe(0, "a"); $i0$.ɵelement(0, "a");
} }
if (rf & 2) { if (rf & 2) {
$i0$.ɵp(0, "title", $i0$.ɵb($ctx$.title)); $i0$.ɵelementProperty(0, "title", $i0$.ɵbind($ctx$.title));
} }
}`; }`;
const result = compile(files, angularFiles); const result = compile(files, angularFiles);
@ -107,10 +107,10 @@ describe('compiler compliance: bindings', () => {
const template = ` const template = `
template:function MyComponent_Template(rf, $ctx$){ template:function MyComponent_Template(rf, $ctx$){
if (rf & 1) { if (rf & 1) {
$i0$.ɵEe(0, "a"); $i0$.ɵelement(0, "a");
} }
if (rf & 2) { if (rf & 2) {
$i0$.ɵp(0, "title", $i0$.ɵi1("Hello ", $ctx$.name, "")); $i0$.ɵelementProperty(0, "title", $i0$.ɵinterpolation1("Hello ", $ctx$.name, ""));
} }
}`; }`;
const result = compile(files, angularFiles); const result = compile(files, angularFiles);

View File

@ -49,13 +49,13 @@ describe('i18n support in the view compiler', () => {
template: function MyComponent_Template(rf, ctx) { template: function MyComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵT(1, $msg_1$); $r3$.ɵtext(1, $msg_1$);
$r3$.ɵT(3,"&"); $r3$.ɵtext(3,"&");
$r3$.ɵT(5, $msg_2$); $r3$.ɵtext(5, $msg_2$);
$r3$.ɵT(7, $msg_2$); $r3$.ɵtext(7, $msg_2$);
} }
} }
@ -103,9 +103,9 @@ describe('i18n support in the view compiler', () => {
template: function MyComponent_Template(rf, ctx) { template: function MyComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "div", $c1$); $r3$.ɵelementStart(0, "div", $c1$);
$r3$.ɵT(1, $msg_2$); $r3$.ɵtext(1, $msg_2$);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
} }
`; `;
@ -148,7 +148,7 @@ describe('i18n support in the view compiler', () => {
template: function MyComponent_Template(rf, ctx) { template: function MyComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, "div", $c1$); $r3$.ɵelement(0, "div", $c1$);
} }
} }
`; `;

View File

@ -43,12 +43,12 @@ describe('compiler compliance: listen()', () => {
const template = ` const template = `
template: function MyComponent_Template(rf, ctx) { template: function MyComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "div"); $r3$.ɵelementStart(0, "div");
$r3$.ɵL("click", function MyComponent_Template_div_click_listener($event) { $r3$.ɵlistener("click", function MyComponent_Template_div_click_listener($event) {
ctx.onClick($event); ctx.onClick($event);
return (1 == 2); return (1 == 2);
}); });
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
} }
`; `;
@ -90,32 +90,32 @@ describe('compiler compliance: listen()', () => {
function MyComponent_div_Template_0(rf, ctx) { function MyComponent_div_Template_0(rf, ctx) {
if (rf & 1) { if (rf & 1) {
const $s$ = $r3$.ɵgV(); const $s$ = $r3$.ɵgetCurrentView();
$r3$.ɵE(0, "div"); $r3$.ɵelementStart(0, "div");
$r3$.ɵE(1, "div"); $r3$.ɵelementStart(1, "div");
$r3$.ɵL("click", function MyComponent_div_Template_0_div_click_listener($event) { $r3$.ɵlistener("click", function MyComponent_div_Template_0_div_click_listener($event) {
$r3$.ɵrV($s$); $r3$.ɵrestoreView($s$);
const $comp$ = $r3$.ɵx(); const $comp$ = $r3$.ɵnextContext();
return $comp$.onClick($comp$.foo); return $comp$.onClick($comp$.foo);
}); });
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵE(2, "button"); $r3$.ɵelementStart(2, "button");
$r3$.ɵL("click", function MyComponent_div_Template_0_button_click_listener($event) { $r3$.ɵlistener("click", function MyComponent_div_Template_0_button_click_listener($event) {
$r3$.ɵrV($s$); $r3$.ɵrestoreView($s$);
const $comp2$ = $r3$.ɵx(); const $comp2$ = $r3$.ɵnextContext();
return $comp2$.onClick2($comp2$.bar); return $comp2$.onClick2($comp2$.bar);
}); });
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
} }
// ... // ...
template: function MyComponent_Template(rf, ctx) { template: function MyComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵC(0, MyComponent_div_Template_0, null, $c0$); $r3$.ɵcontainer(0, MyComponent_div_Template_0, null, $c0$);
} }
if (rf & 2) { if (rf & 2) {
$i0$.ɵp(0, "ngIf", $i0$.ɵb(ctx.showing)); $i0$.ɵelementProperty(0, "ngIf", $i0$.ɵbind(ctx.showing));
} }
} }
`; `;
@ -156,14 +156,14 @@ describe('compiler compliance: listen()', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template: function MyComponent_Template(rf, ctx) { template: function MyComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "button"); $r3$.ɵelementStart(0, "button");
$r3$.ɵL("click", function MyComponent_Template_button_click_listener($event) { $r3$.ɵlistener("click", function MyComponent_Template_button_click_listener($event) {
const $user$ = $r3$.ɵr(3); const $user$ = $r3$.ɵreference(3);
return ctx.onClick($user$.value); return ctx.onClick($user$.value);
}); });
$r3$.ɵT(1, "Save"); $r3$.ɵtext(1, "Save");
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵEe(2, "input", null, $c0$); $r3$.ɵelement(2, "input", null, $c0$);
} }
} }
}); });

View File

@ -112,7 +112,8 @@ describe('r3_view_compiler', () => {
} }
}; };
const bV_call = `$r3$.ɵiV([" ",ctx.list[0]," ",ctx.list[1]," ",ctx.list[2]," ",ctx.list[3], const bV_call =
`$r3$.ɵinterpolationV([" ",ctx.list[0]," ",ctx.list[1]," ",ctx.list[2]," ",ctx.list[3],
" ",ctx.list[4]," ",ctx.list[5]," ",ctx.list[6]," ",ctx.list[7]," ",ctx.list[8], " ",ctx.list[4]," ",ctx.list[5]," ",ctx.list[6]," ",ctx.list[7]," ",ctx.list[8],
" "])`; " "])`;
const result = compile(files, angularFiles); const result = compile(files, angularFiles);

View File

@ -42,13 +42,13 @@ describe('compiler compliance: styling', () => {
const template = ` const template = `
template: function MyComponent_Template(rf, $ctx$) { template: function MyComponent_Template(rf, $ctx$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "div"); $r3$.ɵelementStart(0, "div");
$r3$.ɵs(null, null, $r3$.ɵzss); $r3$.ɵelementStyling(null, null, $r3$.ɵzss);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵsm(0, null, $ctx$.myStyleExp); $r3$.ɵelementStylingMap(0, null, $ctx$.myStyleExp);
$r3$.ɵsa(0); $r3$.ɵelementStylingApply(0);
} }
} }
`; `;
@ -96,16 +96,16 @@ describe('compiler compliance: styling', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template: function MyComponent_Template(rf, $ctx$) { template: function MyComponent_Template(rf, $ctx$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "div"); $r3$.ɵelementStart(0, "div");
$r3$.ɵs(null, _c0, $r3$.ɵzss); $r3$.ɵelementStyling(null, _c0, $r3$.ɵzss);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵsm(0, null, $ctx$.myStyleExp); $r3$.ɵelementStylingMap(0, null, $ctx$.myStyleExp);
$r3$.ɵsp(0, 1, $ctx$.myWidth); $r3$.ɵelementStylingProp(0, 1, $ctx$.myWidth);
$r3$.ɵsp(0, 2, $ctx$.myHeight); $r3$.ɵelementStylingProp(0, 2, $ctx$.myHeight);
$r3$.ɵsa(0); $r3$.ɵelementStylingApply(0);
$r3$.ɵa(0, "style", $r3$.ɵb("border-width: 10px"), $r3$.ɵzs); $r3$.ɵelementAttribute(0, "style", $r3$.ɵbind("border-width: 10px"), $r3$.ɵzs);
} }
} }
}); });
@ -153,13 +153,13 @@ describe('compiler compliance: styling', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template: function MyComponent_Template(rf, ctx) { template: function MyComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "div"); $r3$.ɵelementStart(0, "div");
$r3$.ɵs(null, _c0, $r3$.ɵzss); $r3$.ɵelementStyling(null, _c0, $r3$.ɵzss);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵsp(0, 0, ctx.myImage); $r3$.ɵelementStylingProp(0, 0, ctx.myImage);
$r3$.ɵsa(0); $r3$.ɵelementStylingApply(0);
} }
} }
}); });
@ -194,13 +194,13 @@ describe('compiler compliance: styling', () => {
const template = ` const template = `
template: function MyComponent_Template(rf, $ctx$) { template: function MyComponent_Template(rf, $ctx$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "div"); $r3$.ɵelementStart(0, "div");
$r3$.ɵs(); $r3$.ɵelementStyling();
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵsm(0,$ctx$.myClassExp); $r3$.ɵelementStylingMap(0,$ctx$.myClassExp);
$r3$.ɵsa(0); $r3$.ɵelementStylingApply(0);
} }
} }
`; `;
@ -248,16 +248,16 @@ describe('compiler compliance: styling', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template: function MyComponent_Template(rf, $ctx$) { template: function MyComponent_Template(rf, $ctx$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "div"); $r3$.ɵelementStart(0, "div");
$r3$.ɵs(_c0); $r3$.ɵelementStyling(_c0);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵsm(0, $ctx$.myClassExp); $r3$.ɵelementStylingMap(0, $ctx$.myClassExp);
$r3$.ɵcp(0, 1, $ctx$.yesToApple); $r3$.ɵelementClassProp(0, 1, $ctx$.yesToApple);
$r3$.ɵcp(0, 2, $ctx$.yesToOrange); $r3$.ɵelementClassProp(0, 2, $ctx$.yesToOrange);
$r3$.ɵsa(0); $r3$.ɵelementStylingApply(0);
$r3$.ɵa(0, "class", $r3$.ɵb("banana")); $r3$.ɵelementAttribute(0, "class", $r3$.ɵbind("banana"));
} }
} }
}); });
@ -302,13 +302,13 @@ describe('compiler compliance: styling', () => {
features: [$r3$.ɵPublicFeature], features: [$r3$.ɵPublicFeature],
template: function MyComponent_Template(rf, $ctx$) { template: function MyComponent_Template(rf, $ctx$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, "div"); $r3$.ɵelementStart(0, "div");
$r3$.ɵs(_c0, _c1); $r3$.ɵelementStyling(_c0, _c1);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵa(0, "class", $r3$.ɵb("round")); $r3$.ɵelementAttribute(0, "class", $r3$.ɵbind("round"));
$r3$.ɵa(0, "style", $r3$.ɵb("height:100px"), $r3$.ɵzs); $r3$.ɵelementAttribute(0, "style", $r3$.ɵbind("height:100px"), $r3$.ɵzs);
} }
} }
}); });

View File

@ -54,60 +54,60 @@ describe('compiler compliance: template', () => {
function MyComponent_ul_li_div_Template_1(rf, ctx) { function MyComponent_ul_li_div_Template_1(rf, ctx) {
if (rf & 1) { if (rf & 1) {
const $s$ = $i0$.ɵgV(); const $s$ = $i0$.ɵgetCurrentView();
$i0$.ɵE(0, "div"); $i0$.ɵelementStart(0, "div");
$i0$.ɵL("click", function MyComponent_ul_li_div_Template_1_div_click_listener($event){ $i0$.ɵlistener("click", function MyComponent_ul_li_div_Template_1_div_click_listener($event){
$i0$.ɵrV($s$); $i0$.ɵrestoreView($s$);
const $inner$ = ctx.$implicit; const $inner$ = ctx.$implicit;
const $middle$ = $i0$.ɵx().$implicit; const $middle$ = $i0$.ɵnextContext().$implicit;
const $outer$ = $i0$.ɵx().$implicit; const $outer$ = $i0$.ɵnextContext().$implicit;
const $myComp$ = $i0$.ɵx(); const $myComp$ = $i0$.ɵnextContext();
return $myComp$.onClick($outer$, $middle$, $inner$); return $myComp$.onClick($outer$, $middle$, $inner$);
}); });
$i0$.ɵT(1); $i0$.ɵtext(1);
$i0$.ɵe(); $i0$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
const $inner1$ = ctx.$implicit; const $inner1$ = ctx.$implicit;
const $middle1$ = $i0$.ɵx().$implicit; const $middle1$ = $i0$.ɵnextContext().$implicit;
const $outer1$ = $i0$.ɵx().$implicit; const $outer1$ = $i0$.ɵnextContext().$implicit;
const $myComp1$ = $i0$.ɵx(); const $myComp1$ = $i0$.ɵnextContext();
$i0$.ɵp(0, "title", $i0$.ɵb($myComp1$.format($outer1$, $middle1$, $inner1$, $myComp1$.component))); $i0$.ɵelementProperty(0, "title", $i0$.ɵbind($myComp1$.format($outer1$, $middle1$, $inner1$, $myComp1$.component)));
$i0$.ɵt(1, $i0$.ɵi1(" ", $myComp1$.format($outer1$, $middle1$, $inner1$, $myComp1$.component), " ")); $i0$.ɵtextBinding(1, $i0$.ɵinterpolation1(" ", $myComp1$.format($outer1$, $middle1$, $inner1$, $myComp1$.component), " "));
} }
} }
function MyComponent_ul_li_Template_1(rf, ctx) { function MyComponent_ul_li_Template_1(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$i0$.ɵE(0, "li"); $i0$.ɵelementStart(0, "li");
$i0$.ɵC(1, MyComponent_ul_li_div_Template_1, null, _c0); $i0$.ɵcontainer(1, MyComponent_ul_li_div_Template_1, null, _c0);
$i0$.ɵe(); $i0$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
const $myComp2$ = $i0$.ɵx(2); const $myComp2$ = $i0$.ɵnextContext(2);
$i0$.ɵp(1, "ngForOf", $i0$.ɵb($myComp2$.items)); $i0$.ɵelementProperty(1, "ngForOf", $i0$.ɵbind($myComp2$.items));
} }
} }
function MyComponent_ul_Template_0(rf, ctx) { function MyComponent_ul_Template_0(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$i0$.ɵE(0, "ul"); $i0$.ɵelementStart(0, "ul");
$i0$.ɵC(1, MyComponent_ul_li_Template_1, null, _c0); $i0$.ɵcontainer(1, MyComponent_ul_li_Template_1, null, _c0);
$i0$.ɵe(); $i0$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
const $outer2$ = ctx.$implicit; const $outer2$ = ctx.$implicit;
$i0$.ɵp(1, "ngForOf", $i0$.ɵb($outer2$.items)); $i0$.ɵelementProperty(1, "ngForOf", $i0$.ɵbind($outer2$.items));
} }
} }
// ... // ...
template:function MyComponent_Template(rf, ctx){ template:function MyComponent_Template(rf, ctx){
if (rf & 1) { if (rf & 1) {
$i0$.ɵC(0, MyComponent_ul_Template_0, null, _c0); $i0$.ɵcontainer(0, MyComponent_ul_Template_0, null, _c0);
} }
if (rf & 2) { if (rf & 2) {
$i0$.ɵp(0, "ngForOf", $i0$.ɵb(ctx.items)); $i0$.ɵelementProperty(0, "ngForOf", $i0$.ɵbind(ctx.items));
} }
}`; }`;
@ -142,23 +142,23 @@ describe('compiler compliance: template', () => {
function MyComponent_span_Template_0(rf, ctx) { function MyComponent_span_Template_0(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$i0$.ɵE(0, "span"); $i0$.ɵelementStart(0, "span");
$i0$.ɵT(1); $i0$.ɵtext(1);
$i0$.ɵe(); $i0$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
const $item$ = ctx.$implicit; const $item$ = ctx.$implicit;
const $i$ = ctx.index; const $i$ = ctx.index;
$i0$.ɵt(1, $i0$.ɵi2(" ", $i$, " - ", $item$, " ")); $i0$.ɵtextBinding(1, $i0$.ɵinterpolation2(" ", $i$, " - ", $item$, " "));
} }
} }
// ... // ...
template:function MyComponent_Template(rf, ctx){ template:function MyComponent_Template(rf, ctx){
if (rf & 1) { if (rf & 1) {
$i0$.ɵC(0, MyComponent_span_Template_0, null, _c0); $i0$.ɵcontainer(0, MyComponent_span_Template_0, null, _c0);
} }
if (rf & 2) { if (rf & 2) {
$i0$.ɵp(0, "ngForOf", $i0$.ɵb(ctx.items)); $i0$.ɵelementProperty(0, "ngForOf", $i0$.ɵbind(ctx.items));
} }
}`; }`;
@ -196,37 +196,37 @@ describe('compiler compliance: template', () => {
function MyComponent_div_span_Template_1(rf, ctx) { function MyComponent_div_span_Template_1(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$i0$.ɵE(0, "span"); $i0$.ɵelementStart(0, "span");
$i0$.ɵT(1); $i0$.ɵtext(1);
$i0$.ɵe(); $i0$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
const $div$ = $i0$.ɵx(); const $div$ = $i0$.ɵnextContext();
const $i$ = $div$.index; const $i$ = $div$.index;
const $item$ = $div$.$implicit; const $item$ = $div$.$implicit;
$i0$.ɵt(1, $i0$.ɵi2(" ", $i$, " - ", $item$, " ")); $i0$.ɵtextBinding(1, $i0$.ɵinterpolation2(" ", $i$, " - ", $item$, " "));
} }
} }
function MyComponent_div_Template_0(rf, ctx) { function MyComponent_div_Template_0(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$i0$.ɵE(0, "div"); $i0$.ɵelementStart(0, "div");
$i0$.ɵC(1, MyComponent_div_span_Template_1, null, $c1$); $i0$.ɵcontainer(1, MyComponent_div_span_Template_1, null, $c1$);
$i0$.ɵe(); $i0$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
const $app$ = $i0$.ɵx(); const $app$ = $i0$.ɵnextContext();
$i0$.ɵp(1, "ngIf", $i0$.ɵb($app$.showing)); $i0$.ɵelementProperty(1, "ngIf", $i0$.ɵbind($app$.showing));
} }
} }
// ... // ...
template:function MyComponent_Template(rf, ctx){ template:function MyComponent_Template(rf, ctx){
if (rf & 1) { if (rf & 1) {
$i0$.ɵC(0, MyComponent_div_Template_0, null, $c0$); $i0$.ɵcontainer(0, MyComponent_div_Template_0, null, $c0$);
} }
if (rf & 2) { if (rf & 2) {
$i0$.ɵp(0, "ngForOf", $i0$.ɵb(ctx.items)); $i0$.ɵelementProperty(0, "ngForOf", $i0$.ɵbind(ctx.items));
} }
}`; }`;
@ -265,47 +265,47 @@ describe('compiler compliance: template', () => {
const $c0$ = ["ngFor", "", "ngForOf", ""]; const $c0$ = ["ngFor", "", "ngForOf", ""];
function MyComponent_div_div_div_Template_1(rf, ctx) { function MyComponent_div_div_div_Template_1(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$i0$.ɵE(0, "div"); $i0$.ɵelementStart(0, "div");
$i0$.ɵT(1); $i0$.ɵtext(1);
$i0$.ɵe(); $i0$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
const $middle$ = $i0$.ɵx().$implicit; const $middle$ = $i0$.ɵnextContext().$implicit;
const $myComp$ = $i0$.ɵx(2); const $myComp$ = $i0$.ɵnextContext(2);
$i0$.ɵt(1, $i0$.ɵi2(" ", $middle$.value, " - ", $myComp$.name, " ")); $i0$.ɵtextBinding(1, $i0$.ɵinterpolation2(" ", $middle$.value, " - ", $myComp$.name, " "));
} }
} }
function MyComponent_div_div_Template_1(rf, ctx) { function MyComponent_div_div_Template_1(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$i0$.ɵE(0, "div"); $i0$.ɵelementStart(0, "div");
$i0$.ɵC(1, MyComponent_div_div_div_Template_1, null, _c0); $i0$.ɵcontainer(1, MyComponent_div_div_div_Template_1, null, _c0);
$i0$.ɵe(); $i0$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
const $middle$ = ctx.$implicit; const $middle$ = ctx.$implicit;
$i0$.ɵp(1, "ngForOf", $i0$.ɵb($middle$.items)); $i0$.ɵelementProperty(1, "ngForOf", $i0$.ɵbind($middle$.items));
} }
} }
function MyComponent_div_Template_0(rf, ctx) { function MyComponent_div_Template_0(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$i0$.ɵE(0, "div"); $i0$.ɵelementStart(0, "div");
$i0$.ɵC(1, MyComponent_div_div_Template_1, null, _c0); $i0$.ɵcontainer(1, MyComponent_div_div_Template_1, null, _c0);
$i0$.ɵe(); $i0$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
const $outer$ = ctx.$implicit; const $outer$ = ctx.$implicit;
$i0$.ɵp(1, "ngForOf", $i0$.ɵb($outer$.items)); $i0$.ɵelementProperty(1, "ngForOf", $i0$.ɵbind($outer$.items));
} }
} }
// ... // ...
template:function MyComponent_Template(rf, ctx){ template:function MyComponent_Template(rf, ctx){
if (rf & 1) { if (rf & 1) {
$i0$.ɵC(0, MyComponent_div_Template_0, null, _c0); $i0$.ɵcontainer(0, MyComponent_div_Template_0, null, _c0);
} }
if (rf & 2) { if (rf & 2) {
$i0$.ɵp(0, "ngForOf", $i0$.ɵb(ctx.items)); $i0$.ɵelementProperty(0, "ngForOf", $i0$.ɵbind(ctx.items));
} }
}`; }`;
@ -340,7 +340,7 @@ describe('compiler compliance: template', () => {
function Template_0(rf, ctx) { function Template_0(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$i0$.ɵT(0, " some-content "); $i0$.ɵtext(0, " some-content ");
} }
} }
@ -348,10 +348,10 @@ describe('compiler compliance: template', () => {
template: function MyComponent_Template(rf, ctx) { template: function MyComponent_Template(rf, ctx) {
if (rf & 1) { if (rf & 1) {
$i0$.ɵC(0, Template_0, null, $c0$); $i0$.ɵcontainer(0, Template_0, null, $c0$);
} }
if (rf & 2) { if (rf & 2) {
$i0$.ɵp(0, "boundAttr", $i0$.ɵb(ctx.b)); $i0$.ɵelementProperty(0, "boundAttr", $i0$.ɵbind(ctx.b));
} }
}`; }`;

View File

@ -502,11 +502,11 @@ describe('ngtsc behavioral tests', () => {
expect(errorSpy).not.toHaveBeenCalled(); expect(errorSpy).not.toHaveBeenCalled();
expect(exitCode).toBe(0); expect(exitCode).toBe(0);
const jsContents = getContents('test.js'); const jsContents = getContents('test.js');
expect(jsContents).toContain(`i0.ɵQ(null, ["bar"], true, TemplateRef)`); expect(jsContents).toContain(`i0.ɵquery(null, ["bar"], true, TemplateRef)`);
expect(jsContents).toContain(`i0.ɵQ(null, TemplateRef, false)`); expect(jsContents).toContain(`i0.ɵquery(null, TemplateRef, false)`);
expect(jsContents).toContain(`i0.ɵQ(null, ["test2"], true)`); expect(jsContents).toContain(`i0.ɵquery(null, ["test2"], true)`);
expect(jsContents).toContain(`i0.ɵQ(0, ["accessor"], true)`); expect(jsContents).toContain(`i0.ɵquery(0, ["accessor"], true)`);
expect(jsContents).toContain(`i0.ɵQ(1, ["test1"], true)`); expect(jsContents).toContain(`i0.ɵquery(1, ["test1"], true)`);
}); });
it('should handle queries that use forwardRef', () => { it('should handle queries that use forwardRef', () => {
@ -529,8 +529,8 @@ describe('ngtsc behavioral tests', () => {
expect(errorSpy).not.toHaveBeenCalled(); expect(errorSpy).not.toHaveBeenCalled();
expect(exitCode).toBe(0); expect(exitCode).toBe(0);
const jsContents = getContents('test.js'); const jsContents = getContents('test.js');
expect(jsContents).toContain(`i0.ɵQ(null, TemplateRef, true)`); expect(jsContents).toContain(`i0.ɵquery(null, TemplateRef, true)`);
expect(jsContents).toContain(`i0.ɵQ(null, ViewContainerRef, true)`); expect(jsContents).toContain(`i0.ɵquery(null, ViewContainerRef, true)`);
}); });
it('should generate host bindings for directives', () => { it('should generate host bindings for directives', () => {
@ -562,12 +562,18 @@ describe('ngtsc behavioral tests', () => {
expect(errorSpy).not.toHaveBeenCalled(); expect(errorSpy).not.toHaveBeenCalled();
expect(exitCode).toBe(0); expect(exitCode).toBe(0);
const jsContents = getContents('test.js'); const jsContents = getContents('test.js');
expect(jsContents).toContain(`i0.ɵp(elIndex, "attr.hello", i0.ɵb(i0.ɵd(dirIndex).foo));`);
expect(jsContents).toContain(`i0.ɵp(elIndex, "prop", i0.ɵb(i0.ɵd(dirIndex).bar));`);
expect(jsContents) expect(jsContents)
.toContain('i0.ɵp(elIndex, "class.someclass", i0.ɵb(i0.ɵd(dirIndex).someClass))'); .toContain(
expect(jsContents).toContain('i0.ɵd(dirIndex).onClick($event)'); `i0.ɵelementProperty(elIndex, "attr.hello", i0.ɵbind(i0.ɵloadDirective(dirIndex).foo));`);
expect(jsContents).toContain('i0.ɵd(dirIndex).onChange(i0.ɵd(dirIndex).arg)'); expect(jsContents)
.toContain(
`i0.ɵelementProperty(elIndex, "prop", i0.ɵbind(i0.ɵloadDirective(dirIndex).bar));`);
expect(jsContents)
.toContain(
'i0.ɵelementProperty(elIndex, "class.someclass", i0.ɵbind(i0.ɵloadDirective(dirIndex).someClass))');
expect(jsContents).toContain('i0.ɵloadDirective(dirIndex).onClick($event)');
expect(jsContents)
.toContain('i0.ɵloadDirective(dirIndex).onChange(i0.ɵloadDirective(dirIndex).arg)');
}); });
it('should correctly recognize local symbols', () => { it('should correctly recognize local symbols', () => {

View File

@ -87,12 +87,12 @@ GreetComponent.ngComponentDef = i0.ɵdefineComponent({
factory: () => new GreetComponent(), factory: () => new GreetComponent(),
template: function (rf, ctx) { template: function (rf, ctx) {
if (rf & RenderFlags.Create) { if (rf & RenderFlags.Create) {
i0.ɵE(0, 'div'); i0.ɵelementStart(0, 'div');
i0.ɵT(1); i0.ɵtext(1);
i0.ɵe(); i0.ɵelementEnd();
} }
if (rf & RenderFlags.Update) { if (rf & RenderFlags.Update) {
i0.ɵt(1, i0.ɵi1('Hello ', ctx.name, '!')); i0.ɵtextBinding(1, i0.ɵinterpolation1('Hello ', ctx.name, '!'));
} }
} }
}); });

View File

@ -17,87 +17,88 @@ export class Identifiers {
static PATCH_DEPS = 'patchedDeps'; static PATCH_DEPS = 'patchedDeps';
/* Instructions */ /* Instructions */
static namespaceHTML: o.ExternalReference = {name: NH', moduleName: CORE}; static namespaceHTML: o.ExternalReference = {name: namespaceHTML', moduleName: CORE};
static namespaceMathML: o.ExternalReference = {name: NM', moduleName: CORE}; static namespaceMathML: o.ExternalReference = {name: namespaceMathML', moduleName: CORE};
static namespaceSVG: o.ExternalReference = {name: NS', moduleName: CORE}; static namespaceSVG: o.ExternalReference = {name: namespaceSVG', moduleName: CORE};
static element: o.ExternalReference = {name: Ee', moduleName: CORE}; static element: o.ExternalReference = {name: element', moduleName: CORE};
static elementStart: o.ExternalReference = {name: E', moduleName: CORE}; static elementStart: o.ExternalReference = {name: elementStart', moduleName: CORE};
static elementEnd: o.ExternalReference = {name: 'ɵe', moduleName: CORE}; static elementEnd: o.ExternalReference = {name: 'ɵelementEnd', moduleName: CORE};
static elementProperty: o.ExternalReference = {name: p', moduleName: CORE}; static elementProperty: o.ExternalReference = {name: elementProperty', moduleName: CORE};
static elementAttribute: o.ExternalReference = {name: a', moduleName: CORE}; static elementAttribute: o.ExternalReference = {name: elementAttribute', moduleName: CORE};
static elementClassProp: o.ExternalReference = {name: cp', moduleName: CORE}; static elementClassProp: o.ExternalReference = {name: elementClassProp', moduleName: CORE};
static elementContainerStart: o.ExternalReference = {name: 'ɵEC', moduleName: CORE}; static elementContainerStart: o.ExternalReference = {name: 'ɵEC', moduleName: CORE};
static elementContainerEnd: o.ExternalReference = {name: 'ɵeC', moduleName: CORE}; static elementContainerEnd: o.ExternalReference = {name: 'ɵeC', moduleName: CORE};
static elementStyling: o.ExternalReference = {name: s', moduleName: CORE}; static elementStyling: o.ExternalReference = {name: elementStyling', moduleName: CORE};
static elementStylingMap: o.ExternalReference = {name: sm', moduleName: CORE}; static elementStylingMap: o.ExternalReference = {name: elementStylingMap', moduleName: CORE};
static elementStyleProp: o.ExternalReference = {name: sp', moduleName: CORE}; static elementStyleProp: o.ExternalReference = {name: elementStylingProp', moduleName: CORE};
static elementStylingApply: o.ExternalReference = {name: 'ɵsa', moduleName: CORE}; static elementStylingApply:
o.ExternalReference = {name: 'ɵelementStylingApply', moduleName: CORE};
static containerCreate: o.ExternalReference = {name: C', moduleName: CORE}; static containerCreate: o.ExternalReference = {name: container', moduleName: CORE};
static nextContext: o.ExternalReference = {name: x', moduleName: CORE}; static nextContext: o.ExternalReference = {name: nextContext', moduleName: CORE};
static text: o.ExternalReference = {name: T', moduleName: CORE}; static text: o.ExternalReference = {name: text', moduleName: CORE};
static textBinding: o.ExternalReference = {name: 'ɵt', moduleName: CORE}; static textBinding: o.ExternalReference = {name: 'ɵtextBinding', moduleName: CORE};
static bind: o.ExternalReference = {name: 'ɵb', moduleName: CORE}; static bind: o.ExternalReference = {name: 'ɵbind', moduleName: CORE};
static getCurrentView: o.ExternalReference = {name: 'ɵgV', moduleName: CORE}; static getCurrentView: o.ExternalReference = {name: 'ɵgetCurrentView', moduleName: CORE};
static restoreView: o.ExternalReference = {name: 'ɵrV', moduleName: CORE}; static restoreView: o.ExternalReference = {name: 'ɵrestoreView', moduleName: CORE};
static interpolation1: o.ExternalReference = {name: 'ɵi1', moduleName: CORE}; static interpolation1: o.ExternalReference = {name: 'ɵinterpolation1', moduleName: CORE};
static interpolation2: o.ExternalReference = {name: 'ɵi2', moduleName: CORE}; static interpolation2: o.ExternalReference = {name: 'ɵinterpolation2', moduleName: CORE};
static interpolation3: o.ExternalReference = {name: 'ɵi3', moduleName: CORE}; static interpolation3: o.ExternalReference = {name: 'ɵinterpolation3', moduleName: CORE};
static interpolation4: o.ExternalReference = {name: 'ɵi4', moduleName: CORE}; static interpolation4: o.ExternalReference = {name: 'ɵinterpolation4', moduleName: CORE};
static interpolation5: o.ExternalReference = {name: 'ɵi5', moduleName: CORE}; static interpolation5: o.ExternalReference = {name: 'ɵinterpolation5', moduleName: CORE};
static interpolation6: o.ExternalReference = {name: 'ɵi6', moduleName: CORE}; static interpolation6: o.ExternalReference = {name: 'ɵinterpolation6', moduleName: CORE};
static interpolation7: o.ExternalReference = {name: 'ɵi7', moduleName: CORE}; static interpolation7: o.ExternalReference = {name: 'ɵinterpolation7', moduleName: CORE};
static interpolation8: o.ExternalReference = {name: 'ɵi8', moduleName: CORE}; static interpolation8: o.ExternalReference = {name: 'ɵinterpolation8', moduleName: CORE};
static interpolationV: o.ExternalReference = {name: 'ɵiV', moduleName: CORE}; static interpolationV: o.ExternalReference = {name: 'ɵinterpolationV', moduleName: CORE};
static pureFunction0: o.ExternalReference = {name: f0', moduleName: CORE}; static pureFunction0: o.ExternalReference = {name: pureFunction0', moduleName: CORE};
static pureFunction1: o.ExternalReference = {name: f1', moduleName: CORE}; static pureFunction1: o.ExternalReference = {name: pureFunction1', moduleName: CORE};
static pureFunction2: o.ExternalReference = {name: f2', moduleName: CORE}; static pureFunction2: o.ExternalReference = {name: pureFunction2', moduleName: CORE};
static pureFunction3: o.ExternalReference = {name: f3', moduleName: CORE}; static pureFunction3: o.ExternalReference = {name: pureFunction3', moduleName: CORE};
static pureFunction4: o.ExternalReference = {name: f4', moduleName: CORE}; static pureFunction4: o.ExternalReference = {name: pureFunction4', moduleName: CORE};
static pureFunction5: o.ExternalReference = {name: f5', moduleName: CORE}; static pureFunction5: o.ExternalReference = {name: pureFunction5', moduleName: CORE};
static pureFunction6: o.ExternalReference = {name: f6', moduleName: CORE}; static pureFunction6: o.ExternalReference = {name: pureFunction6', moduleName: CORE};
static pureFunction7: o.ExternalReference = {name: f7', moduleName: CORE}; static pureFunction7: o.ExternalReference = {name: pureFunction7', moduleName: CORE};
static pureFunction8: o.ExternalReference = {name: f8', moduleName: CORE}; static pureFunction8: o.ExternalReference = {name: pureFunction8', moduleName: CORE};
static pureFunctionV: o.ExternalReference = {name: fV', moduleName: CORE}; static pureFunctionV: o.ExternalReference = {name: pureFunctionV', moduleName: CORE};
static pipeBind1: o.ExternalReference = {name: 'ɵpb1', moduleName: CORE}; static pipeBind1: o.ExternalReference = {name: 'ɵpipeBind1', moduleName: CORE};
static pipeBind2: o.ExternalReference = {name: 'ɵpb2', moduleName: CORE}; static pipeBind2: o.ExternalReference = {name: 'ɵpipeBind2', moduleName: CORE};
static pipeBind3: o.ExternalReference = {name: 'ɵpb3', moduleName: CORE}; static pipeBind3: o.ExternalReference = {name: 'ɵpipeBind3', moduleName: CORE};
static pipeBind4: o.ExternalReference = {name: 'ɵpb4', moduleName: CORE}; static pipeBind4: o.ExternalReference = {name: 'ɵpipeBind4', moduleName: CORE};
static pipeBindV: o.ExternalReference = {name: 'ɵpbV', moduleName: CORE}; static pipeBindV: o.ExternalReference = {name: 'ɵpipeBindV', moduleName: CORE};
static load: o.ExternalReference = {name: 'ɵld', moduleName: CORE}; static load: o.ExternalReference = {name: 'ɵload', moduleName: CORE};
static loadDirective: o.ExternalReference = {name: d', moduleName: CORE}; static loadDirective: o.ExternalReference = {name: loadDirective', moduleName: CORE};
static loadQueryList: o.ExternalReference = {name: ql', moduleName: CORE}; static loadQueryList: o.ExternalReference = {name: loadQueryList', moduleName: CORE};
static pipe: o.ExternalReference = {name: Pp', moduleName: CORE}; static pipe: o.ExternalReference = {name: pipe', moduleName: CORE};
static projection: o.ExternalReference = {name: P', moduleName: CORE}; static projection: o.ExternalReference = {name: projection', moduleName: CORE};
static projectionDef: o.ExternalReference = {name: 'ɵpD', moduleName: CORE}; static projectionDef: o.ExternalReference = {name: 'ɵprojectionDef', moduleName: CORE};
static reference: o.ExternalReference = {name: 'ɵr', moduleName: CORE}; static reference: o.ExternalReference = {name: 'ɵreference', moduleName: CORE};
static inject: o.ExternalReference = {name: 'inject', moduleName: CORE}; static inject: o.ExternalReference = {name: 'inject', moduleName: CORE};
@ -160,9 +161,10 @@ export class Identifiers {
static definePipe: o.ExternalReference = {name: 'ɵdefinePipe', moduleName: CORE}; static definePipe: o.ExternalReference = {name: 'ɵdefinePipe', moduleName: CORE};
static query: o.ExternalReference = {name: 'ɵQ', moduleName: CORE}; static query: o.ExternalReference = {name: 'ɵquery', moduleName: CORE};
static queryRefresh: o.ExternalReference = {name: 'ɵqR', moduleName: CORE}; static queryRefresh: o.ExternalReference = {name: 'ɵqueryRefresh', moduleName: CORE};
static registerContentQuery: o.ExternalReference = {name: 'ɵQr', moduleName: CORE}; static registerContentQuery:
o.ExternalReference = {name: 'ɵregisterContentQuery', moduleName: CORE};
static NgOnChangesFeature: o.ExternalReference = {name: 'ɵNgOnChangesFeature', moduleName: CORE}; static NgOnChangesFeature: o.ExternalReference = {name: 'ɵNgOnChangesFeature', moduleName: CORE};
@ -171,7 +173,7 @@ export class Identifiers {
static PublicFeature: o.ExternalReference = {name: 'ɵPublicFeature', moduleName: CORE}; static PublicFeature: o.ExternalReference = {name: 'ɵPublicFeature', moduleName: CORE};
static listener: o.ExternalReference = {name: L', moduleName: CORE}; static listener: o.ExternalReference = {name: listener', moduleName: CORE};
static getFactoryOf: o.ExternalReference = { static getFactoryOf: o.ExternalReference = {
name: 'ɵgetFactoryOf', name: 'ɵgetFactoryOf',
@ -184,7 +186,7 @@ export class Identifiers {
}; };
// Reserve slots for pure functions // Reserve slots for pure functions
static reserveSlots: o.ExternalReference = {name: 'ɵrS', moduleName: CORE}; static reserveSlots: o.ExternalReference = {name: 'ɵreserveSlots', moduleName: CORE};
// sanitization-related functions // sanitization-related functions
static sanitizeHtml: o.ExternalReference = {name: 'ɵzh', moduleName: CORE}; static sanitizeHtml: o.ExternalReference = {name: 'ɵzh', moduleName: CORE};

View File

@ -436,7 +436,7 @@ function createContentQueriesRefreshFunction(meta: R3DirectiveMetadata): o.Expre
// var $tmp$: any; // var $tmp$: any;
const temporary = temporaryAllocator(statements, TEMPORARY_NAME); const temporary = temporaryAllocator(statements, TEMPORARY_NAME);
// const $instance$ = $r3$.ɵd(dirIndex); // const $instance$ = $r3$.ɵloadDirective(dirIndex);
statements.push( statements.push(
directiveInstanceVar.set(o.importExpr(R3.loadDirective).callFn([o.variable('dirIndex')])) directiveInstanceVar.set(o.importExpr(R3.loadDirective).callFn([o.variable('dirIndex')]))
.toDeclStmt(o.INFERRED_TYPE, [o.StmtModifier.Final])); .toDeclStmt(o.INFERRED_TYPE, [o.StmtModifier.Final]));
@ -478,7 +478,7 @@ function createViewQueriesFunction(
const queryDefinition = createQueryDefinition(query, constantPool, i); const queryDefinition = createQueryDefinition(query, constantPool, i);
createStatements.push(queryDefinition.toStmt()); createStatements.push(queryDefinition.toStmt());
// update, e.g. (r3.qR(tmp = r3.ɵld(0)) && (ctx.someDir = tmp)); // update, e.g. (r3.qR(tmp = r3.ɵload(0)) && (ctx.someDir = tmp));
const temporary = tempAllocator(); const temporary = tempAllocator();
const getQueryList = o.importExpr(R3.load).callFn([o.literal(i)]); const getQueryList = o.importExpr(R3.load).callFn([o.literal(i)]);
const refresh = o.importExpr(R3.queryRefresh).callFn([temporary.set(getQueryList)]); const refresh = o.importExpr(R3.queryRefresh).callFn([temporary.set(getQueryList)]);

View File

@ -731,7 +731,7 @@ export class TemplateDefinitionBuilder implements t.Visitor<void>, LocalResolver
this.creationInstruction( this.creationInstruction(
template.sourceSpan, R3.containerCreate, trimTrailingNulls(parameters)); template.sourceSpan, R3.containerCreate, trimTrailingNulls(parameters));
// e.g. p(1, 'forOf', ɵb(ctx.items)); // e.g. p(1, 'forOf', ɵbind(ctx.items));
const context = o.variable(CONTEXT_NAME); const context = o.variable(CONTEXT_NAME);
template.inputs.forEach(input => { template.inputs.forEach(input => {
const value = input.value.visit(this._valueConverter); const value = input.value.visit(this._valueConverter);
@ -792,7 +792,7 @@ export class TemplateDefinitionBuilder implements t.Visitor<void>, LocalResolver
// * @meaning mean // * @meaning mean
// */ // */
// const MSG_XYZ = goog.getMsg('some content'); // const MSG_XYZ = goog.getMsg('some content');
// i0.ɵT(1, MSG_XYZ); // i0.ɵtext(1, MSG_XYZ);
// ``` // ```
visitSingleI18nTextChild(text: t.Text, i18nMeta: string) { visitSingleI18nTextChild(text: t.Text, i18nMeta: string) {
const meta = parseI18nMeta(i18nMeta); const meta = parseI18nMeta(i18nMeta);

View File

@ -36,86 +36,86 @@ export {
CssSelectorList as ɵCssSelectorList, CssSelectorList as ɵCssSelectorList,
markDirty as ɵmarkDirty, markDirty as ɵmarkDirty,
NgModuleFactory as ɵNgModuleFactory, NgModuleFactory as ɵNgModuleFactory,
NC as ɵNC, NO_CHANGE as ɵNO_CHANGE,
C as ɵC, container as ɵcontainer,
x as ɵx, nextContext as ɵnextContext,
E as ɵE, elementStart as ɵelementStart,
NH as ɵNH, namespaceHTML as ɵnamespaceHTML,
NM as ɵNM, namespaceMathML as ɵnamespaceMathML,
NS as ɵNS, namespaceSVG as ɵnamespaceSVG,
Ee as ɵEe, element as ɵelement,
L as ɵL, listener as ɵlistener,
T as ɵT, text as ɵtext,
V as ɵV, embeddedViewStart as ɵembeddedViewStart,
Q as ɵQ, query as ɵquery,
Qr as ɵQr, registerContentQuery as ɵregisterContentQuery,
d as ɵd, loadDirective as ɵloadDirective,
P as ɵP, projection as ɵprojection,
b as ɵb, bind as ɵbind,
i1 as ɵi1, interpolation1 as ɵinterpolation1,
i2 as ɵi2, interpolation2 as ɵinterpolation2,
i3 as ɵi3, interpolation3 as ɵinterpolation3,
i4 as ɵi4, interpolation4 as ɵinterpolation4,
i5 as ɵi5, interpolation5 as ɵinterpolation5,
i6 as ɵi6, interpolation6 as ɵinterpolation6,
i7 as ɵi7, interpolation7 as ɵinterpolation7,
i8 as ɵi8, interpolation8 as ɵinterpolation8,
iV as ɵiV, interpolationV as ɵinterpolationV,
pb1 as ɵpb1, pipeBind1 as ɵpipeBind1,
pb2 as ɵpb2, pipeBind2 as ɵpipeBind2,
pb3 as ɵpb3, pipeBind3 as ɵpipeBind3,
pb4 as ɵpb4, pipeBind4 as ɵpipeBind4,
pbV as ɵpbV, pipeBindV as ɵpipeBindV,
f0 as ɵf0, pureFunction0 as ɵpureFunction0,
f1 as ɵf1, pureFunction1 as ɵpureFunction1,
f2 as ɵf2, pureFunction2 as ɵpureFunction2,
f3 as ɵf3, pureFunction3 as ɵpureFunction3,
f4 as ɵf4, pureFunction4 as ɵpureFunction4,
f5 as ɵf5, pureFunction5 as ɵpureFunction5,
f6 as ɵf6, pureFunction6 as ɵpureFunction6,
f7 as ɵf7, pureFunction7 as ɵpureFunction7,
f8 as ɵf8, pureFunction8 as ɵpureFunction8,
fV as ɵfV, pureFunctionV as ɵpureFunctionV,
gV as ɵgV, getCurrentView as ɵgetCurrentView,
rV as ɵrV, restoreView as ɵrestoreView,
cR as ɵcR, containerRefreshStart as ɵcontainerRefreshStart,
cr as ɵcr, containerRefreshEnd as ɵcontainerRefreshEnd,
qR as ɵqR, queryRefresh as ɵqueryRefresh,
ql as ɵql, loadQueryList as ɵloadQueryList,
e as ɵe, elementEnd as ɵelementEnd,
p as ɵp, elementProperty as ɵelementProperty,
pD as ɵpD, projectionDef as ɵprojectionDef,
r as ɵr, reference as ɵreference,
rS as ɵrS, reserveSlots as ɵreserveSlots,
a as ɵa, elementAttribute as ɵelementAttribute,
s as ɵs, elementStyling as ɵelementStyling,
sm as ɵsm, elementStylingMap as ɵelementStylingMap,
sp as ɵsp, elementStyleProp as ɵelementStylingProp,
sa as ɵsa, elementStylingApply as ɵelementStylingApply,
cp as ɵcp, elementClassProp as ɵelementClassProp,
t as ɵt, textBinding as ɵtextBinding,
v as ɵv, embeddedViewEnd as ɵembeddedViewEnd,
st as ɵst, store as ɵstore,
ld as ɵld, load as ɵload,
Pp as ɵPp, pipe as ɵpipe,
BaseDef as ɵBaseDef, BaseDef as ɵBaseDef,
ComponentDef as ɵComponentDef, ComponentDef as ɵComponentDef,
ComponentDefInternal as ɵComponentDefInternal, ComponentDefInternal as ɵComponentDefInternal,
DirectiveDef as ɵDirectiveDef, DirectiveDef as ɵDirectiveDef,
PipeDef as ɵPipeDef, PipeDef as ɵPipeDef,
whenRendered as ɵwhenRendered, whenRendered as ɵwhenRendered,
iA as ɵiA, i18nApply as ɵi18nApply,
iEM as ɵiEM, i18nExpMapping as ɵi18nExpMapping,
iI1 as ɵiI1, i18nInterpolation1 as ɵi18nInterpolation1,
iI2 as ɵiI2, i18nInterpolation2 as ɵi18nInterpolation2,
iI3 as ɵiI3, i18nInterpolation3 as ɵi18nInterpolation3,
iI4 as ɵiI4, i18nInterpolation4 as ɵi18nInterpolation4,
iI5 as ɵiI5, i18nInterpolation5 as ɵi18nInterpolation5,
iI6 as ɵiI6, i18nInterpolation6 as ɵi18nInterpolation6,
iI7 as ɵiI7, i18nInterpolation7 as ɵi18nInterpolation7,
iI8 as ɵiI8, i18nInterpolation8 as ɵi18nInterpolation8,
iIV as ɵIV, i18nInterpolationV as ɵi18nInterpolationV,
iM as ɵiM, i18nMapping as ɵi18nMapping,
I18nInstruction as ɵI18nInstruction, I18nInstruction as ɵI18nInstruction,
I18nExpInstruction as ɵI18nExpInstruction, I18nExpInstruction as ɵI18nExpInstruction,
WRAP_RENDERER_FACTORY2 as ɵWRAP_RENDERER_FACTORY2, WRAP_RENDERER_FACTORY2 as ɵWRAP_RENDERER_FACTORY2,

View File

@ -19,93 +19,85 @@ export {QUERY_READ_CONTAINER_REF, QUERY_READ_ELEMENT_REF, QUERY_READ_FROM_NODE,
export {RenderFlags} from './interfaces/definition'; export {RenderFlags} from './interfaces/definition';
export {CssSelectorList} from './interfaces/projection'; export {CssSelectorList} from './interfaces/projection';
// Naming scheme:
// - Capital letters are for creating things: T(Text), E(Element), D(Directive), V(View),
// C(Container), L(Listener)
// - lower case letters are for binding: b(bind)
// - lower case letters are for binding target: p(property), a(attribute), k(class), s(style),
// i(input)
// - lower case letters for guarding life cycle hooks: l(lifeCycle)
// - lower case for closing: c(containerEnd), e(elementEnd), v(viewEnd)
// clang-format off // clang-format off
export { export {
NO_CHANGE as NC, NO_CHANGE,
bind as b, bind,
interpolation1 as i1, interpolation1,
interpolation2 as i2, interpolation2,
interpolation3 as i3, interpolation3,
interpolation4 as i4, interpolation4,
interpolation5 as i5, interpolation5,
interpolation6 as i6, interpolation6,
interpolation7 as i7, interpolation7,
interpolation8 as i8, interpolation8,
interpolationV as iV, interpolationV,
container as C, container,
containerRefreshStart as cR, containerRefreshStart,
containerRefreshEnd as cr, containerRefreshEnd,
nextContext as x, nextContext,
element as Ee, element,
elementAttribute as a, elementAttribute,
elementClassProp as cp, elementClassProp,
elementEnd as e, elementEnd,
elementProperty as p, elementProperty,
elementStart as E, elementStart,
elementContainerStart as EC, elementContainerStart,
elementContainerEnd as eC, elementContainerEnd,
elementStyling as s, elementStyling,
elementStylingMap as sm, elementStylingMap,
elementStyleProp as sp, elementStyleProp,
elementStylingApply as sa, elementStylingApply,
getCurrentView as gV, getCurrentView,
restoreView as rV, restoreView,
listener as L, listener,
store as st, store,
load as ld, load,
loadDirective as d, loadDirective,
namespaceHTML as NH, namespaceHTML,
namespaceMathML as NM, namespaceMathML,
namespaceSVG as NS, namespaceSVG,
projection as P, projection,
projectionDef as pD, projectionDef,
text as T, text,
textBinding as t, textBinding,
reference as r, reference,
reserveSlots as rS, reserveSlots,
embeddedViewStart as V, embeddedViewStart,
embeddedViewEnd as v, embeddedViewEnd,
detectChanges, detectChanges,
markDirty, markDirty,
tick, tick,
} from './instructions'; } from './instructions';
export { export {
i18nApply as iA, i18nApply,
i18nMapping as iM, i18nMapping,
i18nInterpolation1 as iI1, i18nInterpolation1,
i18nInterpolation2 as iI2, i18nInterpolation2,
i18nInterpolation3 as iI3, i18nInterpolation3,
i18nInterpolation4 as iI4, i18nInterpolation4,
i18nInterpolation5 as iI5, i18nInterpolation5,
i18nInterpolation6 as iI6, i18nInterpolation6,
i18nInterpolation7 as iI7, i18nInterpolation7,
i18nInterpolation8 as iI8, i18nInterpolation8,
i18nInterpolationV as iIV, i18nInterpolationV,
i18nExpMapping as iEM, i18nExpMapping,
I18nInstruction, I18nInstruction,
I18nExpInstruction I18nExpInstruction
} from './i18n'; } from './i18n';
@ -117,35 +109,35 @@ export {
} from './interfaces/node'; } from './interfaces/node';
export { export {
pipe as Pp, pipe,
pipeBind1 as pb1, pipeBind1,
pipeBind2 as pb2, pipeBind2,
pipeBind3 as pb3, pipeBind3,
pipeBind4 as pb4, pipeBind4,
pipeBindV as pbV, pipeBindV,
} from './pipe'; } from './pipe';
export { export {
QueryList, QueryList,
query as Q, query,
queryRefresh as qR, queryRefresh,
} from './query'; } from './query';
export { export {
registerContentQuery as Qr, registerContentQuery,
loadQueryList as ql, loadQueryList,
} from './instructions'; } from './instructions';
export { export {
pureFunction0 as f0, pureFunction0,
pureFunction1 as f1, pureFunction1,
pureFunction2 as f2, pureFunction2,
pureFunction3 as f3, pureFunction3,
pureFunction4 as f4, pureFunction4,
pureFunction5 as f5, pureFunction5,
pureFunction6 as f6, pureFunction6,
pureFunction7 as f7, pureFunction7,
pureFunction8 as f8, pureFunction8,
pureFunctionV as fV, pureFunctionV,
} from './pure_function'; } from './pure_function';

View File

@ -37,68 +37,68 @@ export const angularCoreEnv: {[name: string]: Function} = {
'ɵNgOnChangesFeature': r3.NgOnChangesFeature, 'ɵNgOnChangesFeature': r3.NgOnChangesFeature,
'ɵPublicFeature': r3.PublicFeature, 'ɵPublicFeature': r3.PublicFeature,
'ɵInheritDefinitionFeature': r3.InheritDefinitionFeature, 'ɵInheritDefinitionFeature': r3.InheritDefinitionFeature,
a': r3.a, elementAttribute': r3.elementAttribute,
'ɵb': r3.b, 'ɵbind': r3.bind,
C': r3.C, container': r3.container,
x': r3.x, nextContext': r3.nextContext,
'ɵcR': r3.cR, 'ɵcontainerRefreshStart': r3.containerRefreshStart,
'ɵcr': r3.cr, 'ɵcontainerRefreshEnd': r3.containerRefreshEnd,
d': r3.d, loadDirective': r3.loadDirective,
ql': r3.ql, loadQueryList': r3.loadQueryList,
NH': r3.NH, namespaceHTML': r3.namespaceHTML,
NM': r3.NM, namespaceMathML': r3.namespaceMathML,
NS': r3.NS, namespaceSVG': r3.namespaceSVG,
E': r3.E, elementStart': r3.elementStart,
'ɵe': r3.e, 'ɵelementEnd': r3.elementEnd,
Ee': r3.Ee, element': r3.element,
'ɵEC': r3.EC, 'ɵEC': r3.elementContainerStart,
'ɵeC': r3.eC, 'ɵeC': r3.elementContainerEnd,
f0': r3.f0, pureFunction0': r3.pureFunction0,
f1': r3.f1, pureFunction1': r3.pureFunction1,
f2': r3.f2, pureFunction2': r3.pureFunction2,
f3': r3.f3, pureFunction3': r3.pureFunction3,
f4': r3.f4, pureFunction4': r3.pureFunction4,
f5': r3.f5, pureFunction5': r3.pureFunction5,
f6': r3.f6, pureFunction6': r3.pureFunction6,
f7': r3.f7, pureFunction7': r3.pureFunction7,
f8': r3.f8, pureFunction8': r3.pureFunction8,
fV': r3.fV, pureFunctionV': r3.pureFunctionV,
'ɵgV': r3.gV, 'ɵgetCurrentView': r3.getCurrentView,
'ɵrV': r3.rV, 'ɵrestoreView': r3.restoreView,
'ɵi1': r3.i1, 'ɵinterpolation1': r3.interpolation1,
'ɵi2': r3.i2, 'ɵinterpolation2': r3.interpolation2,
'ɵi3': r3.i3, 'ɵinterpolation3': r3.interpolation3,
'ɵi4': r3.i4, 'ɵinterpolation4': r3.interpolation4,
'ɵi5': r3.i5, 'ɵinterpolation5': r3.interpolation5,
'ɵi6': r3.i6, 'ɵinterpolation6': r3.interpolation6,
'ɵi7': r3.i7, 'ɵinterpolation7': r3.interpolation7,
'ɵi8': r3.i8, 'ɵinterpolation8': r3.interpolation8,
'ɵiV': r3.iV, 'ɵinterpolationV': r3.interpolationV,
cp': r3.cp, elementClassProp': r3.elementClassProp,
L': r3.L, listener': r3.listener,
'ɵld': r3.ld, 'ɵload': r3.load,
P': r3.P, projection': r3.projection,
p': r3.p, elementProperty': r3.elementProperty,
'ɵpb1': r3.pb1, 'ɵpipeBind1': r3.pipeBind1,
'ɵpb2': r3.pb2, 'ɵpipeBind2': r3.pipeBind1,
'ɵpb3': r3.pb3, 'ɵpipeBind3': r3.pipeBind3,
'ɵpb4': r3.pb4, 'ɵpipeBind4': r3.pipeBind4,
'ɵpbV': r3.pbV, 'ɵpipeBindV': r3.pipeBindV,
'ɵpD': r3.pD, 'ɵprojectionDef': r3.projectionDef,
Pp': r3.Pp, pipe': r3.pipe,
Q': r3.Q, query': r3.query,
'ɵqR': r3.qR, 'ɵqueryRefresh': r3.queryRefresh,
Qr': r3.Qr, registerContentQuery': r3.registerContentQuery,
'ɵrS': r3.rS, 'ɵreserveSlots': r3.reserveSlots,
'ɵr': r3.r, 'ɵreference': r3.reference,
s': r3.s, elementStyling': r3.elementStyling,
sm': r3.sm, elementStylingMap': r3.elementStylingMap,
sp': r3.sp, elementStylingProp': r3.elementStyleProp,
sa': r3.sa, elementStylingApply': r3.elementStylingApply,
T': r3.T, text': r3.text,
'ɵt': r3.t, 'ɵtextBinding': r3.textBinding,
V': r3.V, embeddedViewStart': r3.embeddedViewStart,
v': r3.v, embeddedViewEnd': r3.embeddedViewEnd,
'ɵzh': sanitization.sanitizeHtml, 'ɵzh': sanitization.sanitizeHtml,
'ɵzs': sanitization.sanitizeStyle, 'ɵzs': sanitization.sanitizeStyle,

View File

@ -34,7 +34,7 @@ describe('components & directives', () => {
factory: function ChildComponent_Factory() { return new ChildComponent(); }, factory: function ChildComponent_Factory() { return new ChildComponent(); },
template: function ChildComponent_Template(rf: $RenderFlags$, ctx: $ChildComponent$) { template: function ChildComponent_Template(rf: $RenderFlags$, ctx: $ChildComponent$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵT(0, 'child-view'); $r3$.ɵtext(0, 'child-view');
} }
} }
}); });
@ -69,8 +69,8 @@ describe('components & directives', () => {
factory: () => new MyComponent(), factory: () => new MyComponent(),
template: function(rf: $RenderFlags$, ctx: $MyComponent$) { template: function(rf: $RenderFlags$, ctx: $MyComponent$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, 'child', $e0_attrs$); $r3$.ɵelement(0, 'child', $e0_attrs$);
$r3$.ɵT(1, '!'); $r3$.ɵtext(1, '!');
} }
} }
}); });
@ -100,7 +100,8 @@ describe('components & directives', () => {
selectors: [['', 'hostBindingDir', '']], selectors: [['', 'hostBindingDir', '']],
factory: function HostBindingDir_Factory() { return new HostBindingDir(); }, factory: function HostBindingDir_Factory() { return new HostBindingDir(); },
hostBindings: function HostBindingDir_HostBindings(dirIndex: $number$, elIndex: $number$) { hostBindings: function HostBindingDir_HostBindings(dirIndex: $number$, elIndex: $number$) {
$r3$.ɵp(elIndex, 'id', $r3$.ɵb($r3$.ɵd<HostBindingDir>(dirIndex).dirId)); $r3$.ɵelementProperty(
elIndex, 'id', $r3$.ɵbind($r3$.ɵloadDirective<HostBindingDir>(dirIndex).dirId));
} }
}); });
// /NORMATIVE // /NORMATIVE
@ -121,7 +122,7 @@ describe('components & directives', () => {
factory: function MyApp_Factory() { return new MyApp(); }, factory: function MyApp_Factory() { return new MyApp(); },
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) { template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, 'div', $e0_attrs$); $r3$.ɵelement(0, 'div', $e0_attrs$);
} }
} }
}); });
@ -149,7 +150,8 @@ describe('components & directives', () => {
type: HostListenerDir, type: HostListenerDir,
factory: function HostListenerDir_Factory() { factory: function HostListenerDir_Factory() {
const $dir$ = new HostListenerDir(); const $dir$ = new HostListenerDir();
$r3$.ɵL('click', function HostListenerDir_click_Handler(event: any) { $dir$.onClick(); }); $r3$.ɵlistener(
'click', function HostListenerDir_click_Handler(event: any) { $dir$.onClick(); });
return $dir$; return $dir$;
}, },
}); });
@ -171,9 +173,9 @@ describe('components & directives', () => {
factory: function MyApp_Factory() { return new MyApp(); }, factory: function MyApp_Factory() { return new MyApp(); },
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) { template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'button', $e0_attrs$); $r3$.ɵelementStart(0, 'button', $e0_attrs$);
$r3$.ɵT(1, 'Click'); $r3$.ɵtext(1, 'Click');
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
} }
}); });
@ -218,7 +220,7 @@ describe('components & directives', () => {
factory: function MyApp_Factory() { return new MyApp(); }, factory: function MyApp_Factory() { return new MyApp(); },
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) { template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, 'div', $e0_attrs$); $r3$.ɵelement(0, 'div', $e0_attrs$);
} }
} }
}); });
@ -245,7 +247,9 @@ describe('components & directives', () => {
selectors: [['', 'hostBindingDir', '']], selectors: [['', 'hostBindingDir', '']],
factory: function HostBindingDir_Factory() { return new HostBindingDir(); }, factory: function HostBindingDir_Factory() { return new HostBindingDir(); },
hostBindings: function HostBindingDir_HostBindings(dirIndex: $number$, elIndex: $number$) { hostBindings: function HostBindingDir_HostBindings(dirIndex: $number$, elIndex: $number$) {
$r3$.ɵa(elIndex, 'aria-label', $r3$.ɵb($r3$.ɵd<HostBindingDir>(dirIndex).label)); $r3$.ɵelementAttribute(
elIndex, 'aria-label',
$r3$.ɵbind($r3$.ɵloadDirective<HostBindingDir>(dirIndex).label));
} }
}); });
// /NORMATIVE // /NORMATIVE
@ -266,7 +270,7 @@ describe('components & directives', () => {
factory: function MyApp_Factory() { return new MyApp(); }, factory: function MyApp_Factory() { return new MyApp(); },
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) { template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, 'div', $e0_attrs$); $r3$.ɵelement(0, 'div', $e0_attrs$);
} }
} }
}); });
@ -302,9 +306,9 @@ describe('components & directives', () => {
factory: function MyComp_Factory() { return new MyComp(); }, factory: function MyComp_Factory() { return new MyComp(); },
template: function MyComp_Template(rf: $RenderFlags$, ctx: $MyComp$) { template: function MyComp_Template(rf: $RenderFlags$, ctx: $MyComp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵT(0); $r3$.ɵtext(0);
} }
$r3$.ɵt(0, $r3$.ɵb(ctx.name)); $r3$.ɵtextBinding(0, $r3$.ɵbind(ctx.name));
}, },
inputs: {name: 'name'}, inputs: {name: 'name'},
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush
@ -327,10 +331,10 @@ describe('components & directives', () => {
factory: function MyApp_Factory() { return new MyApp(); }, factory: function MyApp_Factory() { return new MyApp(); },
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) { template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, 'my-comp'); $r3$.ɵelement(0, 'my-comp');
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp(0, 'name', $r3$.ɵb(ctx.name)); $r3$.ɵelementProperty(0, 'name', $r3$.ɵbind(ctx.name));
} }
} }
}); });
@ -378,24 +382,24 @@ describe('components & directives', () => {
factory: () => new MyComponent(), factory: () => new MyComponent(),
template: function(rf: $RenderFlags$, ctx: $MyComponent$) { template: function(rf: $RenderFlags$, ctx: $MyComponent$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'ul', null, $e0_locals$); $r3$.ɵelementStart(0, 'ul', null, $e0_locals$);
$r3$.ɵC(2, C1, '', ['if', '']); $r3$.ɵcontainer(2, C1, '', ['if', '']);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
let $foo$ = $r3$.ɵld<any>(1); let $foo$ = $r3$.ɵload<any>(1);
if (rf & 2) { if (rf & 2) {
$r3$.ɵcR(2); $r3$.ɵcontainerRefreshStart(2);
$r3$.ɵcr(); $r3$.ɵcontainerRefreshEnd();
} }
function C1(rf1: $RenderFlags$, ctx1: $any$) { function C1(rf1: $RenderFlags$, ctx1: $any$) {
if (rf1 & 1) { if (rf1 & 1) {
$r3$.ɵE(0, 'li'); $r3$.ɵelementStart(0, 'li');
$r3$.ɵT(1); $r3$.ɵtext(1);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf1 & 2) { if (rf1 & 2) {
$r3$.ɵt(1, $r3$.ɵi2('', ctx.salutation, ' ', $foo$, '')); $r3$.ɵtextBinding(1, $r3$.ɵinterpolation2('', ctx.salutation, ' ', $foo$, ''));
} }
} }
} }
@ -426,10 +430,10 @@ describe('components & directives', () => {
factory: function MyArrayComp_Factory() { return new MyArrayComp(); }, factory: function MyArrayComp_Factory() { return new MyArrayComp(); },
template: function MyArrayComp_Template(rf: $RenderFlags$, ctx: $MyArrayComp$) { template: function MyArrayComp_Template(rf: $RenderFlags$, ctx: $MyArrayComp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵT(0); $r3$.ɵtext(0);
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵt(0, $r3$.ɵi2('', ctx.names[0], ' ', ctx.names[1], '')); $r3$.ɵtextBinding(0, $r3$.ɵinterpolation2('', ctx.names[0], ' ', ctx.names[1], ''));
} }
}, },
inputs: {names: 'names'} inputs: {names: 'names'}
@ -457,10 +461,10 @@ describe('components & directives', () => {
factory: function MyApp_Factory() { return new MyApp(); }, factory: function MyApp_Factory() { return new MyApp(); },
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) { template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, 'my-array-comp'); $r3$.ɵelement(0, 'my-array-comp');
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp(0, 'names', rf & 1 ? $e0_arr$ : $r3$.ɵNC); $r3$.ɵelementProperty(0, 'names', rf & 1 ? $e0_arr$ : $r3$.ɵNO_CHANGE);
} }
} }
}); });
@ -501,11 +505,12 @@ describe('components & directives', () => {
factory: function MyApp_Factory() { return new MyApp(); }, factory: function MyApp_Factory() { return new MyApp(); },
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) { template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, 'my-array-comp'); $r3$.ɵelement(0, 'my-array-comp');
$r3$.ɵrS(1); $r3$.ɵreserveSlots(1);
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp(0, 'names', $r3$.ɵb(ctx.someFn($r3$.ɵf0(1, $e0_ff$)))); $r3$.ɵelementProperty(
0, 'names', $r3$.ɵbind(ctx.someFn($r3$.ɵpureFunction0(1, $e0_ff$))));
} }
} }
}); });
@ -535,13 +540,13 @@ describe('components & directives', () => {
factory: function MyComp_Factory() { return new MyComp(); }, factory: function MyComp_Factory() { return new MyComp(); },
template: function MyComp_Template(rf: $RenderFlags$, ctx: $MyComp$) { template: function MyComp_Template(rf: $RenderFlags$, ctx: $MyComp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵT(0); $r3$.ɵtext(0);
} }
if (rf & 2) { if (rf & 2) {
// clang-format wants to break this line by changing the second 'ɵ' to an invalid // clang-format wants to break this line by changing the second 'ɵ' to an invalid
// unicode sequence. // unicode sequence.
// clang-format off // clang-format off
$r3$.ɵt(0, $r3$.ɵb(ctx.num)); $r3$.ɵtextBinding(0, $r3$.ɵbind(ctx.num));
// clang-format on // clang-format on
} }
}, },
@ -567,11 +572,12 @@ describe('components & directives', () => {
factory: function MyApp_Factory() { return new MyApp(); }, factory: function MyApp_Factory() { return new MyApp(); },
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) { template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, 'my-comp'); $r3$.ɵelement(0, 'my-comp');
$r3$.ɵrS(1); $r3$.ɵreserveSlots(1);
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp(0, 'num', $r3$.ɵb($r3$.ɵf0(1, $e0_ff$).length + 1)); $r3$.ɵelementProperty(
0, 'num', $r3$.ɵbind($r3$.ɵpureFunction0(1, $e0_ff$).length + 1));
} }
} }
}); });
@ -610,11 +616,12 @@ describe('components & directives', () => {
factory: function MyApp_Factory() { return new MyApp(); }, factory: function MyApp_Factory() { return new MyApp(); },
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) { template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, 'my-array-comp'); $r3$.ɵelement(0, 'my-array-comp');
$r3$.ɵrS(2); $r3$.ɵreserveSlots(2);
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp(0, 'names', $r3$.ɵb($r3$.ɵf1(2, $e0_ff$, ctx.customName))); $r3$.ɵelementProperty(
0, 'names', $r3$.ɵbind($r3$.ɵpureFunction1(2, $e0_ff$, ctx.customName)));
} }
} }
}); });
@ -658,32 +665,32 @@ describe('components & directives', () => {
factory: function MyComp_Factory() { return new MyComp(); }, factory: function MyComp_Factory() { return new MyComp(); },
template: function MyComp_Template(rf: $RenderFlags$, ctx: $MyComp$) { template: function MyComp_Template(rf: $RenderFlags$, ctx: $MyComp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵT(0); $r3$.ɵtext(0);
$r3$.ɵT(1); $r3$.ɵtext(1);
$r3$.ɵT(2); $r3$.ɵtext(2);
$r3$.ɵT(3); $r3$.ɵtext(3);
$r3$.ɵT(4); $r3$.ɵtext(4);
$r3$.ɵT(5); $r3$.ɵtext(5);
$r3$.ɵT(6); $r3$.ɵtext(6);
$r3$.ɵT(7); $r3$.ɵtext(7);
$r3$.ɵT(8); $r3$.ɵtext(8);
$r3$.ɵT(9); $r3$.ɵtext(9);
$r3$.ɵT(10); $r3$.ɵtext(10);
$r3$.ɵT(11); $r3$.ɵtext(11);
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵt(0, $r3$.ɵb(ctx.names[0])); $r3$.ɵtextBinding(0, $r3$.ɵbind(ctx.names[0]));
$r3$.ɵt(1, $r3$.ɵb(ctx.names[1])); $r3$.ɵtextBinding(1, $r3$.ɵbind(ctx.names[1]));
$r3$.ɵt(2, $r3$.ɵb(ctx.names[2])); $r3$.ɵtextBinding(2, $r3$.ɵbind(ctx.names[2]));
$r3$.ɵt(3, $r3$.ɵb(ctx.names[3])); $r3$.ɵtextBinding(3, $r3$.ɵbind(ctx.names[3]));
$r3$.ɵt(4, $r3$.ɵb(ctx.names[4])); $r3$.ɵtextBinding(4, $r3$.ɵbind(ctx.names[4]));
$r3$.ɵt(5, $r3$.ɵb(ctx.names[5])); $r3$.ɵtextBinding(5, $r3$.ɵbind(ctx.names[5]));
$r3$.ɵt(6, $r3$.ɵb(ctx.names[6])); $r3$.ɵtextBinding(6, $r3$.ɵbind(ctx.names[6]));
$r3$.ɵt(7, $r3$.ɵb(ctx.names[7])); $r3$.ɵtextBinding(7, $r3$.ɵbind(ctx.names[7]));
$r3$.ɵt(8, $r3$.ɵb(ctx.names[8])); $r3$.ɵtextBinding(8, $r3$.ɵbind(ctx.names[8]));
$r3$.ɵt(9, $r3$.ɵb(ctx.names[9])); $r3$.ɵtextBinding(9, $r3$.ɵbind(ctx.names[9]));
$r3$.ɵt(10, $r3$.ɵb(ctx.names[10])); $r3$.ɵtextBinding(10, $r3$.ɵbind(ctx.names[10]));
$r3$.ɵt(11, $r3$.ɵb(ctx.names[11])); $r3$.ɵtextBinding(11, $r3$.ɵbind(ctx.names[11]));
} }
}, },
inputs: {names: 'names'} inputs: {names: 'names'}
@ -721,13 +728,13 @@ describe('components & directives', () => {
factory: function MyApp_Factory() { return new MyApp(); }, factory: function MyApp_Factory() { return new MyApp(); },
template: function MyApp_Template(rf: $RenderFlags$, c: $any$) { template: function MyApp_Template(rf: $RenderFlags$, c: $any$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, 'my-comp'); $r3$.ɵelement(0, 'my-comp');
$r3$.ɵrS(10); $r3$.ɵreserveSlots(10);
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp( $r3$.ɵelementProperty(
0, 'names', 0, 'names',
$r3$.ɵb($r3$.ɵfV( $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]))); 10, $e0_ff$, [c.n0, c.n1, c.n2, c.n3, c.n4, c.n5, c.n6, c.n7, c.n8])));
} }
} }
@ -764,16 +771,16 @@ describe('components & directives', () => {
factory: function ObjectComp_Factory() { return new ObjectComp(); }, factory: function ObjectComp_Factory() { return new ObjectComp(); },
template: function ObjectComp_Template(rf: $RenderFlags$, ctx: $ObjectComp$) { template: function ObjectComp_Template(rf: $RenderFlags$, ctx: $ObjectComp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'p'); $r3$.ɵelementStart(0, 'p');
$r3$.ɵT(1); $r3$.ɵtext(1);
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵE(2, 'p'); $r3$.ɵelementStart(2, 'p');
$r3$.ɵT(3); $r3$.ɵtext(3);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵt(1, $r3$.ɵb(ctx.config['duration'])); $r3$.ɵtextBinding(1, $r3$.ɵbind(ctx.config['duration']));
$r3$.ɵt(3, $r3$.ɵb(ctx.config.animation)); $r3$.ɵtextBinding(3, $r3$.ɵbind(ctx.config.animation));
} }
}, },
inputs: {config: 'config'} inputs: {config: 'config'}
@ -800,11 +807,12 @@ describe('components & directives', () => {
factory: function MyApp_Factory() { return new MyApp(); }, factory: function MyApp_Factory() { return new MyApp(); },
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) { template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, 'object-comp'); $r3$.ɵelement(0, 'object-comp');
$r3$.ɵrS(2); $r3$.ɵreserveSlots(2);
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp(0, 'config', $r3$.ɵb($r3$.ɵf1(2, $e0_ff$, ctx.name))); $r3$.ɵelementProperty(
0, 'config', $r3$.ɵbind($r3$.ɵpureFunction1(2, $e0_ff$, ctx.name)));
} }
} }
}); });
@ -841,20 +849,20 @@ describe('components & directives', () => {
factory: function NestedComp_Factory() { return new NestedComp(); }, factory: function NestedComp_Factory() { return new NestedComp(); },
template: function NestedComp_Template(rf: $RenderFlags$, ctx: $NestedComp$) { template: function NestedComp_Template(rf: $RenderFlags$, ctx: $NestedComp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'p'); $r3$.ɵelementStart(0, 'p');
$r3$.ɵT(1); $r3$.ɵtext(1);
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵE(2, 'p'); $r3$.ɵelementStart(2, 'p');
$r3$.ɵT(3); $r3$.ɵtext(3);
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵE(4, 'p'); $r3$.ɵelementStart(4, 'p');
$r3$.ɵT(5); $r3$.ɵtext(5);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵt(1, $r3$.ɵb(ctx.config.animation)); $r3$.ɵtextBinding(1, $r3$.ɵbind(ctx.config.animation));
$r3$.ɵt(3, $r3$.ɵb(ctx.config.actions[0].opacity)); $r3$.ɵtextBinding(3, $r3$.ɵbind(ctx.config.actions[0].opacity));
$r3$.ɵt(5, $r3$.ɵb(ctx.config.actions[1].duration)); $r3$.ɵtextBinding(5, $r3$.ɵbind(ctx.config.actions[1].duration));
} }
}, },
inputs: {config: 'config'} inputs: {config: 'config'}
@ -886,14 +894,16 @@ describe('components & directives', () => {
factory: function MyApp_Factory() { return new MyApp(); }, factory: function MyApp_Factory() { return new MyApp(); },
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) { template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, 'nested-comp'); $r3$.ɵelement(0, 'nested-comp');
$r3$.ɵrS(7); $r3$.ɵreserveSlots(7);
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp( $r3$.ɵelementProperty(
0, 'config', $r3$.ɵb($r3$.ɵf2( 0, 'config',
$r3$.ɵbind($r3$.ɵpureFunction2(
7, $e0_ff_2$, ctx.name, 7, $e0_ff_2$, ctx.name,
$r3$.ɵf1(4, $e0_ff_1$, $r3$.ɵf1(2, $e0_ff$, ctx.duration))))); $r3$.ɵpureFunction1(
4, $e0_ff_1$, $r3$.ɵpureFunction1(2, $e0_ff$, ctx.duration)))));
} }
} }
}); });

View File

@ -27,9 +27,9 @@ describe('content projection', () => {
factory: () => new SimpleComponent(), factory: () => new SimpleComponent(),
template: function(rf: $RenderFlags$, ctx: $SimpleComponent$) { template: function(rf: $RenderFlags$, ctx: $SimpleComponent$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵpD(); $r3$.ɵprojectionDef();
$r3$.ɵEe(0, 'div'); $r3$.ɵelement(0, 'div');
$r3$.ɵP(1); $r3$.ɵprojection(1);
} }
} }
}); });
@ -56,11 +56,11 @@ describe('content projection', () => {
factory: () => new ComplexComponent(), factory: () => new ComplexComponent(),
template: function(rf: $RenderFlags$, ctx: $ComplexComponent$) { template: function(rf: $RenderFlags$, ctx: $ComplexComponent$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵpD($pD_0P$, $pD_0R$); $r3$.ɵprojectionDef($pD_0P$, $pD_0R$);
$r3$.ɵEe(0, 'div', ['id', 'first']); $r3$.ɵelement(0, 'div', ['id', 'first']);
$r3$.ɵP(1, 1); $r3$.ɵprojection(1, 1);
$r3$.ɵEe(2, 'div', ['id', 'second']); $r3$.ɵelement(2, 'div', ['id', 'second']);
$r3$.ɵP(3, 2); $r3$.ɵprojection(3, 2);
} }
} }
}); });
@ -79,9 +79,9 @@ describe('content projection', () => {
factory: () => new MyApp(), factory: () => new MyApp(),
template: function(rf: $RenderFlags$, ctx: $MyApp$) { template: function(rf: $RenderFlags$, ctx: $MyApp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'simple'); $r3$.ɵelementStart(0, 'simple');
$r3$.ɵT(1, 'content'); $r3$.ɵtext(1, 'content');
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
}, },
directives: () => [SimpleComponent] directives: () => [SimpleComponent]

View File

@ -39,13 +39,13 @@ describe('elements', () => {
factory: () => new MyComponent(), factory: () => new MyComponent(),
template: function(rf: $RenderFlags$, ctx: $MyComponent$) { template: function(rf: $RenderFlags$, ctx: $MyComponent$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'div', $e0_attrs$); $r3$.ɵelementStart(0, 'div', $e0_attrs$);
$r3$.ɵT(1, 'Hello '); $r3$.ɵtext(1, 'Hello ');
$r3$.ɵE(2, 'b'); $r3$.ɵelementStart(2, 'b');
$r3$.ɵT(3, 'World'); $r3$.ɵtext(3, 'World');
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵT(4, '!'); $r3$.ɵtext(4, '!');
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
} }
}); });
@ -92,13 +92,14 @@ describe('elements', () => {
let $tmp$: any; let $tmp$: any;
let $tmp_2$: any; let $tmp_2$: any;
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, 'div', $e0_attrs$, $e0_locals$); $r3$.ɵelement(0, 'div', $e0_attrs$, $e0_locals$);
$r3$.ɵT(3); $r3$.ɵtext(3);
} }
if (rf & 2) { if (rf & 2) {
$tmp$ = $r3$.ɵld(1); $tmp$ = $r3$.ɵload(1);
$tmp_2$ = $r3$.ɵld(2); $tmp_2$ = $r3$.ɵload(2);
$r3$.ɵt(3, $r3$.ɵi2(' ', $tmp$.value, ' - ', $tmp_2$.tagName, '')); $r3$.ɵtextBinding(
3, $r3$.ɵinterpolation2(' ', $tmp$.value, ' - ', $tmp_2$.tagName, ''));
} }
} }
}); });
@ -134,14 +135,15 @@ describe('elements', () => {
factory: function ListenerComp_Factory() { return new ListenerComp(); }, factory: function ListenerComp_Factory() { return new ListenerComp(); },
template: function ListenerComp_Template(rf: $RenderFlags$, ctx: $ListenerComp$) { template: function ListenerComp_Template(rf: $RenderFlags$, ctx: $ListenerComp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'button'); $r3$.ɵelementStart(0, 'button');
$r3$.ɵL('click', function ListenerComp_click_Handler() { return ctx.onClick(); }); $r3$.ɵlistener(
$r3$.ɵL('keypress', function ListenerComp_keypress_Handler($event: $any$) { 'click', function ListenerComp_click_Handler() { return ctx.onClick(); });
$r3$.ɵlistener('keypress', function ListenerComp_keypress_Handler($event: $any$) {
ctx.onPress($event); ctx.onPress($event);
return ctx.onPress2($event); return ctx.onPress2($event);
}); });
$r3$.ɵT(1, 'Click'); $r3$.ɵtext(1, 'Click');
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
} }
}); });
@ -188,13 +190,13 @@ describe('elements', () => {
factory: () => new MyComponent(), factory: () => new MyComponent(),
template: function(rf: $RenderFlags$, ctx: $MyComponent$) { template: function(rf: $RenderFlags$, ctx: $MyComponent$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'div', $e0_attrs$); $r3$.ɵelementStart(0, 'div', $e0_attrs$);
$r3$.ɵT(1, 'Hello '); $r3$.ɵtext(1, 'Hello ');
$r3$.ɵE(2, 'b'); $r3$.ɵelementStart(2, 'b');
$r3$.ɵT(3, 'World'); $r3$.ɵtext(3, 'World');
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵT(4, '!'); $r3$.ɵtext(4, '!');
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
} }
}); });
@ -220,10 +222,10 @@ describe('elements', () => {
factory: function MyComponent_Factory() { return new MyComponent(); }, factory: function MyComponent_Factory() { return new MyComponent(); },
template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) { template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, 'div'); $r3$.ɵelement(0, 'div');
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp(0, 'id', $r3$.ɵb(ctx.someProperty)); $r3$.ɵelementProperty(0, 'id', $r3$.ɵbind(ctx.someProperty));
} }
} }
}); });
@ -251,10 +253,10 @@ describe('elements', () => {
factory: function MyComponent_Factory() { return new MyComponent(); }, factory: function MyComponent_Factory() { return new MyComponent(); },
template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) { template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, 'div'); $r3$.ɵelement(0, 'div');
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵa(0, 'title', $r3$.ɵb(ctx.someAttribute)); $r3$.ɵelementAttribute(0, 'title', $r3$.ɵbind(ctx.someAttribute));
} }
} }
}); });
@ -283,13 +285,13 @@ describe('elements', () => {
factory: function MyComponent_Factory() { return new MyComponent(); }, factory: function MyComponent_Factory() { return new MyComponent(); },
template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) { template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'div'); $r3$.ɵelementStart(0, 'div');
$r3$.ɵs(c1); $r3$.ɵelementStyling(c1);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵcp(0, 0, ctx.someFlag); $r3$.ɵelementClassProp(0, 0, ctx.someFlag);
$r3$.ɵsa(0); $r3$.ɵelementStylingApply(0);
} }
} }
}); });
@ -322,14 +324,14 @@ describe('elements', () => {
factory: function MyComponent_Factory() { return new MyComponent(); }, factory: function MyComponent_Factory() { return new MyComponent(); },
template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) { template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'div'); $r3$.ɵelementStart(0, 'div');
$r3$.ɵs(null, c0); $r3$.ɵelementStyling(null, c0);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵsp(0, 0, ctx.someColor); $r3$.ɵelementStylingProp(0, 0, ctx.someColor);
$r3$.ɵsp(0, 1, ctx.someWidth, 'px'); $r3$.ɵelementStylingProp(0, 1, ctx.someWidth, 'px');
$r3$.ɵsa(0); $r3$.ɵelementStylingApply(0);
} }
} }
}); });
@ -373,14 +375,14 @@ describe('elements', () => {
factory: function MyComponent_Factory() { return new MyComponent(); }, factory: function MyComponent_Factory() { return new MyComponent(); },
template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) { template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'div'); $r3$.ɵelementStart(0, 'div');
$r3$.ɵs(c0, c1); $r3$.ɵelementStyling(c0, c1);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp(0, 'id', $r3$.ɵb(ctx.someString + 1)); $r3$.ɵelementProperty(0, 'id', $r3$.ɵbind(ctx.someString + 1));
$r3$.ɵcp(0, 0, ctx.someString == 'initial'); $r3$.ɵelementClassProp(0, 0, ctx.someString == 'initial');
$r3$.ɵsa(0); $r3$.ɵelementStylingApply(0);
} }
} }
}); });
@ -411,13 +413,13 @@ describe('elements', () => {
factory: function StyleComponent_Factory() { return new StyleComponent(); }, factory: function StyleComponent_Factory() { return new StyleComponent(); },
template: function StyleComponent_Template(rf: $RenderFlags$, ctx: $StyleComponent$) { template: function StyleComponent_Template(rf: $RenderFlags$, ctx: $StyleComponent$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'div'); $r3$.ɵelementStart(0, 'div');
$r3$.ɵs(); $r3$.ɵelementStyling();
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵsm(0, ctx.classExp, ctx.styleExp); $r3$.ɵelementStylingMap(0, ctx.classExp, ctx.styleExp);
$r3$.ɵsa(0); $r3$.ɵelementStylingApply(0);
} }
} }
}); });

View File

@ -18,7 +18,7 @@ describe('i18n', () => {
it('should support html', () => { it('should support html', () => {
type $MyApp$ = MyApp; type $MyApp$ = MyApp;
const $msg_1$ = `{$START_P}contenu{$END_P}`; const $msg_1$ = `{$START_P}contenu{$END_P}`;
const $i18n_1$ = $r3$.ɵiM($msg_1$, [{START_P: 1}]); const $i18n_1$ = $r3$.ɵi18nMapping($msg_1$, [{START_P: 1}]);
@Component({selector: 'my-app', template: `<div i18n><p>content</p></div>`}) @Component({selector: 'my-app', template: `<div i18n><p>content</p></div>`})
class MyApp { class MyApp {
@ -28,11 +28,11 @@ describe('i18n', () => {
factory: () => new MyApp(), factory: () => new MyApp(),
template: function(rf: $RenderFlags$, ctx: $MyApp$) { template: function(rf: $RenderFlags$, ctx: $MyApp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'div'); $r3$.ɵelementStart(0, 'div');
$r3$.ɵE(1, 'p'); $r3$.ɵelementStart(1, 'p');
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵiA(1, $i18n_1$[0]); $r3$.ɵi18nApply(1, $i18n_1$[0]);
} }
} }
}); });
@ -42,7 +42,7 @@ describe('i18n', () => {
it('should support expressions', () => { it('should support expressions', () => {
type $MyApp$ = MyApp; type $MyApp$ = MyApp;
const $msg_1$ = `contenu: {$EXP_1}`; const $msg_1$ = `contenu: {$EXP_1}`;
const $i18n_1$ = $r3$.ɵiM($msg_1$, null, [{EXP_1: 1}]); const $i18n_1$ = $r3$.ɵi18nMapping($msg_1$, null, [{EXP_1: 1}]);
@Component({selector: 'my-app', template: `<div i18n>content: {{exp1}}</div>`}) @Component({selector: 'my-app', template: `<div i18n>content: {{exp1}}</div>`})
class MyApp { class MyApp {
@ -53,13 +53,13 @@ describe('i18n', () => {
factory: () => new MyApp(), factory: () => new MyApp(),
template: function(rf: $RenderFlags$, ctx: $MyApp$) { template: function(rf: $RenderFlags$, ctx: $MyApp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'div'); $r3$.ɵelementStart(0, 'div');
$r3$.ɵT(1); $r3$.ɵtext(1);
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵiA(1, $i18n_1$[0]); $r3$.ɵi18nApply(1, $i18n_1$[0]);
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵt(3, $r3$.ɵb(ctx.exp1)); $r3$.ɵtextBinding(3, $r3$.ɵbind(ctx.exp1));
} }
} }
}); });
@ -69,7 +69,7 @@ describe('i18n', () => {
it('should support expressions in attributes', () => { it('should support expressions in attributes', () => {
type $MyApp$ = MyApp; type $MyApp$ = MyApp;
const $msg_1$ = `titre: {$EXP_1}`; const $msg_1$ = `titre: {$EXP_1}`;
const $i18n_1$ = $r3$.ɵiEM($msg_1$, {EXP_1: 1}); const $i18n_1$ = $r3$.ɵi18nExpMapping($msg_1$, {EXP_1: 1});
@Component({selector: 'my-app', template: `<div i18n><p title="title: {{exp1}}"></p></div>`}) @Component({selector: 'my-app', template: `<div i18n><p title="title: {{exp1}}"></p></div>`})
class MyApp { class MyApp {
@ -80,13 +80,13 @@ describe('i18n', () => {
factory: () => new MyApp(), factory: () => new MyApp(),
template: function(rf: $RenderFlags$, ctx: $MyApp$) { template: function(rf: $RenderFlags$, ctx: $MyApp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'div'); $r3$.ɵelementStart(0, 'div');
$r3$.ɵE(1, 'p'); $r3$.ɵelementStart(1, 'p');
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp(0, 'title', $r3$.ɵiI1($i18n_1$, ctx.exp1)); $r3$.ɵelementProperty(0, 'title', $r3$.ɵi18nInterpolation1($i18n_1$, ctx.exp1));
} }
} }
}); });
@ -96,8 +96,8 @@ describe('i18n', () => {
it('should support embedded templates', () => { it('should support embedded templates', () => {
type $MyApp$ = MyApp; type $MyApp$ = MyApp;
const $msg_1$ = `{$START_LI}valeur: {$EXP_1}!{$END_LI}`; const $msg_1$ = `{$START_LI}valeur: {$EXP_1}!{$END_LI}`;
const $i18n_1$ = const $i18n_1$ = $r3$.ɵi18nMapping(
$r3$.ɵiM($msg_1$, [{START_LI: 1}, {START_LI: 0}], [null, {EXP_1: 1}], ['START_LI']); $msg_1$, [{START_LI: 1}, {START_LI: 0}], [null, {EXP_1: 1}], ['START_LI']);
@Component({ @Component({
selector: 'my-app', selector: 'my-app',
@ -111,24 +111,24 @@ describe('i18n', () => {
selectors: [['my-app']], selectors: [['my-app']],
template: (rf: $RenderFlags$, myApp: $MyApp$) => { template: (rf: $RenderFlags$, myApp: $MyApp$) => {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'ul'); $r3$.ɵelementStart(0, 'ul');
$r3$.ɵC(1, liTemplate, null, ['ngForOf', '']); $r3$.ɵcontainer(1, liTemplate, null, ['ngForOf', '']);
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵiA(1, $i18n_1$[0]); $r3$.ɵi18nApply(1, $i18n_1$[0]);
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp(1, 'ngForOf', $r3$.ɵb(myApp.items)); $r3$.ɵelementProperty(1, 'ngForOf', $r3$.ɵbind(myApp.items));
} }
function liTemplate(rf1: $RenderFlags$, row: NgForOfContext<string>) { function liTemplate(rf1: $RenderFlags$, row: NgForOfContext<string>) {
if (rf1 & 1) { if (rf1 & 1) {
$r3$.ɵE(0, 'li'); $r3$.ɵelementStart(0, 'li');
$r3$.ɵT(1); $r3$.ɵtext(1);
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵiA(0, $i18n_1$[1]); $r3$.ɵi18nApply(0, $i18n_1$[1]);
} }
if (rf1 & 2) { if (rf1 & 2) {
$r3$.ɵt(1, $r3$.ɵb(row.$implicit)); $r3$.ɵtextBinding(1, $r3$.ɵbind(row.$implicit));
} }
} }
}, },

View File

@ -36,10 +36,10 @@ describe('injection', () => {
}, },
template: function MyComp_Template(rf: $RenderFlags$, ctx: $MyComp$) { template: function MyComp_Template(rf: $RenderFlags$, ctx: $MyComp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵT(0); $r3$.ɵtext(0);
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵt(0, $r3$.ɵb(ctx.value)); $r3$.ɵtextBinding(0, $r3$.ɵbind(ctx.value));
} }
} }
}); });
@ -54,7 +54,7 @@ describe('injection', () => {
/** <my-comp></my-comp> */ /** <my-comp></my-comp> */
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) { template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, 'my-comp'); $r3$.ɵelement(0, 'my-comp');
} }
}, },
directives: () => [MyComp] directives: () => [MyComp]
@ -82,10 +82,10 @@ describe('injection', () => {
factory: function MyComp_Factory() { return new MyComp($r3$.ɵinjectAttribute('title')); }, factory: function MyComp_Factory() { return new MyComp($r3$.ɵinjectAttribute('title')); },
template: function MyComp_Template(rf: $RenderFlags$, ctx: $MyComp$) { template: function MyComp_Template(rf: $RenderFlags$, ctx: $MyComp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵT(0); $r3$.ɵtext(0);
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵt(0, $r3$.ɵb(ctx.title)); $r3$.ɵtextBinding(0, $r3$.ɵbind(ctx.title));
} }
} }
}); });
@ -100,7 +100,7 @@ describe('injection', () => {
/** <my-comp></my-comp> */ /** <my-comp></my-comp> */
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) { template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, 'my-comp', e0_attrs); $r3$.ɵelement(0, 'my-comp', e0_attrs);
} }
}, },
directives: () => [MyComp] directives: () => [MyComp]

View File

@ -71,12 +71,12 @@ describe('lifecycle hooks', () => {
factory: function SimpleLayout_Factory() { return simpleLayout = new SimpleLayout(); }, factory: function SimpleLayout_Factory() { return simpleLayout = new SimpleLayout(); },
template: function SimpleLayout_Template(rf: $RenderFlags$, ctx: $SimpleLayout$) { template: function SimpleLayout_Template(rf: $RenderFlags$, ctx: $SimpleLayout$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, 'lifecycle-comp'); $r3$.ɵelement(0, 'lifecycle-comp');
$r3$.ɵEe(1, 'lifecycle-comp'); $r3$.ɵelement(1, 'lifecycle-comp');
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp(0, 'name', $r3$.ɵb(ctx.name1)); $r3$.ɵelementProperty(0, 'name', $r3$.ɵbind(ctx.name1));
$r3$.ɵp(1, 'name', $r3$.ɵb(ctx.name2)); $r3$.ɵelementProperty(1, 'name', $r3$.ɵbind(ctx.name2));
} }
} }
}); });

View File

@ -28,12 +28,12 @@ describe('local references', () => {
template: function(rf: $RenderFlags$, ctx: $MyComponent$) { template: function(rf: $RenderFlags$, ctx: $MyComponent$) {
let l1_user: any; let l1_user: any;
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(0, 'input', ['value', 'World'], ['user', '']); $r3$.ɵelement(0, 'input', ['value', 'World'], ['user', '']);
$r3$.ɵT(2); $r3$.ɵtext(2);
} }
if (rf & 2) { if (rf & 2) {
l1_user = $r3$.ɵr<any>(1); l1_user = $r3$.ɵreference<any>(1);
$r3$.ɵt(2, $r3$.ɵi1('Hello, ', l1_user.value, '!')); $r3$.ɵtextBinding(2, $r3$.ɵinterpolation1('Hello, ', l1_user.value, '!'));
} }
} }
}); });

View File

@ -85,15 +85,17 @@ describe('pipes', () => {
factory: function MyApp_Factory() { return new MyApp(); }, factory: function MyApp_Factory() { return new MyApp(); },
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) { template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵT(0); $r3$.ɵtext(0);
$r3$.ɵPp(1, 'myPipe'); $r3$.ɵpipe(1, 'myPipe');
$r3$.ɵPp(2, 'myPurePipe'); $r3$.ɵpipe(2, 'myPurePipe');
$r3$.ɵrS(6); $r3$.ɵreserveSlots(6);
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵt( $r3$.ɵtextBinding(
0, 0,
$r3$.ɵi1('', $r3$.ɵpb2(1, 6, $r3$.ɵpb2(2, 3, ctx.name, ctx.size), ctx.size), '')); $r3$.ɵinterpolation1(
'', $r3$.ɵpipeBind2(1, 6, $r3$.ɵpipeBind2(2, 3, ctx.name, ctx.size), ctx.size),
''));
} }
} }
}); });
@ -164,31 +166,34 @@ describe('pipes', () => {
factory: function MyApp_Factory() { return new MyApp(); }, factory: function MyApp_Factory() { return new MyApp(); },
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) { template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵT(0); $r3$.ɵtext(0);
$r3$.ɵPp(1, 'myPurePipe'); $r3$.ɵpipe(1, 'myPurePipe');
$r3$.ɵT(2); $r3$.ɵtext(2);
$r3$.ɵPp(3, 'myPurePipe'); $r3$.ɵpipe(3, 'myPurePipe');
$r3$.ɵC(4, C4, '', ['oneTimeIf', '']); $r3$.ɵcontainer(4, C4, '', ['oneTimeIf', '']);
$r3$.ɵrS(6); $r3$.ɵreserveSlots(6);
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵt(0, $r3$.ɵi1('', $r3$.ɵpb2(1, 3, ctx.name, ctx.size), '')); $r3$.ɵtextBinding(
$r3$.ɵt(2, $r3$.ɵi1('', $r3$.ɵpb2(3, 6, ctx.name, ctx.size), '')); 0, $r3$.ɵinterpolation1('', $r3$.ɵpipeBind2(1, 3, ctx.name, ctx.size), ''));
$r3$.ɵp(4, 'oneTimeIf', $r3$.ɵb(ctx.more)); $r3$.ɵtextBinding(
$r3$.ɵcR(4); 2, $r3$.ɵinterpolation1('', $r3$.ɵpipeBind2(3, 6, ctx.name, ctx.size), ''));
$r3$.ɵcr(); $r3$.ɵelementProperty(4, 'oneTimeIf', $r3$.ɵbind(ctx.more));
$r3$.ɵcontainerRefreshStart(4);
$r3$.ɵcontainerRefreshEnd();
} }
function C4(rf: $RenderFlags$, ctx1: $any$) { function C4(rf: $RenderFlags$, ctx1: $any$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'div'); $r3$.ɵelementStart(0, 'div');
$r3$.ɵT(1); $r3$.ɵtext(1);
$r3$.ɵPp(2, 'myPurePipe'); $r3$.ɵpipe(2, 'myPurePipe');
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵrS(3); $r3$.ɵreserveSlots(3);
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵt(1, $r3$.ɵi1('', $r3$.ɵpb2(2, 3, ctx.name, ctx.size), '')); $r3$.ɵtextBinding(
1, $r3$.ɵinterpolation1('', $r3$.ɵpipeBind2(2, 3, ctx.name, ctx.size), ''));
} }
} }
} }

View File

@ -57,18 +57,19 @@ describe('queries', () => {
template: function ViewQueryComponent_Template( template: function ViewQueryComponent_Template(
rf: $RenderFlags$, ctx: $ViewQueryComponent$) { rf: $RenderFlags$, ctx: $ViewQueryComponent$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵEe(2, 'div', $e1_attrs$); $r3$.ɵelement(2, 'div', $e1_attrs$);
} }
}, },
viewQuery: function ViewQueryComponent_Query(rf: $RenderFlags$, ctx: $ViewQueryComponent$) { viewQuery: function ViewQueryComponent_Query(rf: $RenderFlags$, ctx: $ViewQueryComponent$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵQ(0, SomeDirective, false); $r3$.ɵquery(0, SomeDirective, false);
$r3$.ɵQ(1, SomeDirective, false); $r3$.ɵquery(1, SomeDirective, false);
} }
if (rf & 2) { if (rf & 2) {
let $tmp$: any; let $tmp$: any;
$r3$.ɵqR($tmp$ = $r3$.ɵld<QueryList<any>>(0)) && (ctx.someDir = $tmp$.first); $r3$.ɵqueryRefresh($tmp$ = $r3$.ɵload<QueryList<any>>(0)) &&
$r3$.ɵqR($tmp$ = $r3$.ɵld<QueryList<any>>(1)) && (ctx.someDir = $tmp$.first);
$r3$.ɵqueryRefresh($tmp$ = $r3$.ɵload<QueryList<any>>(1)) &&
(ctx.someDirList = $tmp$ as QueryList<any>); (ctx.someDirList = $tmp$ as QueryList<any>);
} }
} }
@ -110,23 +111,25 @@ describe('queries', () => {
selectors: [['content-query-component']], selectors: [['content-query-component']],
factory: function ContentQueryComponent_Factory() { return new ContentQueryComponent(); }, factory: function ContentQueryComponent_Factory() { return new ContentQueryComponent(); },
contentQueries: function ContentQueryComponent_ContentQueries() { contentQueries: function ContentQueryComponent_ContentQueries() {
$r3$.ɵQr($r3$.ɵQ(null, SomeDirective, false)); $r3$.ɵregisterContentQuery($r3$.ɵquery(null, SomeDirective, false));
$r3$.ɵQr($r3$.ɵQ(null, SomeDirective, false)); $r3$.ɵregisterContentQuery($r3$.ɵquery(null, SomeDirective, false));
}, },
contentQueriesRefresh: function ContentQueryComponent_ContentQueriesRefresh( contentQueriesRefresh: function ContentQueryComponent_ContentQueriesRefresh(
dirIndex: $number$, queryStartIndex: $number$) { dirIndex: $number$, queryStartIndex: $number$) {
let $tmp$: any; let $tmp$: any;
const $instance$ = $r3$.ɵd<ContentQueryComponent>(dirIndex); const $instance$ = $r3$.ɵloadDirective<ContentQueryComponent>(dirIndex);
$r3$.ɵqR($tmp$ = $r3$.ɵql<any>(queryStartIndex)) && ($instance$.someDir = $tmp$.first); $r3$.ɵqueryRefresh($tmp$ = $r3$.ɵloadQueryList<any>(queryStartIndex)) &&
$r3$.ɵqR($tmp$ = $r3$.ɵql<any>(queryStartIndex + 1)) && ($instance$.someDirList = $tmp$); ($instance$.someDir = $tmp$.first);
$r3$.ɵqueryRefresh($tmp$ = $r3$.ɵloadQueryList<any>(queryStartIndex + 1)) &&
($instance$.someDirList = $tmp$);
}, },
template: function ContentQueryComponent_Template( template: function ContentQueryComponent_Template(
rf: $number$, ctx: $ContentQueryComponent$) { rf: $number$, ctx: $ContentQueryComponent$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵpD(); $r3$.ɵprojectionDef();
$r3$.ɵE(0, 'div'); $r3$.ɵelementStart(0, 'div');
$r3$.ɵP(1); $r3$.ɵprojection(1);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
} }
}); });
@ -151,10 +154,10 @@ describe('queries', () => {
factory: function MyApp_Factory() { return new MyApp(); }, factory: function MyApp_Factory() { return new MyApp(); },
template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) { template: function MyApp_Template(rf: $RenderFlags$, ctx: $MyApp$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'content-query-component'); $r3$.ɵelementStart(0, 'content-query-component');
contentQueryComp = $r3$.ɵd<ContentQueryComponent>(0); contentQueryComp = $r3$.ɵloadDirective<ContentQueryComponent>(0);
$r3$.ɵEe(1, 'div', $e2_attrs$); $r3$.ɵelement(1, 'div', $e2_attrs$);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
} }
}); });

View File

@ -43,18 +43,18 @@ describe('compiler sanitization', () => {
factory: function MyComponent_Factory() { return new MyComponent(); }, factory: function MyComponent_Factory() { return new MyComponent(); },
template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) { template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'div'); $r3$.ɵelementStart(0, 'div');
$r3$.ɵs(['background-image']); $r3$.ɵelementStyling(['background-image']);
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵEe(1, 'img'); $r3$.ɵelement(1, 'img');
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp(0, 'innerHTML', $r3$.ɵb(ctx.innerHTML), $r3$.ɵsanitizeHtml); $r3$.ɵelementProperty(0, 'innerHTML', $r3$.ɵbind(ctx.innerHTML), $r3$.ɵsanitizeHtml);
$r3$.ɵp(0, 'hidden', $r3$.ɵb(ctx.hidden)); $r3$.ɵelementProperty(0, 'hidden', $r3$.ɵbind(ctx.hidden));
$r3$.ɵsp(0, 0, ctx.style); $r3$.ɵelementStylingProp(0, 0, ctx.style);
$r3$.ɵsa(0); $r3$.ɵelementStylingApply(0);
$r3$.ɵp(1, 'src', $r3$.ɵb(ctx.url), $r3$.ɵsanitizeUrl); $r3$.ɵelementProperty(1, 'src', $r3$.ɵbind(ctx.url), $r3$.ɵsanitizeUrl);
$r3$.ɵa(1, 'srcset', $r3$.ɵb(ctx.url), $r3$.ɵsanitizeUrl); $r3$.ɵelementAttribute(1, 'srcset', $r3$.ɵbind(ctx.url), $r3$.ɵsanitizeUrl);
} }
} }
}); });

View File

@ -69,26 +69,26 @@ class ToDoAppComponent {
const ToDoAppComponent_NgForOf_Template = function ToDoAppComponent_NgForOf_Template( const ToDoAppComponent_NgForOf_Template = function ToDoAppComponent_NgForOf_Template(
rf: $RenderFlags$, ctx1: NgForOfContext<ToDo>) { rf: $RenderFlags$, ctx1: NgForOfContext<ToDo>) {
if (rf & 1) { if (rf & 1) {
r3.E(0, 'todo'); r3.elementStart(0, 'todo');
r3.L('archive', ctx.onArchive.bind(ctx)); r3.listener('archive', ctx.onArchive.bind(ctx));
r3.e(); r3.elementEnd();
} }
if (rf & 2) { if (rf & 2) {
r3.p(0, 'todo', r3.b(ctx1.$implicit)); r3.elementProperty(0, 'todo', r3.bind(ctx1.$implicit));
} }
}; };
r3.E(0, 'h1'); r3.elementStart(0, 'h1');
r3.T(1, 'ToDo Application'); r3.text(1, 'ToDo Application');
r3.e(); r3.elementEnd();
r3.E(2, 'div'); r3.elementStart(2, 'div');
r3.C(3, ToDoAppComponent_NgForOf_Template, '', ['ngForOf', '']); r3.container(3, ToDoAppComponent_NgForOf_Template, '', ['ngForOf', '']);
r3.e(); r3.elementEnd();
r3.E(4, 'span'); r3.elementStart(4, 'span');
r3.T(5); r3.text(5);
r3.e(); r3.elementEnd();
} }
if (rf & 2) { if (rf & 2) {
r3.t(5, r3.i1('count: ', ctx.appState.todos.length, '')); r3.textBinding(5, r3.interpolation1('count: ', ctx.appState.todos.length, ''));
} }
} }
}); });
@ -133,22 +133,22 @@ class ToDoItemComponent {
factory: function ToDoItemComponent_Factory() { return new ToDoItemComponent(); }, factory: function ToDoItemComponent_Factory() { return new ToDoItemComponent(); },
template: function ToDoItemComponent_Template(rf: $RenderFlags$, ctx: ToDoItemComponent) { template: function ToDoItemComponent_Template(rf: $RenderFlags$, ctx: ToDoItemComponent) {
if (rf & 1) { if (rf & 1) {
r3.E(0, 'div'); r3.elementStart(0, 'div');
r3.E(1, 'input', e1_attrs); r3.elementStart(1, 'input', e1_attrs);
r3.L('click', ctx.onCheckboxClick.bind(ctx)); r3.listener('click', ctx.onCheckboxClick.bind(ctx));
r3.e(); r3.elementEnd();
r3.E(2, 'span'); r3.elementStart(2, 'span');
r3.T(3); r3.text(3);
r3.e(); r3.elementEnd();
r3.E(4, 'button'); r3.elementStart(4, 'button');
r3.L('click', ctx.onArchiveClick.bind(ctx)); r3.listener('click', ctx.onArchiveClick.bind(ctx));
r3.T(5, 'archive'); r3.text(5, 'archive');
r3.e(); r3.elementEnd();
r3.e(); r3.elementEnd();
} }
if (rf & 2) { if (rf & 2) {
r3.p(1, 'value', r3.b(ctx.todo.done)); r3.elementProperty(1, 'value', r3.bind(ctx.todo.done));
r3.t(3, r3.b(ctx.todo.text)); r3.textBinding(3, r3.bind(ctx.todo.text));
} }
}, },
inputs: {todo: 'todo'}, inputs: {todo: 'todo'},

View File

@ -99,26 +99,26 @@ describe('template variables', () => {
factory: function MyComponent_Factory() { return new MyComponent(); }, factory: function MyComponent_Factory() { return new MyComponent(); },
template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) { template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'ul'); $r3$.ɵelementStart(0, 'ul');
$r3$.ɵC(1, MyComponent_ForOfDirective_Template_1, '', ['forOf', '']); $r3$.ɵcontainer(1, MyComponent_ForOfDirective_Template_1, '', ['forOf', '']);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp(1, 'forOf', $r3$.ɵb(ctx.items)); $r3$.ɵelementProperty(1, 'forOf', $r3$.ɵbind(ctx.items));
$r3$.ɵcR(1); $r3$.ɵcontainerRefreshStart(1);
$r3$.ɵcr(); $r3$.ɵcontainerRefreshEnd();
} }
function MyComponent_ForOfDirective_Template_1(rf: $RenderFlags$, ctx1: $any$) { function MyComponent_ForOfDirective_Template_1(rf: $RenderFlags$, ctx1: $any$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'li'); $r3$.ɵelementStart(0, 'li');
$r3$.ɵT(1); $r3$.ɵtext(1);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
let $l0_item$: any; let $l0_item$: any;
if (rf & 2) { if (rf & 2) {
$l0_item$ = ctx1.$implicit; $l0_item$ = ctx1.$implicit;
$r3$.ɵt(1, $r3$.ɵi1('', $l0_item$.name, '')); $r3$.ɵtextBinding(1, $r3$.ɵinterpolation1('', $l0_item$.name, ''));
} }
} }
} }
@ -173,47 +173,49 @@ describe('template variables', () => {
factory: function MyComponent_Factory() { return new MyComponent(); }, factory: function MyComponent_Factory() { return new MyComponent(); },
template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) { template: function MyComponent_Template(rf: $RenderFlags$, ctx: $MyComponent$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'ul'); $r3$.ɵelementStart(0, 'ul');
$r3$.ɵC(1, MyComponent_ForOfDirective_Template_1, '', ['forOf', '']); $r3$.ɵcontainer(1, MyComponent_ForOfDirective_Template_1, '', ['forOf', '']);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
if (rf & 2) { if (rf & 2) {
$r3$.ɵp(1, 'forOf', $r3$.ɵb(ctx.items)); $r3$.ɵelementProperty(1, 'forOf', $r3$.ɵbind(ctx.items));
$r3$.ɵcR(1); $r3$.ɵcontainerRefreshStart(1);
$r3$.ɵcr(); $r3$.ɵcontainerRefreshEnd();
} }
function MyComponent_ForOfDirective_Template_1(rf1: $RenderFlags$, ctx1: $any$) { function MyComponent_ForOfDirective_Template_1(rf1: $RenderFlags$, ctx1: $any$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'li'); $r3$.ɵelementStart(0, 'li');
$r3$.ɵE(1, 'div'); $r3$.ɵelementStart(1, 'div');
$r3$.ɵT(2); $r3$.ɵtext(2);
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵE(3, 'ul'); $r3$.ɵelementStart(3, 'ul');
$r3$.ɵC(4, MyComponent_ForOfDirective_ForOfDirective_Template_3, '', ['forOf', '']); $r3$.ɵcontainer(
$r3$.ɵe(); 4, MyComponent_ForOfDirective_ForOfDirective_Template_3, '', ['forOf', '']);
$r3$.ɵe(); $r3$.ɵelementEnd();
$r3$.ɵelementEnd();
} }
let $l0_item$: any; let $l0_item$: any;
if (rf & 2) { if (rf & 2) {
$l0_item$ = ctx1.$implicit; $l0_item$ = ctx1.$implicit;
$r3$.ɵp(4, 'forOf', $r3$.ɵb($l0_item$.infos)); $r3$.ɵelementProperty(4, 'forOf', $r3$.ɵbind($l0_item$.infos));
$r3$.ɵt(2, $r3$.ɵi1('', $l0_item$.name, '')); $r3$.ɵtextBinding(2, $r3$.ɵinterpolation1('', $l0_item$.name, ''));
$r3$.ɵcR(4); $r3$.ɵcontainerRefreshStart(4);
$r3$.ɵcr(); $r3$.ɵcontainerRefreshEnd();
} }
function MyComponent_ForOfDirective_ForOfDirective_Template_3( function MyComponent_ForOfDirective_ForOfDirective_Template_3(
rf2: $number$, ctx2: $any$) { rf2: $number$, ctx2: $any$) {
if (rf & 1) { if (rf & 1) {
$r3$.ɵE(0, 'li'); $r3$.ɵelementStart(0, 'li');
$r3$.ɵT(1); $r3$.ɵtext(1);
$r3$.ɵe(); $r3$.ɵelementEnd();
} }
let $l0_info$: any; let $l0_info$: any;
if (rf & 2) { if (rf & 2) {
$l0_info$ = ctx2.$implicit; $l0_info$ = ctx2.$implicit;
$r3$.ɵt(1, $r3$.ɵi2(' ', $l0_item$.name, ': ', $l0_info$.description, ' ')); $r3$.ɵtextBinding(
1, $r3$.ɵinterpolation2(' ', $l0_item$.name, ': ', $l0_info$.description, ' '));
} }
} }
} }