refactor(ivy): use ɵɵ instead of Δ for now (#29850)
The `Δ` caused issue with other infrastructure, and we are temporarily changing it to `ɵɵ`. This commit also patches ts_api_guardian_test and AIO to understand `ɵɵ`. PR Close #29850
This commit is contained in:
@ -140,7 +140,7 @@ describe('mock_compiler', () => {
|
||||
expectEmit(
|
||||
result.source, `
|
||||
// TODO: this comment should not be taken into account
|
||||
$r3$.Δtext(0, "Hello!");
|
||||
$r3$.ɵɵtext(0, "Hello!");
|
||||
// TODO: this comment should not be taken into account
|
||||
`,
|
||||
'todo comments should be ignored');
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -39,13 +39,13 @@ describe('compiler compliance: bindings', () => {
|
||||
const template = `
|
||||
template:function MyComponent_Template(rf, $ctx$){
|
||||
if (rf & 1) {
|
||||
$i0$.ΔelementStart(0, "div");
|
||||
$i0$.Δtext(1);
|
||||
$i0$.ΔelementEnd();
|
||||
$i0$.ɵɵelementStart(0, "div");
|
||||
$i0$.ɵɵtext(1);
|
||||
$i0$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.Δselect(1);
|
||||
$i0$.ΔtextBinding(1, $i0$.Δinterpolation1("Hello ", $ctx$.name, ""));
|
||||
$r3$.ɵɵselect(1);
|
||||
$i0$.ɵɵtextBinding(1, $i0$.ɵɵinterpolation1("Hello ", $ctx$.name, ""));
|
||||
}
|
||||
}`;
|
||||
const result = compile(files, angularFiles);
|
||||
@ -78,11 +78,11 @@ describe('compiler compliance: bindings', () => {
|
||||
…
|
||||
template:function MyComponent_Template(rf, $ctx$){
|
||||
if (rf & 1) {
|
||||
$i0$.Δelement(0, "a", $e0_attrs$);
|
||||
$i0$.ɵɵelement(0, "a", $e0_attrs$);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$i0$.Δselect(0);
|
||||
$i0$.ΔelementProperty(0, "title", $i0$.Δbind($ctx$.title));
|
||||
$i0$.ɵɵselect(0);
|
||||
$i0$.ɵɵelementProperty(0, "title", $i0$.ɵɵbind($ctx$.title));
|
||||
}
|
||||
}`;
|
||||
const result = compile(files, angularFiles);
|
||||
@ -113,11 +113,11 @@ describe('compiler compliance: bindings', () => {
|
||||
…
|
||||
template:function MyComponent_Template(rf, $ctx$){
|
||||
if (rf & 1) {
|
||||
$i0$.Δelement(0, "a", $e0_attrs$);
|
||||
$i0$.ɵɵelement(0, "a", $e0_attrs$);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$i0$.Δselect(0);
|
||||
$i0$.ΔelementProperty(0, "title", $i0$.Δinterpolation1("Hello ", $ctx$.name, ""));
|
||||
$i0$.ɵɵselect(0);
|
||||
$i0$.ɵɵelementProperty(0, "title", $i0$.ɵɵinterpolation1("Hello ", $ctx$.name, ""));
|
||||
}
|
||||
}`;
|
||||
const result = compile(files, angularFiles);
|
||||
@ -138,7 +138,7 @@ describe('compiler compliance: bindings', () => {
|
||||
}
|
||||
};
|
||||
const result = compile(files, angularFiles);
|
||||
expect(result.source).not.toContain('i0.ΔelementProperty');
|
||||
expect(result.source).not.toContain('i0.ɵɵelementProperty');
|
||||
});
|
||||
|
||||
it('should not remap property names whose names do not correspond to their attribute names',
|
||||
@ -170,11 +170,11 @@ describe('compiler compliance: bindings', () => {
|
||||
|
||||
function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.Δelement(0, "label", _c0);
|
||||
$i0$.ɵɵelement(0, "label", _c0);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$i0$.Δselect(0);
|
||||
$i0$.ΔelementProperty(0, "for", $i0$.Δbind(ctx.forValue));
|
||||
$i0$.ɵɵselect(0);
|
||||
$i0$.ɵɵelementProperty(0, "for", $i0$.ɵɵbind(ctx.forValue));
|
||||
}
|
||||
}`;
|
||||
|
||||
@ -204,16 +204,16 @@ describe('compiler compliance: bindings', () => {
|
||||
};
|
||||
|
||||
const HostBindingDirDeclaration = `
|
||||
HostBindingDir.ngDirectiveDef = $r3$.ΔdefineDirective({
|
||||
HostBindingDir.ngDirectiveDef = $r3$.ɵɵdefineDirective({
|
||||
type: HostBindingDir,
|
||||
selectors: [["", "hostBindingDir", ""]],
|
||||
factory: function HostBindingDir_Factory(t) { return new (t || HostBindingDir)(); },
|
||||
hostBindings: function HostBindingDir_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔallocHostVars(1);
|
||||
$r3$.ɵɵallocHostVars(1);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementProperty(elIndex, "id", $r3$.Δbind(ctx.dirId), null, true);
|
||||
$r3$.ɵɵelementProperty(elIndex, "id", $r3$.ɵɵbind(ctx.dirId), null, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -251,16 +251,16 @@ describe('compiler compliance: bindings', () => {
|
||||
const HostBindingCompDeclaration = `
|
||||
const $ff$ = function ($v$) { return ["red", $v$]; };
|
||||
…
|
||||
HostBindingComp.ngComponentDef = $r3$.ΔdefineComponent({
|
||||
HostBindingComp.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||
type: HostBindingComp,
|
||||
selectors: [["host-binding-comp"]],
|
||||
factory: function HostBindingComp_Factory(t) { return new (t || HostBindingComp)(); },
|
||||
hostBindings: function HostBindingComp_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔallocHostVars(3);
|
||||
$r3$.ɵɵallocHostVars(3);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementProperty(elIndex, "id", $r3$.Δbind($r3$.ΔpureFunction1(1, $ff$, ctx.id)), null, true);
|
||||
$r3$.ɵɵelementProperty(elIndex, "id", $r3$.ɵɵbind($r3$.ɵɵpureFunction1(1, $ff$, ctx.id)), null, true);
|
||||
}
|
||||
},
|
||||
consts: 0,
|
||||
@ -299,16 +299,16 @@ describe('compiler compliance: bindings', () => {
|
||||
};
|
||||
|
||||
const HostAttributeDirDeclaration = `
|
||||
HostAttributeDir.ngDirectiveDef = $r3$.ΔdefineDirective({
|
||||
HostAttributeDir.ngDirectiveDef = $r3$.ɵɵdefineDirective({
|
||||
type: HostAttributeDir,
|
||||
selectors: [["", "hostAttributeDir", ""]],
|
||||
factory: function HostAttributeDir_Factory(t) { return new (t || HostAttributeDir)(); },
|
||||
hostBindings: function HostAttributeDir_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔallocHostVars(1);
|
||||
$r3$.ɵɵallocHostVars(1);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementAttribute(elIndex, "required", $r3$.Δbind(ctx.required));
|
||||
$r3$.ɵɵelementAttribute(elIndex, "required", $r3$.ɵɵbind(ctx.required));
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -344,13 +344,13 @@ describe('compiler compliance: bindings', () => {
|
||||
const HostAttributeDirDeclaration = `
|
||||
const $c0$ = ["aria-label", "label"];
|
||||
…
|
||||
HostAttributeDir.ngDirectiveDef = $r3$.ΔdefineDirective({
|
||||
HostAttributeDir.ngDirectiveDef = $r3$.ɵɵdefineDirective({
|
||||
type: HostAttributeDir,
|
||||
selectors: [["", "hostAttributeDir", ""]],
|
||||
factory: function HostAttributeDir_Factory(t) { return new (t || HostAttributeDir)(); },
|
||||
hostBindings: function HostAttributeDir_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementHostAttrs($c0$);
|
||||
$r3$.ɵɵelementHostAttrs($c0$);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -402,25 +402,25 @@ describe('compiler compliance: bindings', () => {
|
||||
const $c0$ = ["title", "hello there from component", ${AttributeMarker.Styles}, "opacity", "1"];
|
||||
const $c1$ = ["title", "hello there from directive", ${AttributeMarker.Classes}, "one", "two", ${AttributeMarker.Styles}, "width", "200px", "height", "500px"];
|
||||
…
|
||||
HostAttributeComp.ngComponentDef = $r3$.ΔdefineComponent({
|
||||
HostAttributeComp.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||
type: HostAttributeComp,
|
||||
selectors: [["my-host-attribute-component"]],
|
||||
factory: function HostAttributeComp_Factory(t) { return new (t || HostAttributeComp)(); },
|
||||
hostBindings: function HostAttributeComp_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementHostAttrs($c0$);
|
||||
$r3$.ɵɵelementHostAttrs($c0$);
|
||||
…
|
||||
}
|
||||
…
|
||||
}
|
||||
…
|
||||
HostAttributeDir.ngDirectiveDef = $r3$.ΔdefineDirective({
|
||||
HostAttributeDir.ngDirectiveDef = $r3$.ɵɵdefineDirective({
|
||||
type: HostAttributeDir,
|
||||
selectors: [["", "hostAttributeDir", ""]],
|
||||
factory: function HostAttributeDir_Factory(t) { return new (t || HostAttributeDir)(); },
|
||||
hostBindings: function HostAttributeDir_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementHostAttrs($c1$);
|
||||
$r3$.ɵɵelementHostAttrs($c1$);
|
||||
…
|
||||
}
|
||||
…
|
||||
@ -466,19 +466,19 @@ describe('compiler compliance: bindings', () => {
|
||||
…
|
||||
template:function MyComponent_Template(rf, $ctx$){
|
||||
if (rf & 1) {
|
||||
$i0$.ΔelementStart(0, "b", $_c0$, $_c1$);
|
||||
$i0$.ΔdisableBindings();
|
||||
$i0$.ΔelementStart(2, "i");
|
||||
$i0$.Δtext(3, "Hello {{ name }}!");
|
||||
$i0$.ΔelementEnd();
|
||||
$i0$.ΔenableBindings();
|
||||
$i0$.ΔelementEnd();
|
||||
$i0$.Δtext(4);
|
||||
$i0$.ɵɵelementStart(0, "b", $_c0$, $_c1$);
|
||||
$i0$.ɵɵdisableBindings();
|
||||
$i0$.ɵɵelementStart(2, "i");
|
||||
$i0$.ɵɵtext(3, "Hello {{ name }}!");
|
||||
$i0$.ɵɵelementEnd();
|
||||
$i0$.ɵɵenableBindings();
|
||||
$i0$.ɵɵelementEnd();
|
||||
$i0$.ɵɵtext(4);
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $_r0$ = $i0$.Δreference(1);
|
||||
$r3$.Δselect(4);
|
||||
$i0$.ΔtextBinding(4, $i0$.Δinterpolation1(" ", $_r0$.id, " "));
|
||||
const $_r0$ = $i0$.ɵɵreference(1);
|
||||
$r3$.ɵɵselect(4);
|
||||
$i0$.ɵɵtextBinding(4, $i0$.ɵɵinterpolation1(" ", $_r0$.id, " "));
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -498,12 +498,12 @@ describe('compiler compliance: bindings', () => {
|
||||
…
|
||||
template:function MyComponent_Template(rf, $ctx$){
|
||||
if (rf & 1) {
|
||||
$i0$.ΔelementStart(0, "div");
|
||||
$i0$.ΔdisableBindings();
|
||||
$i0$.Δelement(1, "input", $_c0$);
|
||||
$i0$.Δtext(2, " {{ myInput.value }} ");
|
||||
$i0$.ΔenableBindings();
|
||||
$i0$.ΔelementEnd();
|
||||
$i0$.ɵɵelementStart(0, "div");
|
||||
$i0$.ɵɵdisableBindings();
|
||||
$i0$.ɵɵelement(1, "input", $_c0$);
|
||||
$i0$.ɵɵtext(2, " {{ myInput.value }} ");
|
||||
$i0$.ɵɵenableBindings();
|
||||
$i0$.ɵɵelementEnd();
|
||||
}
|
||||
`;
|
||||
const result = compile(files, angularFiles);
|
||||
@ -522,11 +522,11 @@ describe('compiler compliance: bindings', () => {
|
||||
…
|
||||
template:function MyComponent_Template(rf, $ctx$){
|
||||
if (rf & 1) {
|
||||
$i0$.ΔelementStart(0, "div");
|
||||
$i0$.ΔdisableBindings();
|
||||
$i0$.Δelement(1, "div", $_c0$);
|
||||
$i0$.ΔenableBindings();
|
||||
$i0$.ΔelementEnd();
|
||||
$i0$.ɵɵelementStart(0, "div");
|
||||
$i0$.ɵɵdisableBindings();
|
||||
$i0$.ɵɵelement(1, "div", $_c0$);
|
||||
$i0$.ɵɵenableBindings();
|
||||
$i0$.ɵɵelementEnd();
|
||||
}
|
||||
`;
|
||||
const result = compile(files, angularFiles);
|
||||
@ -541,7 +541,7 @@ describe('compiler compliance: bindings', () => {
|
||||
const template = `
|
||||
template:function MyComponent_Template(rf, $ctx$){
|
||||
if (rf & 1) {
|
||||
$i0$.Δelement(0, "div");
|
||||
$i0$.ɵɵelement(0, "div");
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
@ -50,13 +50,13 @@ describe('compiler compliance: dependency injection', () => {
|
||||
const factory = `
|
||||
factory: function MyComponent_Factory(t) {
|
||||
return new (t || MyComponent)(
|
||||
$r3$.ΔinjectAttribute('name'),
|
||||
$r3$.ΔdirectiveInject(MyService),
|
||||
$r3$.ΔdirectiveInject(MyService, 1),
|
||||
$r3$.ΔdirectiveInject(MyService, 2),
|
||||
$r3$.ΔdirectiveInject(MyService, 4),
|
||||
$r3$.ΔdirectiveInject(MyService, 8),
|
||||
$r3$.ΔdirectiveInject(MyService, 10)
|
||||
$r3$.ɵɵinjectAttribute('name'),
|
||||
$r3$.ɵɵdirectiveInject(MyService),
|
||||
$r3$.ɵɵdirectiveInject(MyService, 1),
|
||||
$r3$.ɵɵdirectiveInject(MyService, 2),
|
||||
$r3$.ɵɵdirectiveInject(MyService, 4),
|
||||
$r3$.ɵɵdirectiveInject(MyService, 8),
|
||||
$r3$.ɵɵdirectiveInject(MyService, 10)
|
||||
);
|
||||
}`;
|
||||
|
||||
|
@ -38,7 +38,7 @@ describe('compiler compliance: directives', () => {
|
||||
|
||||
// MyComponent definition should be:
|
||||
const MyComponentDefinition = `
|
||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
||||
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||
type: MyComponent,
|
||||
selectors: [["my-component"]],
|
||||
factory: function MyComponent_Factory(t) { return new (t || MyComponent)(); },
|
||||
@ -46,7 +46,7 @@ describe('compiler compliance: directives', () => {
|
||||
vars: 0,
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.Δelement(0, "div");
|
||||
$r3$.ɵɵelement(0, "div");
|
||||
}
|
||||
},
|
||||
encapsulation: 2
|
||||
@ -84,7 +84,7 @@ describe('compiler compliance: directives', () => {
|
||||
|
||||
// MyComponent definition should be:
|
||||
const MyComponentDefinition = `
|
||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
||||
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||
type: MyComponent,
|
||||
selectors: [["my-component"]],
|
||||
factory: function MyComponent_Factory(t) { return new (t || MyComponent)(); },
|
||||
@ -92,7 +92,7 @@ describe('compiler compliance: directives', () => {
|
||||
vars: 0,
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.Δelement(0, "div");
|
||||
$r3$.ɵɵelement(0, "div");
|
||||
}
|
||||
},
|
||||
encapsulation: 2
|
||||
@ -132,15 +132,15 @@ describe('compiler compliance: directives', () => {
|
||||
…
|
||||
const _c0 = [${AttributeMarker.Bindings}, "someDirective"];
|
||||
…
|
||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
||||
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||
…
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.Δelement(0, "div", _c0);
|
||||
$r3$.ɵɵelement(0, "div", _c0);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.Δselect(0);
|
||||
$r3$.ΔelementProperty(0, "someDirective", $r3$.Δbind(true));
|
||||
$r3$.ɵɵselect(0);
|
||||
$r3$.ɵɵelementProperty(0, "someDirective", $r3$.ɵɵbind(true));
|
||||
}
|
||||
},
|
||||
…
|
||||
@ -187,15 +187,15 @@ describe('compiler compliance: directives', () => {
|
||||
const $_c0$ = ["directiveA", ""];
|
||||
function MyComponent_ng_template_0_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.Δtext(0, "Some content");
|
||||
$r3$.ɵɵtext(0, "Some content");
|
||||
}
|
||||
}
|
||||
…
|
||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
||||
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||
…
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.Δtemplate(0, MyComponent_ng_template_0_Template, 1, 0, "ng-template", $_c0$);
|
||||
$r3$.ɵɵtemplate(0, MyComponent_ng_template_0_Template, 1, 0, "ng-template", $_c0$);
|
||||
}
|
||||
},
|
||||
…
|
||||
@ -241,21 +241,21 @@ describe('compiler compliance: directives', () => {
|
||||
const $_c1$ = ["directiveA", ""];
|
||||
function MyComponent_ng_container_0_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementContainerStart(0, $_c1$);
|
||||
$r3$.Δtext(1, "Some content");
|
||||
$r3$.ΔelementContainerEnd();
|
||||
$r3$.ɵɵelementContainerStart(0, $_c1$);
|
||||
$r3$.ɵɵtext(1, "Some content");
|
||||
$r3$.ɵɵelementContainerEnd();
|
||||
}
|
||||
}
|
||||
…
|
||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
||||
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||
…
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.Δtemplate(0, MyComponent_ng_container_0_Template, 2, 0, "ng-container", $_c0$);
|
||||
$r3$.ɵɵtemplate(0, MyComponent_ng_container_0_Template, 2, 0, "ng-container", $_c0$);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.Δselect(0);
|
||||
$r3$.ΔelementProperty(0, "ngIf", $r3$.Δbind(ctx.showing));
|
||||
$r3$.ɵɵselect(0);
|
||||
$r3$.ɵɵelementProperty(0, "ngIf", $r3$.ɵɵbind(ctx.showing));
|
||||
}
|
||||
},
|
||||
…
|
||||
@ -295,15 +295,15 @@ describe('compiler compliance: directives', () => {
|
||||
…
|
||||
const $c0_a0$ = [${AttributeMarker.Bindings}, "someDirective"];
|
||||
…
|
||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
||||
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||
…
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.Δtemplate(0, MyComponent_ng_template_0_Template, 0, 0, "ng-template", $c0_a0$);
|
||||
$r3$.ɵɵtemplate(0, MyComponent_ng_template_0_Template, 0, 0, "ng-template", $c0_a0$);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.Δselect(0);
|
||||
$r3$.ΔelementProperty(0, "someDirective", $r3$.Δbind(true));
|
||||
$r3$.ɵɵselect(0);
|
||||
$r3$.ɵɵelementProperty(0, "someDirective", $r3$.ɵɵbind(true));
|
||||
}
|
||||
},
|
||||
…
|
||||
@ -344,11 +344,11 @@ describe('compiler compliance: directives', () => {
|
||||
…
|
||||
const $c0_a0$ = [${AttributeMarker.Template}, "someDirective"];
|
||||
…
|
||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
||||
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||
…
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.Δtemplate(0, MyComponent_div_0_Template, 1, 0, "div", $c0_a0$);
|
||||
$r3$.ɵɵtemplate(0, MyComponent_div_0_Template, 1, 0, "div", $c0_a0$);
|
||||
}
|
||||
},
|
||||
…
|
||||
@ -393,13 +393,13 @@ describe('compiler compliance: directives', () => {
|
||||
…
|
||||
const $c0_a0$ = [${AttributeMarker.Bindings}, "someDirective"];
|
||||
…
|
||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
||||
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||
…
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementStart(0, "div", $c0_a0$);
|
||||
$r3$.Δlistener("someDirective", function MyComponent_Template_div_someDirective_0_listener($event) { return ctx.noop(); });
|
||||
$r3$.ΔelementEnd();
|
||||
$r3$.ɵɵelementStart(0, "div", $c0_a0$);
|
||||
$r3$.ɵɵlistener("someDirective", function MyComponent_Template_div_someDirective_0_listener($event) { return ctx.noop(); });
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
},
|
||||
…
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -52,7 +52,7 @@ describe('compiler compliance: listen()', () => {
|
||||
};
|
||||
|
||||
const componentDef = `
|
||||
MyComponent.ngComponentDef = IDENT.ΔdefineComponent({
|
||||
MyComponent.ngComponentDef = IDENT.ɵɵdefineComponent({
|
||||
…
|
||||
inputs:{
|
||||
componentInput: "componentInput",
|
||||
@ -66,7 +66,7 @@ describe('compiler compliance: listen()', () => {
|
||||
});`;
|
||||
|
||||
const directiveDef = `
|
||||
MyDirective.ngDirectiveDef = IDENT.ΔdefineDirective({
|
||||
MyDirective.ngDirectiveDef = IDENT.ɵɵdefineDirective({
|
||||
…
|
||||
inputs:{
|
||||
directiveInput: "directiveInput",
|
||||
|
@ -45,12 +45,12 @@ describe('compiler compliance: listen()', () => {
|
||||
…
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementStart(0, "div", $e0_attrs$);
|
||||
$r3$.Δlistener("click", function MyComponent_Template_div_click_0_listener($event) {
|
||||
$r3$.ɵɵelementStart(0, "div", $e0_attrs$);
|
||||
$r3$.ɵɵlistener("click", function MyComponent_Template_div_click_0_listener($event) {
|
||||
ctx.onClick($event);
|
||||
return (1 == 2);
|
||||
});
|
||||
$r3$.ΔelementEnd();
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -91,11 +91,11 @@ describe('compiler compliance: listen()', () => {
|
||||
…
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementStart(0, "my-app", $e0_attrs$);
|
||||
$r3$.Δlistener("click", function MyComponent_Template_my_app_click_0_listener($event) {
|
||||
$r3$.ɵɵelementStart(0, "my-app", $e0_attrs$);
|
||||
$r3$.ɵɵlistener("click", function MyComponent_Template_my_app_click_0_listener($event) {
|
||||
return ctx.onClick($event);
|
||||
});
|
||||
$r3$.ΔelementEnd();
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -138,33 +138,33 @@ describe('compiler compliance: listen()', () => {
|
||||
|
||||
function MyComponent_div_0_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
const $s$ = $r3$.ΔgetCurrentView();
|
||||
$r3$.ΔelementStart(0, "div");
|
||||
$r3$.ΔelementStart(1, "div", $e_attrs$);
|
||||
$r3$.Δlistener("click", function MyComponent_div_0_Template_div_click_1_listener($event) {
|
||||
$r3$.ΔrestoreView($s$);
|
||||
const $comp$ = $r3$.ΔnextContext();
|
||||
const $s$ = $r3$.ɵɵgetCurrentView();
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵelementStart(1, "div", $e_attrs$);
|
||||
$r3$.ɵɵlistener("click", function MyComponent_div_0_Template_div_click_1_listener($event) {
|
||||
$r3$.ɵɵrestoreView($s$);
|
||||
const $comp$ = $r3$.ɵɵnextContext();
|
||||
return $comp$.onClick($comp$.foo);
|
||||
});
|
||||
$r3$.ΔelementEnd();
|
||||
$r3$.ΔelementStart(2, "button", $e_attrs$);
|
||||
$r3$.Δlistener("click", function MyComponent_div_0_Template_button_click_2_listener($event) {
|
||||
$r3$.ΔrestoreView($s$);
|
||||
const $comp2$ = $r3$.ΔnextContext();
|
||||
$r3$.ɵɵelementEnd();
|
||||
$r3$.ɵɵelementStart(2, "button", $e_attrs$);
|
||||
$r3$.ɵɵlistener("click", function MyComponent_div_0_Template_button_click_2_listener($event) {
|
||||
$r3$.ɵɵrestoreView($s$);
|
||||
const $comp2$ = $r3$.ɵɵnextContext();
|
||||
return $comp2$.onClick2($comp2$.bar);
|
||||
});
|
||||
$r3$.ΔelementEnd();
|
||||
$r3$.ΔelementEnd();
|
||||
$r3$.ɵɵelementEnd();
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
}
|
||||
// ...
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.Δtemplate(0, MyComponent_div_0_Template, 3, 0, "div", $c0$);
|
||||
$r3$.ɵɵtemplate(0, MyComponent_div_0_Template, 3, 0, "div", $c0$);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$i0$.Δselect(0);
|
||||
$i0$.ΔelementProperty(0, "ngIf", $i0$.Δbind(ctx.showing));
|
||||
$i0$.ɵɵselect(0);
|
||||
$i0$.ɵɵelementProperty(0, "ngIf", $i0$.ɵɵbind(ctx.showing));
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -199,7 +199,7 @@ describe('compiler compliance: listen()', () => {
|
||||
const $e0_attrs$ = [${AttributeMarker.Bindings}, "click"];
|
||||
const $e2_refs$ = ["user", ""];
|
||||
…
|
||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
||||
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||
type: MyComponent,
|
||||
selectors: [["my-component"]],
|
||||
factory: function MyComponent_Factory(t) { return new (t || MyComponent)(); },
|
||||
@ -207,16 +207,16 @@ describe('compiler compliance: listen()', () => {
|
||||
vars: 0,
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
const $s$ = $r3$.ΔgetCurrentView();
|
||||
$r3$.ΔelementStart(0, "button", $e0_attrs$);
|
||||
$r3$.Δlistener("click", function MyComponent_Template_button_click_0_listener($event) {
|
||||
$r3$.ΔrestoreView($s$);
|
||||
const $user$ = $r3$.Δreference(3);
|
||||
const $s$ = $r3$.ɵɵgetCurrentView();
|
||||
$r3$.ɵɵelementStart(0, "button", $e0_attrs$);
|
||||
$r3$.ɵɵlistener("click", function MyComponent_Template_button_click_0_listener($event) {
|
||||
$r3$.ɵɵrestoreView($s$);
|
||||
const $user$ = $r3$.ɵɵreference(3);
|
||||
return ctx.onClick($user$.value);
|
||||
});
|
||||
$r3$.Δtext(1, "Save");
|
||||
$r3$.ΔelementEnd();
|
||||
$r3$.Δelement(2, "input", null, $e2_refs$);
|
||||
$r3$.ɵɵtext(1, "Save");
|
||||
$r3$.ɵɵelementEnd();
|
||||
$r3$.ɵɵelement(2, "input", null, $e2_refs$);
|
||||
}
|
||||
},
|
||||
encapsulation: 2
|
||||
|
@ -46,7 +46,7 @@ describe('compiler compliance: providers', () => {
|
||||
const result = compile(files, angularFiles);
|
||||
expectEmit(
|
||||
result.source,
|
||||
'features: [i0.ΔProvidersFeature([GreeterEN, {provide: Greeter, useClass: GreeterEN}], [GreeterEN])],',
|
||||
'features: [i0.ɵɵProvidersFeature([GreeterEN, {provide: Greeter, useClass: GreeterEN}], [GreeterEN])],',
|
||||
'Incorrect features');
|
||||
});
|
||||
|
||||
@ -79,7 +79,7 @@ describe('compiler compliance: providers', () => {
|
||||
const result = compile(files, angularFiles);
|
||||
expectEmit(
|
||||
result.source,
|
||||
'features: [i0.ΔProvidersFeature([GreeterEN, {provide: Greeter, useClass: GreeterEN}])],',
|
||||
'features: [i0.ɵɵProvidersFeature([GreeterEN, {provide: Greeter, useClass: GreeterEN}])],',
|
||||
'Incorrect features');
|
||||
});
|
||||
|
||||
@ -111,7 +111,7 @@ describe('compiler compliance: providers', () => {
|
||||
|
||||
const result = compile(files, angularFiles);
|
||||
expectEmit(
|
||||
result.source, 'features: [i0.ΔProvidersFeature([], [GreeterEN])],', 'Incorrect features');
|
||||
result.source, 'features: [i0.ɵɵProvidersFeature([], [GreeterEN])],', 'Incorrect features');
|
||||
});
|
||||
|
||||
it('should not emit the ProvidersFeature feature when no providers', () => {
|
||||
|
@ -113,7 +113,7 @@ describe('r3_view_compiler', () => {
|
||||
};
|
||||
|
||||
const bV_call =
|
||||
`$r3$.ΔinterpolationV([" ",ctx.list[0]," ",ctx.list[1]," ",ctx.list[2]," ",ctx.list[3],
|
||||
`$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],
|
||||
" "])`;
|
||||
const result = compile(files, angularFiles);
|
||||
@ -143,12 +143,12 @@ describe('r3_view_compiler', () => {
|
||||
const template = `
|
||||
template: function MyApp_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.Δelement(0, "div");
|
||||
$i0$.ɵɵelement(0, "div");
|
||||
}
|
||||
if (rf & 2) {
|
||||
$i0$.Δselect(0);
|
||||
$i0$.ΔelementProperty(0, "@attr", …);
|
||||
$i0$.ΔelementProperty(0, "@binding", …);
|
||||
$i0$.ɵɵselect(0);
|
||||
$i0$.ɵɵelementProperty(0, "@attr", …);
|
||||
$i0$.ɵɵelementProperty(0, "@binding", …);
|
||||
}
|
||||
}`;
|
||||
const result = compile(files, angularFiles);
|
||||
@ -176,10 +176,10 @@ describe('r3_view_compiler', () => {
|
||||
const template = `
|
||||
template: function MyApp_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.ΔelementStart(0, "div");
|
||||
$i0$.ɵɵelementStart(0, "div");
|
||||
…
|
||||
$i0$.Δselect(0);
|
||||
$i0$.ΔelementProperty(0, "@mySelector", …);
|
||||
$i0$.ɵɵselect(0);
|
||||
$i0$.ɵɵelementProperty(0, "@mySelector", …);
|
||||
}
|
||||
}`;
|
||||
const result = compile(files, angularFiles);
|
||||
|
@ -95,7 +95,7 @@ describe('compiler compliance: styling', () => {
|
||||
};
|
||||
|
||||
const template = `
|
||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
||||
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||
…
|
||||
styles: ["div.cool { color: blue; }", ":host.nice p { color: gold; }"],
|
||||
encapsulation: 1
|
||||
@ -128,7 +128,7 @@ describe('compiler compliance: styling', () => {
|
||||
};
|
||||
|
||||
const template = `
|
||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
||||
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||
type: MyComponent,
|
||||
selectors:[["my-component"]],
|
||||
factory:function MyComponent_Factory(t){
|
||||
@ -170,7 +170,7 @@ describe('compiler compliance: styling', () => {
|
||||
};
|
||||
|
||||
const template = `
|
||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
||||
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||
type: MyComponent,
|
||||
selectors:[["my-component"]],
|
||||
factory:function MyComponent_Factory(t){
|
||||
@ -215,23 +215,23 @@ describe('compiler compliance: styling', () => {
|
||||
|
||||
const template = `
|
||||
…
|
||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
||||
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||
…
|
||||
consts: 3,
|
||||
vars: 3,
|
||||
template: function MyComponent_Template(rf, $ctx$) {
|
||||
if (rf & 1) {
|
||||
$r3$.Δelement(0, "div");
|
||||
$r3$.Δelement(1, "div");
|
||||
$r3$.Δelement(2, "div");
|
||||
$r3$.ɵɵelement(0, "div");
|
||||
$r3$.ɵɵelement(1, "div");
|
||||
$r3$.ɵɵelement(2, "div");
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.Δselect(0);
|
||||
$r3$.ΔelementProperty(0, "@foo", $r3$.Δbind(ctx.exp));
|
||||
$r3$.Δselect(1);
|
||||
$r3$.ΔelementProperty(1, "@bar", $r3$.Δbind(undefined));
|
||||
$r3$.Δselect(2);
|
||||
$r3$.ΔelementProperty(2, "@baz", $r3$.Δbind(undefined));
|
||||
$r3$.ɵɵselect(0);
|
||||
$r3$.ɵɵelementProperty(0, "@foo", $r3$.ɵɵbind(ctx.exp));
|
||||
$r3$.ɵɵselect(1);
|
||||
$r3$.ɵɵelementProperty(1, "@bar", $r3$.ɵɵbind(undefined));
|
||||
$r3$.ɵɵselect(2);
|
||||
$r3$.ɵɵelementProperty(2, "@baz", $r3$.ɵɵbind(undefined));
|
||||
}
|
||||
},
|
||||
encapsulation: 2
|
||||
@ -277,19 +277,19 @@ describe('compiler compliance: styling', () => {
|
||||
|
||||
const template = `
|
||||
…
|
||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
||||
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||
…
|
||||
consts: 1,
|
||||
vars: 1,
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementStart(0, "div");
|
||||
$r3$.Δlistener("@myAnimation.start", function MyComponent_Template_div_animation_myAnimation_start_0_listener($event) { return ctx.onStart($event); });
|
||||
$r3$.Δlistener("@myAnimation.done", function MyComponent_Template_div_animation_myAnimation_done_0_listener($event) { return ctx.onDone($event); });
|
||||
$r3$.ΔelementEnd();
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵlistener("@myAnimation.start", function MyComponent_Template_div_animation_myAnimation_start_0_listener($event) { return ctx.onStart($event); });
|
||||
$r3$.ɵɵlistener("@myAnimation.done", function MyComponent_Template_div_animation_myAnimation_done_0_listener($event) { return ctx.onDone($event); });
|
||||
$r3$.ɵɵelementEnd();
|
||||
} if (rf & 2) {
|
||||
$r3$.Δselect(0);
|
||||
$r3$.ΔelementProperty(0, "@myAnimation", $r3$.Δbind(ctx.exp));
|
||||
$r3$.ɵɵselect(0);
|
||||
$r3$.ɵɵelementProperty(0, "@myAnimation", $r3$.ɵɵbind(ctx.exp));
|
||||
}
|
||||
},
|
||||
encapsulation: 2,
|
||||
@ -340,15 +340,15 @@ describe('compiler compliance: styling', () => {
|
||||
};
|
||||
|
||||
const template = `
|
||||
MyAnimDir.ngDirectiveDef = $r3$.ΔdefineDirective({
|
||||
MyAnimDir.ngDirectiveDef = $r3$.ɵɵdefineDirective({
|
||||
…
|
||||
hostBindings: function MyAnimDir_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔallocHostVars(1);
|
||||
$r3$.ΔcomponentHostSyntheticListener("@myAnim.start", function MyAnimDir_animation_myAnim_start_HostBindingHandler($event) { return ctx.onStart(); });
|
||||
$r3$.ΔcomponentHostSyntheticListener("@myAnim.done", function MyAnimDir_animation_myAnim_done_HostBindingHandler($event) { return ctx.onDone(); });
|
||||
$r3$.ɵɵallocHostVars(1);
|
||||
$r3$.ɵɵcomponentHostSyntheticListener("@myAnim.start", function MyAnimDir_animation_myAnim_start_HostBindingHandler($event) { return ctx.onStart(); });
|
||||
$r3$.ɵɵcomponentHostSyntheticListener("@myAnim.done", function MyAnimDir_animation_myAnim_done_HostBindingHandler($event) { return ctx.onDone(); });
|
||||
} if (rf & 2) {
|
||||
$r3$.ΔcomponentHostSyntheticProperty(elIndex, "@myAnim", $r3$.Δbind(ctx.myAnimState), null, true);
|
||||
$r3$.ɵɵcomponentHostSyntheticProperty(elIndex, "@myAnim", $r3$.ɵɵbind(ctx.myAnimState), null, true);
|
||||
}
|
||||
}
|
||||
…
|
||||
@ -384,13 +384,13 @@ describe('compiler compliance: styling', () => {
|
||||
const template = `
|
||||
template: function MyComponent_Template(rf, $ctx$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementStart(0, "div");
|
||||
$r3$.ΔelementStyling(null, null, $r3$.ΔdefaultStyleSanitizer);
|
||||
$r3$.ΔelementEnd();
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵelementStyling(null, null, $r3$.ɵɵdefaultStyleSanitizer);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementStylingMap(0, null, $ctx$.myStyleExp);
|
||||
$r3$.ΔelementStylingApply(0);
|
||||
$r3$.ɵɵelementStylingMap(0, null, $ctx$.myStyleExp);
|
||||
$r3$.ɵɵelementStylingApply(0);
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -449,13 +449,13 @@ describe('compiler compliance: styling', () => {
|
||||
vars: 1,
|
||||
template: function MyComponentWithInterpolation_Template(rf, $ctx$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementStart(0, "div");
|
||||
$r3$.ΔelementStyling();
|
||||
$r3$.ΔelementEnd();
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵelementStyling();
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementStylingMap(0, $r3$.Δinterpolation1("foo foo-", $ctx$.fooId, ""));
|
||||
$r3$.ΔelementStylingApply(0);
|
||||
$r3$.ɵɵelementStylingMap(0, $r3$.ɵɵinterpolation1("foo foo-", $ctx$.fooId, ""));
|
||||
$r3$.ɵɵelementStylingApply(0);
|
||||
}
|
||||
}
|
||||
…
|
||||
@ -463,13 +463,13 @@ describe('compiler compliance: styling', () => {
|
||||
vars: 2,
|
||||
template: function MyComponentWithMuchosInterpolation_Template(rf, $ctx$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementStart(0, "div");
|
||||
$r3$.ΔelementStyling();
|
||||
$r3$.ΔelementEnd();
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵelementStyling();
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementStylingMap(0, $r3$.Δinterpolation2("foo foo-", $ctx$.fooId, "-", $ctx$.fooUsername, ""));
|
||||
$r3$.ΔelementStylingApply(0);
|
||||
$r3$.ɵɵelementStylingMap(0, $r3$.ɵɵinterpolation2("foo foo-", $ctx$.fooId, "-", $ctx$.fooUsername, ""));
|
||||
$r3$.ɵɵelementStylingApply(0);
|
||||
}
|
||||
}
|
||||
…
|
||||
@ -477,13 +477,13 @@ describe('compiler compliance: styling', () => {
|
||||
vars: 0,
|
||||
template: function MyComponentWithoutInterpolation_Template(rf, $ctx$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementStart(0, "div");
|
||||
$r3$.ΔelementStyling();
|
||||
$r3$.ΔelementEnd();
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵelementStyling();
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementStylingMap(0, $ctx$.exp);
|
||||
$r3$.ΔelementStylingApply(0);
|
||||
$r3$.ɵɵelementStylingMap(0, $ctx$.exp);
|
||||
$r3$.ɵɵelementStylingApply(0);
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -523,7 +523,7 @@ describe('compiler compliance: styling', () => {
|
||||
const $_c0$ = [${AttributeMarker.Styles}, "opacity", "1", ${AttributeMarker.Bindings}, "style"];
|
||||
const $_c1$ = ["width", "height"];
|
||||
…
|
||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
||||
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||
type: MyComponent,
|
||||
selectors:[["my-component"]],
|
||||
factory:function MyComponent_Factory(t){
|
||||
@ -533,17 +533,17 @@ describe('compiler compliance: styling', () => {
|
||||
vars: 1,
|
||||
template: function MyComponent_Template(rf, $ctx$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementStart(0, "div", $_c0$);
|
||||
$r3$.ΔelementStyling(null, $_c1$, $r3$.ΔdefaultStyleSanitizer);
|
||||
$r3$.ΔelementEnd();
|
||||
$r3$.ɵɵelementStart(0, "div", $_c0$);
|
||||
$r3$.ɵɵelementStyling(null, $_c1$, $r3$.ɵɵdefaultStyleSanitizer);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementStylingMap(0, null, $ctx$.myStyleExp);
|
||||
$r3$.ΔelementStyleProp(0, 0, $ctx$.myWidth);
|
||||
$r3$.ΔelementStyleProp(0, 1, $ctx$.myHeight);
|
||||
$r3$.ΔelementStylingApply(0);
|
||||
$r3$.Δselect(0);
|
||||
$r3$.ΔelementAttribute(0, "style", $r3$.Δbind("border-width: 10px"), $r3$.ΔsanitizeStyle);
|
||||
$r3$.ɵɵelementStylingMap(0, null, $ctx$.myStyleExp);
|
||||
$r3$.ɵɵelementStyleProp(0, 0, $ctx$.myWidth);
|
||||
$r3$.ɵɵelementStyleProp(0, 1, $ctx$.myHeight);
|
||||
$r3$.ɵɵelementStylingApply(0);
|
||||
$r3$.ɵɵselect(0);
|
||||
$r3$.ɵɵelementAttribute(0, "style", $r3$.ɵɵbind("border-width: 10px"), $r3$.ɵɵsanitizeStyle);
|
||||
}
|
||||
},
|
||||
encapsulation: 2
|
||||
@ -583,7 +583,7 @@ describe('compiler compliance: styling', () => {
|
||||
}
|
||||
}
|
||||
|
||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
||||
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||
type: MyComponent,
|
||||
selectors: [["my-component"]],
|
||||
factory: function MyComponent_Factory(t) {
|
||||
@ -593,13 +593,13 @@ describe('compiler compliance: styling', () => {
|
||||
vars: 0,
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementStart(0, "div");
|
||||
$r3$.ΔelementStyling(null, _c0, $r3$.ΔdefaultStyleSanitizer);
|
||||
$r3$.ΔelementEnd();
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵelementStyling(null, _c0, $r3$.ɵɵdefaultStyleSanitizer);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementStyleProp(0, 0, ctx.myImage);
|
||||
$r3$.ΔelementStylingApply(0);
|
||||
$r3$.ɵɵelementStyleProp(0, 0, ctx.myImage);
|
||||
$r3$.ɵɵelementStylingApply(0);
|
||||
}
|
||||
},
|
||||
encapsulation: 2
|
||||
@ -634,13 +634,13 @@ describe('compiler compliance: styling', () => {
|
||||
…
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementStart(0, "div");
|
||||
$r3$.ΔelementStyling(null, _c0);
|
||||
$r3$.ΔelementEnd();
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵelementStyling(null, _c0);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementStyleProp(0, 0, 12, "px");
|
||||
$r3$.ΔelementStylingApply(0);
|
||||
$r3$.ɵɵelementStyleProp(0, 0, 12, "px");
|
||||
$r3$.ɵɵelementStylingApply(0);
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -675,13 +675,13 @@ describe('compiler compliance: styling', () => {
|
||||
const template = `
|
||||
template: function MyComponent_Template(rf, $ctx$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementStart(0, "div");
|
||||
$r3$.ΔelementStyling();
|
||||
$r3$.ΔelementEnd();
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵelementStyling();
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementStylingMap(0,$ctx$.myClassExp);
|
||||
$r3$.ΔelementStylingApply(0);
|
||||
$r3$.ɵɵelementStylingMap(0,$ctx$.myClassExp);
|
||||
$r3$.ɵɵelementStylingApply(0);
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -721,7 +721,7 @@ describe('compiler compliance: styling', () => {
|
||||
const $e0_attrs$ = [${AttributeMarker.Classes}, "grape", ${AttributeMarker.Bindings}, "class"];
|
||||
const $e0_bindings$ = ["apple", "orange"];
|
||||
…
|
||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
||||
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||
type: MyComponent,
|
||||
selectors:[["my-component"]],
|
||||
factory:function MyComponent_Factory(t){
|
||||
@ -731,17 +731,17 @@ describe('compiler compliance: styling', () => {
|
||||
vars: 1,
|
||||
template: function MyComponent_Template(rf, $ctx$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementStart(0, "div", $e0_attrs$);
|
||||
$r3$.ΔelementStyling($e0_bindings$);
|
||||
$r3$.ΔelementEnd();
|
||||
$r3$.ɵɵelementStart(0, "div", $e0_attrs$);
|
||||
$r3$.ɵɵelementStyling($e0_bindings$);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementStylingMap(0, $ctx$.myClassExp);
|
||||
$r3$.ΔelementClassProp(0, 0, $ctx$.yesToApple);
|
||||
$r3$.ΔelementClassProp(0, 1, $ctx$.yesToOrange);
|
||||
$r3$.ΔelementStylingApply(0);
|
||||
$r3$.Δselect(0);
|
||||
$r3$.ΔelementAttribute(0, "class", $r3$.Δbind("banana"));
|
||||
$r3$.ɵɵelementStylingMap(0, $ctx$.myClassExp);
|
||||
$r3$.ɵɵelementClassProp(0, 0, $ctx$.yesToApple);
|
||||
$r3$.ɵɵelementClassProp(0, 1, $ctx$.yesToOrange);
|
||||
$r3$.ɵɵelementStylingApply(0);
|
||||
$r3$.ɵɵselect(0);
|
||||
$r3$.ɵɵelementAttribute(0, "class", $r3$.ɵɵbind("banana"));
|
||||
}
|
||||
},
|
||||
encapsulation: 2
|
||||
@ -777,7 +777,7 @@ describe('compiler compliance: styling', () => {
|
||||
const template = `
|
||||
const $e0_attrs$ = [${AttributeMarker.Classes}, "foo", ${AttributeMarker.Styles}, "width", "100px", ${AttributeMarker.Bindings}, "class", "style"];
|
||||
…
|
||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
||||
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||
type: MyComponent,
|
||||
selectors:[["my-component"]],
|
||||
factory:function MyComponent_Factory(t){
|
||||
@ -787,12 +787,12 @@ describe('compiler compliance: styling', () => {
|
||||
vars: 2,
|
||||
template: function MyComponent_Template(rf, $ctx$) {
|
||||
if (rf & 1) {
|
||||
$r3$.Δelement(0, "div", $e0_attrs$);
|
||||
$r3$.ɵɵelement(0, "div", $e0_attrs$);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.Δselect(0);
|
||||
$r3$.ΔelementAttribute(0, "class", $r3$.Δbind("round"));
|
||||
$r3$.ΔelementAttribute(0, "style", $r3$.Δbind("height:100px"), $r3$.ΔsanitizeStyle);
|
||||
$r3$.ɵɵselect(0);
|
||||
$r3$.ɵɵelementAttribute(0, "class", $r3$.ɵɵbind("round"));
|
||||
$r3$.ɵɵelementAttribute(0, "style", $r3$.ɵɵbind("height:100px"), $r3$.ɵɵsanitizeStyle);
|
||||
}
|
||||
},
|
||||
encapsulation: 2
|
||||
@ -829,13 +829,13 @@ describe('compiler compliance: styling', () => {
|
||||
const template = `
|
||||
template: function MyComponent_Template(rf, $ctx$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementStart(0, "div");
|
||||
$r3$.ΔelementStyling(null, null, $r3$.ΔdefaultStyleSanitizer);
|
||||
$r3$.ΔelementEnd();
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵelementStyling(null, null, $r3$.ɵɵdefaultStyleSanitizer);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementStylingMap(0, $ctx$.myClassExp, $ctx$.myStyleExp);
|
||||
$r3$.ΔelementStylingApply(0);
|
||||
$r3$.ɵɵelementStylingMap(0, $ctx$.myClassExp, $ctx$.myStyleExp);
|
||||
$r3$.ɵɵelementStylingApply(0);
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -869,15 +869,15 @@ describe('compiler compliance: styling', () => {
|
||||
const template = `
|
||||
template: function MyComponent_Template(rf, $ctx$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementStart(0, "div");
|
||||
$r3$.ΔelementStyling(null, null, $r3$.ΔdefaultStyleSanitizer);
|
||||
$r3$.Δpipe(1, "classPipe");
|
||||
$r3$.Δpipe(2, "stylePipe");
|
||||
$r3$.ΔelementEnd();
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵelementStyling(null, null, $r3$.ɵɵdefaultStyleSanitizer);
|
||||
$r3$.ɵɵpipe(1, "classPipe");
|
||||
$r3$.ɵɵpipe(2, "stylePipe");
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementStylingMap(0, $r3$.ΔpipeBind1(1, 0, $ctx$.myClassExp), $r3$.ΔpipeBind1(2, 2, $ctx$.myStyleExp));
|
||||
$r3$.ΔelementStylingApply(0);
|
||||
$r3$.ɵɵelementStylingMap(0, $r3$.ɵɵpipeBind1(1, 0, $ctx$.myClassExp), $r3$.ɵɵpipeBind1(2, 2, $ctx$.myStyleExp));
|
||||
$r3$.ɵɵelementStylingApply(0);
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -922,23 +922,23 @@ describe('compiler compliance: styling', () => {
|
||||
…
|
||||
template: function MyComponent_Template(rf, $ctx$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementStart(0, "div");
|
||||
$r3$.ΔelementStyling($e0_classBindings$, $e0_styleBindings$, $r3$.ΔdefaultStyleSanitizer);
|
||||
$r3$.Δpipe(1, "pipe");
|
||||
$r3$.Δpipe(2, "pipe");
|
||||
$r3$.Δpipe(3, "pipe");
|
||||
$r3$.Δpipe(4, "pipe");
|
||||
$r3$.Δtext(5);
|
||||
$r3$.ΔelementEnd();
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵelementStyling($e0_classBindings$, $e0_styleBindings$, $r3$.ɵɵdefaultStyleSanitizer);
|
||||
$r3$.ɵɵpipe(1, "pipe");
|
||||
$r3$.ɵɵpipe(2, "pipe");
|
||||
$r3$.ɵɵpipe(3, "pipe");
|
||||
$r3$.ɵɵpipe(4, "pipe");
|
||||
$r3$.ɵɵtext(5);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementStylingMap(0, $e2_styling$, $r3$.ΔpipeBind2(1, 1, $ctx$.myStyleExp, 1000));
|
||||
$r3$.ΔelementStyleProp(0, 0, $r3$.ΔpipeBind2(2, 4, $ctx$.barExp, 3000));
|
||||
$r3$.ΔelementStyleProp(0, 1, $r3$.ΔpipeBind2(3, 7, $ctx$.bazExp, 4000));
|
||||
$r3$.ΔelementClassProp(0, 0, $r3$.ΔpipeBind2(4, 10, $ctx$.fooExp, 2000));
|
||||
$r3$.ΔelementStylingApply(0);
|
||||
$r3$.Δselect(5);
|
||||
$r3$.ΔtextBinding(5, $r3$.Δinterpolation1(" ", $ctx$.item, ""));
|
||||
$r3$.ɵɵelementStylingMap(0, $e2_styling$, $r3$.ɵɵpipeBind2(1, 1, $ctx$.myStyleExp, 1000));
|
||||
$r3$.ɵɵelementStyleProp(0, 0, $r3$.ɵɵpipeBind2(2, 4, $ctx$.barExp, 3000));
|
||||
$r3$.ɵɵelementStyleProp(0, 1, $r3$.ɵɵpipeBind2(3, 7, $ctx$.bazExp, 4000));
|
||||
$r3$.ɵɵelementClassProp(0, 0, $r3$.ɵɵpipeBind2(4, 10, $ctx$.fooExp, 2000));
|
||||
$r3$.ɵɵelementStylingApply(0);
|
||||
$r3$.ɵɵselect(5);
|
||||
$r3$.ɵɵtextBinding(5, $r3$.ɵɵinterpolation1(" ", $ctx$.item, ""));
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -990,14 +990,14 @@ describe('compiler compliance: styling', () => {
|
||||
…
|
||||
hostBindings: function MyComponent_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementHostAttrs($e0_attrs$);
|
||||
$r3$.ΔelementHostStyling($e0_classBindings$, $e0_styleBindings$, $r3$.ΔdefaultStyleSanitizer);
|
||||
$r3$.ɵɵelementHostAttrs($e0_attrs$);
|
||||
$r3$.ɵɵelementHostStyling($e0_classBindings$, $e0_styleBindings$, $r3$.ɵɵdefaultStyleSanitizer);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementHostStylingMap(ctx.myClass, ctx.myStyle);
|
||||
$r3$.ΔelementHostStyleProp(0, ctx.myColorProp);
|
||||
$r3$.ΔelementHostClassProp(0, ctx.myFooClass);
|
||||
$r3$.ΔelementHostStylingApply();
|
||||
$r3$.ɵɵelementHostStylingMap(ctx.myClass, ctx.myStyle);
|
||||
$r3$.ɵɵelementHostStyleProp(0, ctx.myColorProp);
|
||||
$r3$.ɵɵelementHostClassProp(0, ctx.myFooClass);
|
||||
$r3$.ɵɵelementHostStylingApply();
|
||||
}
|
||||
},
|
||||
consts: 0,
|
||||
@ -1051,15 +1051,15 @@ describe('compiler compliance: styling', () => {
|
||||
…
|
||||
hostBindings: function MyComponent_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementHostStyling(_c0, _c1, $r3$.ΔdefaultStyleSanitizer);
|
||||
$r3$.ɵɵelementHostStyling(_c0, _c1, $r3$.ɵɵdefaultStyleSanitizer);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementHostStylingMap(ctx.myClasses, ctx.myStyle);
|
||||
$r3$.ΔelementHostStyleProp(0, ctx.myHeightProp, "pt");
|
||||
$r3$.ΔelementHostStyleProp(1, ctx.myWidthProp);
|
||||
$r3$.ΔelementHostClassProp(0, ctx.myBarClass);
|
||||
$r3$.ΔelementHostClassProp(1, ctx.myFooClass);
|
||||
$r3$.ΔelementHostStylingApply();
|
||||
$r3$.ɵɵelementHostStylingMap(ctx.myClasses, ctx.myStyle);
|
||||
$r3$.ɵɵelementHostStyleProp(0, ctx.myHeightProp, "pt");
|
||||
$r3$.ɵɵelementHostStyleProp(1, ctx.myWidthProp);
|
||||
$r3$.ɵɵelementHostClassProp(0, ctx.myBarClass);
|
||||
$r3$.ɵɵelementHostClassProp(1, ctx.myFooClass);
|
||||
$r3$.ɵɵelementHostStylingApply();
|
||||
}
|
||||
},
|
||||
consts: 0,
|
||||
@ -1113,15 +1113,15 @@ describe('compiler compliance: styling', () => {
|
||||
…
|
||||
function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementStart(0, "div");
|
||||
$r3$.ΔelementStyling(_c2, _c3, $r3$.ΔdefaultStyleSanitizer);
|
||||
$r3$.ΔelementEnd();
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵelementStyling(_c2, _c3, $r3$.ɵɵdefaultStyleSanitizer);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementStylingMap(0, ctx.myClassExp, ctx.myStyleExp);
|
||||
$r3$.ΔelementStyleProp(0, 0, ctx.myHeightExp, null, true);
|
||||
$r3$.ΔelementClassProp(0, 0, ctx.myBarClassExp, true);
|
||||
$r3$.ΔelementStylingApply(0);
|
||||
$r3$.ɵɵelementStylingMap(0, ctx.myClassExp, ctx.myStyleExp);
|
||||
$r3$.ɵɵelementStyleProp(0, 0, ctx.myHeightExp, null, true);
|
||||
$r3$.ɵɵelementClassProp(0, 0, ctx.myBarClassExp, true);
|
||||
$r3$.ɵɵelementStylingApply(0);
|
||||
}
|
||||
},
|
||||
`;
|
||||
@ -1132,13 +1132,13 @@ describe('compiler compliance: styling', () => {
|
||||
…
|
||||
hostBindings: function MyComponent_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementHostStyling(_c0, _c1, $r3$.ΔdefaultStyleSanitizer);
|
||||
$r3$.ɵɵelementHostStyling(_c0, _c1, $r3$.ɵɵdefaultStyleSanitizer);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementHostStylingMap(ctx.myClassExp, ctx.myStyleExp);
|
||||
$r3$.ΔelementHostStyleProp(0, ctx.myWidthExp, null, true);
|
||||
$r3$.ΔelementHostClassProp(0, ctx.myFooClassExp, true);
|
||||
$r3$.ΔelementHostStylingApply();
|
||||
$r3$.ɵɵelementHostStylingMap(ctx.myClassExp, ctx.myStyleExp);
|
||||
$r3$.ɵɵelementHostStyleProp(0, ctx.myWidthExp, null, true);
|
||||
$r3$.ɵɵelementHostClassProp(0, ctx.myFooClassExp, true);
|
||||
$r3$.ɵɵelementHostStylingApply();
|
||||
}
|
||||
},
|
||||
`;
|
||||
@ -1200,33 +1200,33 @@ describe('compiler compliance: styling', () => {
|
||||
…
|
||||
function ClassDirective_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementHostStyling();
|
||||
$r3$.ɵɵelementHostStyling();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementHostStylingMap(ctx.myClassMap);
|
||||
$r3$.ΔelementHostStylingApply();
|
||||
$r3$.ɵɵelementHostStylingMap(ctx.myClassMap);
|
||||
$r3$.ɵɵelementHostStylingApply();
|
||||
}
|
||||
}
|
||||
…
|
||||
function WidthDirective_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementHostStyling($widthDir_classes$, $widthDir_styles$);
|
||||
$r3$.ɵɵelementHostStyling($widthDir_classes$, $widthDir_styles$);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementHostStyleProp(0, ctx.myWidth);
|
||||
$r3$.ΔelementHostClassProp(0, ctx.myFooClass);
|
||||
$r3$.ΔelementHostStylingApply();
|
||||
$r3$.ɵɵelementHostStyleProp(0, ctx.myWidth);
|
||||
$r3$.ɵɵelementHostClassProp(0, ctx.myFooClass);
|
||||
$r3$.ɵɵelementHostStylingApply();
|
||||
}
|
||||
}
|
||||
…
|
||||
function HeightDirective_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔelementHostStyling($heightDir_classes$, $heightDir_styles$);
|
||||
$r3$.ɵɵelementHostStyling($heightDir_classes$, $heightDir_styles$);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementHostStyleProp(0, ctx.myHeight);
|
||||
$r3$.ΔelementHostClassProp(0, ctx.myBarClass);
|
||||
$r3$.ΔelementHostStylingApply();
|
||||
$r3$.ɵɵelementHostStyleProp(0, ctx.myHeight);
|
||||
$r3$.ɵɵelementHostClassProp(0, ctx.myBarClass);
|
||||
$r3$.ɵɵelementHostStylingApply();
|
||||
}
|
||||
}
|
||||
…
|
||||
@ -1280,15 +1280,15 @@ describe('compiler compliance: styling', () => {
|
||||
…
|
||||
hostBindings: function MyComponent_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔallocHostVars(2);
|
||||
$r3$.ΔelementHostAttrs($_c0$);
|
||||
$r3$.ΔelementHostStyling(null, null, $r3$.ΔdefaultStyleSanitizer);
|
||||
$r3$.ɵɵallocHostVars(2);
|
||||
$r3$.ɵɵelementHostAttrs($_c0$);
|
||||
$r3$.ɵɵelementHostStyling(null, null, $r3$.ɵɵdefaultStyleSanitizer);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementProperty(elIndex, "id", $r3$.Δbind(ctx.id), null, true);
|
||||
$r3$.ΔelementProperty(elIndex, "title", $r3$.Δbind(ctx.title), null, true);
|
||||
$r3$.ΔelementHostStylingMap(ctx.myClass, ctx.myStyle);
|
||||
$r3$.ΔelementHostStylingApply();
|
||||
$r3$.ɵɵelementProperty(elIndex, "id", $r3$.ɵɵbind(ctx.id), null, true);
|
||||
$r3$.ɵɵelementProperty(elIndex, "title", $r3$.ɵɵbind(ctx.title), null, true);
|
||||
$r3$.ɵɵelementHostStylingMap(ctx.myClass, ctx.myStyle);
|
||||
$r3$.ɵɵelementHostStylingApply();
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -1327,15 +1327,15 @@ describe('compiler compliance: styling', () => {
|
||||
…
|
||||
hostBindings: function WidthDirective_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
$r3$.ΔallocHostVars(2);
|
||||
$r3$.ΔelementHostStyling($_c0$, $_c1$);
|
||||
$r3$.ɵɵallocHostVars(2);
|
||||
$r3$.ɵɵelementHostStyling($_c0$, $_c1$);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ΔelementProperty(elIndex, "id", $r3$.Δbind(ctx.id), null, true);
|
||||
$r3$.ΔelementProperty(elIndex, "title", $r3$.Δbind(ctx.title), null, true);
|
||||
$r3$.ΔelementHostStyleProp(0, ctx.myWidth);
|
||||
$r3$.ΔelementHostClassProp(0, ctx.myFooClass);
|
||||
$r3$.ΔelementHostStylingApply();
|
||||
$r3$.ɵɵelementProperty(elIndex, "id", $r3$.ɵɵbind(ctx.id), null, true);
|
||||
$r3$.ɵɵelementProperty(elIndex, "title", $r3$.ɵɵbind(ctx.title), null, true);
|
||||
$r3$.ɵɵelementHostStyleProp(0, ctx.myWidth);
|
||||
$r3$.ɵɵelementHostClassProp(0, ctx.myFooClass);
|
||||
$r3$.ɵɵelementHostStylingApply();
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
@ -56,65 +56,65 @@ describe('compiler compliance: template', () => {
|
||||
function MyComponent_ul_0_li_1_div_1_Template(rf, ctx) {
|
||||
|
||||
if (rf & 1) {
|
||||
const $s$ = $i0$.ΔgetCurrentView();
|
||||
$i0$.ΔelementStart(0, "div", $c2$);
|
||||
$i0$.Δlistener("click", function MyComponent_ul_0_li_1_div_1_Template_div_click_0_listener($event){
|
||||
$i0$.ΔrestoreView($s$);
|
||||
const $s$ = $i0$.ɵɵgetCurrentView();
|
||||
$i0$.ɵɵelementStart(0, "div", $c2$);
|
||||
$i0$.ɵɵlistener("click", function MyComponent_ul_0_li_1_div_1_Template_div_click_0_listener($event){
|
||||
$i0$.ɵɵrestoreView($s$);
|
||||
const $inner$ = ctx.$implicit;
|
||||
const $middle$ = $i0$.ΔnextContext().$implicit;
|
||||
const $outer$ = $i0$.ΔnextContext().$implicit;
|
||||
const $myComp$ = $i0$.ΔnextContext();
|
||||
const $middle$ = $i0$.ɵɵnextContext().$implicit;
|
||||
const $outer$ = $i0$.ɵɵnextContext().$implicit;
|
||||
const $myComp$ = $i0$.ɵɵnextContext();
|
||||
return $myComp$.onClick($outer$, $middle$, $inner$);
|
||||
});
|
||||
$i0$.Δtext(1);
|
||||
$i0$.ΔelementEnd();
|
||||
$i0$.ɵɵtext(1);
|
||||
$i0$.ɵɵelementEnd();
|
||||
}
|
||||
|
||||
if (rf & 2) {
|
||||
const $inner1$ = ctx.$implicit;
|
||||
const $middle1$ = $i0$.ΔnextContext().$implicit;
|
||||
const $outer1$ = $i0$.ΔnextContext().$implicit;
|
||||
const $myComp1$ = $i0$.ΔnextContext();
|
||||
$i0$.Δselect(0);
|
||||
$i0$.ΔelementProperty(0, "title", $i0$.Δbind($myComp1$.format($outer1$, $middle1$, $inner1$, $myComp1$.component)));
|
||||
$r3$.Δselect(1);
|
||||
$i0$.ΔtextBinding(1, $i0$.Δinterpolation1(" ", $myComp1$.format($outer1$, $middle1$, $inner1$, $myComp1$.component), " "));
|
||||
const $middle1$ = $i0$.ɵɵnextContext().$implicit;
|
||||
const $outer1$ = $i0$.ɵɵnextContext().$implicit;
|
||||
const $myComp1$ = $i0$.ɵɵnextContext();
|
||||
$i0$.ɵɵselect(0);
|
||||
$i0$.ɵɵelementProperty(0, "title", $i0$.ɵɵbind($myComp1$.format($outer1$, $middle1$, $inner1$, $myComp1$.component)));
|
||||
$r3$.ɵɵselect(1);
|
||||
$i0$.ɵɵtextBinding(1, $i0$.ɵɵinterpolation1(" ", $myComp1$.format($outer1$, $middle1$, $inner1$, $myComp1$.component), " "));
|
||||
}
|
||||
}
|
||||
|
||||
function MyComponent_ul_0_li_1_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.ΔelementStart(0, "li");
|
||||
$i0$.Δtemplate(1, MyComponent_ul_0_li_1_div_1_Template, 2, 2, "div", $c1$);
|
||||
$i0$.ΔelementEnd();
|
||||
$i0$.ɵɵelementStart(0, "li");
|
||||
$i0$.ɵɵtemplate(1, MyComponent_ul_0_li_1_div_1_Template, 2, 2, "div", $c1$);
|
||||
$i0$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $myComp2$ = $i0$.ΔnextContext(2);
|
||||
$r3$.Δselect(1);
|
||||
$i0$.ΔelementProperty(1, "ngForOf", $i0$.Δbind($myComp2$.items));
|
||||
const $myComp2$ = $i0$.ɵɵnextContext(2);
|
||||
$r3$.ɵɵselect(1);
|
||||
$i0$.ɵɵelementProperty(1, "ngForOf", $i0$.ɵɵbind($myComp2$.items));
|
||||
}
|
||||
}
|
||||
|
||||
function MyComponent_ul_0_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.ΔelementStart(0, "ul");
|
||||
$i0$.Δtemplate(1, MyComponent_ul_0_li_1_Template, 2, 1, "li", $c0$);
|
||||
$i0$.ΔelementEnd();
|
||||
$i0$.ɵɵelementStart(0, "ul");
|
||||
$i0$.ɵɵtemplate(1, MyComponent_ul_0_li_1_Template, 2, 1, "li", $c0$);
|
||||
$i0$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $outer2$ = ctx.$implicit;
|
||||
$r3$.Δselect(1);
|
||||
$i0$.ΔelementProperty(1, "ngForOf", $i0$.Δbind($outer2$.items));
|
||||
$r3$.ɵɵselect(1);
|
||||
$i0$.ɵɵelementProperty(1, "ngForOf", $i0$.ɵɵbind($outer2$.items));
|
||||
}
|
||||
}
|
||||
// ...
|
||||
template:function MyComponent_Template(rf, ctx){
|
||||
if (rf & 1) {
|
||||
$i0$.Δtemplate(0, MyComponent_ul_0_Template, 2, 1, "ul", $c0$);
|
||||
$i0$.ɵɵtemplate(0, MyComponent_ul_0_Template, 2, 1, "ul", $c0$);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$i0$.Δselect(0);
|
||||
$i0$.ΔelementProperty(0, "ngForOf", $i0$.Δbind(ctx.items));
|
||||
$i0$.ɵɵselect(0);
|
||||
$i0$.ɵɵelementProperty(0, "ngForOf", $i0$.ɵɵbind(ctx.items));
|
||||
}
|
||||
}`;
|
||||
|
||||
@ -152,26 +152,26 @@ describe('compiler compliance: template', () => {
|
||||
|
||||
function MyComponent_div_0_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
const $s$ = $r3$.ΔgetCurrentView();
|
||||
$r3$.ΔelementStart(0, "div", $e_attrs$);
|
||||
$r3$.Δlistener("click", function MyComponent_div_0_Template_div_click_0_listener($event) {
|
||||
$r3$.ΔrestoreView($s$);
|
||||
const $s$ = $r3$.ɵɵgetCurrentView();
|
||||
$r3$.ɵɵelementStart(0, "div", $e_attrs$);
|
||||
$r3$.ɵɵlistener("click", function MyComponent_div_0_Template_div_click_0_listener($event) {
|
||||
$r3$.ɵɵrestoreView($s$);
|
||||
const $d$ = ctx.$implicit;
|
||||
const $i$ = ctx.index;
|
||||
const $comp$ = $r3$.ΔnextContext();
|
||||
const $comp$ = $r3$.ɵɵnextContext();
|
||||
return $comp$._handleClick($d$, $i$);
|
||||
});
|
||||
$r3$.ΔelementEnd();
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
}
|
||||
// ...
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.Δtemplate(0, MyComponent_div_0_Template, 1, 0, "div", $t0_attrs$);
|
||||
$r3$.ɵɵtemplate(0, MyComponent_div_0_Template, 1, 0, "div", $t0_attrs$);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.Δselect(0);
|
||||
$r3$.ΔelementProperty(0, "ngForOf", $r3$.Δbind(ctx._data));
|
||||
$r3$.ɵɵselect(0);
|
||||
$r3$.ɵɵelementProperty(0, "ngForOf", $r3$.ɵɵbind(ctx._data));
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -207,25 +207,25 @@ describe('compiler compliance: template', () => {
|
||||
|
||||
function MyComponent_span_0_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.ΔelementStart(0, "span");
|
||||
$i0$.Δtext(1);
|
||||
$i0$.ΔelementEnd();
|
||||
$i0$.ɵɵelementStart(0, "span");
|
||||
$i0$.ɵɵtext(1);
|
||||
$i0$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $item$ = ctx.$implicit;
|
||||
const $i$ = ctx.index;
|
||||
$r3$.Δselect(1);
|
||||
$i0$.ΔtextBinding(1, $i0$.Δinterpolation2(" ", $i$, " - ", $item$, " "));
|
||||
$r3$.ɵɵselect(1);
|
||||
$i0$.ɵɵtextBinding(1, $i0$.ɵɵinterpolation2(" ", $i$, " - ", $item$, " "));
|
||||
}
|
||||
}
|
||||
// ...
|
||||
template:function MyComponent_Template(rf, ctx){
|
||||
if (rf & 1) {
|
||||
$i0$.Δtemplate(0, MyComponent_span_0_Template, 2, 2, "span", _c0);
|
||||
$i0$.ɵɵtemplate(0, MyComponent_span_0_Template, 2, 2, "span", _c0);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$i0$.Δselect(0);
|
||||
$i0$.ΔelementProperty(0, "ngForOf", $i0$.Δbind(ctx.items));
|
||||
$i0$.ɵɵselect(0);
|
||||
$i0$.ɵɵelementProperty(0, "ngForOf", $i0$.ɵɵbind(ctx.items));
|
||||
}
|
||||
}`;
|
||||
|
||||
@ -263,40 +263,40 @@ describe('compiler compliance: template', () => {
|
||||
|
||||
function MyComponent_div_0_span_1_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.ΔelementStart(0, "span");
|
||||
$i0$.Δtext(1);
|
||||
$i0$.ΔelementEnd();
|
||||
$i0$.ɵɵelementStart(0, "span");
|
||||
$i0$.ɵɵtext(1);
|
||||
$i0$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $div$ = $i0$.ΔnextContext();
|
||||
const $div$ = $i0$.ɵɵnextContext();
|
||||
const $i$ = $div$.index;
|
||||
const $item$ = $div$.$implicit;
|
||||
$r3$.Δselect(1);
|
||||
$i0$.ΔtextBinding(1, $i0$.Δinterpolation2(" ", $i$, " - ", $item$, " "));
|
||||
$r3$.ɵɵselect(1);
|
||||
$i0$.ɵɵtextBinding(1, $i0$.ɵɵinterpolation2(" ", $i$, " - ", $item$, " "));
|
||||
}
|
||||
}
|
||||
|
||||
function MyComponent_div_0_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.ΔelementStart(0, "div");
|
||||
$i0$.Δtemplate(1, MyComponent_div_0_span_1_Template, 2, 2, "span", $c1$);
|
||||
$i0$.ΔelementEnd();
|
||||
$i0$.ɵɵelementStart(0, "div");
|
||||
$i0$.ɵɵtemplate(1, MyComponent_div_0_span_1_Template, 2, 2, "span", $c1$);
|
||||
$i0$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $app$ = $i0$.ΔnextContext();
|
||||
$r3$.Δselect(1);
|
||||
$i0$.ΔelementProperty(1, "ngIf", $i0$.Δbind($app$.showing));
|
||||
const $app$ = $i0$.ɵɵnextContext();
|
||||
$r3$.ɵɵselect(1);
|
||||
$i0$.ɵɵelementProperty(1, "ngIf", $i0$.ɵɵbind($app$.showing));
|
||||
}
|
||||
}
|
||||
|
||||
// ...
|
||||
template:function MyComponent_Template(rf, ctx){
|
||||
if (rf & 1) {
|
||||
$i0$.Δtemplate(0, MyComponent_div_0_Template, 2, 1, "div", $c0$);
|
||||
$i0$.ɵɵtemplate(0, MyComponent_div_0_Template, 2, 1, "div", $c0$);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$i0$.Δselect(0);
|
||||
$i0$.ΔelementProperty(0, "ngForOf", $i0$.Δbind(ctx.items));
|
||||
$i0$.ɵɵselect(0);
|
||||
$i0$.ɵɵelementProperty(0, "ngForOf", $i0$.ɵɵbind(ctx.items));
|
||||
}
|
||||
}`;
|
||||
|
||||
@ -335,51 +335,51 @@ describe('compiler compliance: template', () => {
|
||||
const $c0$ = [${AttributeMarker.Template}, "ngFor", "ngForOf"];
|
||||
function MyComponent_div_0_div_1_div_1_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.ΔelementStart(0, "div");
|
||||
$i0$.Δtext(1);
|
||||
$i0$.ΔelementEnd();
|
||||
$i0$.ɵɵelementStart(0, "div");
|
||||
$i0$.ɵɵtext(1);
|
||||
$i0$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $middle$ = $i0$.ΔnextContext().$implicit;
|
||||
const $myComp$ = $i0$.ΔnextContext(2);
|
||||
$r3$.Δselect(1);
|
||||
$i0$.ΔtextBinding(1, $i0$.Δinterpolation2(" ", $middle$.value, " - ", $myComp$.name, " "));
|
||||
const $middle$ = $i0$.ɵɵnextContext().$implicit;
|
||||
const $myComp$ = $i0$.ɵɵnextContext(2);
|
||||
$r3$.ɵɵselect(1);
|
||||
$i0$.ɵɵtextBinding(1, $i0$.ɵɵinterpolation2(" ", $middle$.value, " - ", $myComp$.name, " "));
|
||||
}
|
||||
}
|
||||
|
||||
function MyComponent_div_0_div_1_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.ΔelementStart(0, "div");
|
||||
$i0$.Δtemplate(1, MyComponent_div_0_div_1_div_1_Template, 2, 2, "div", $c0$);
|
||||
$i0$.ΔelementEnd();
|
||||
$i0$.ɵɵelementStart(0, "div");
|
||||
$i0$.ɵɵtemplate(1, MyComponent_div_0_div_1_div_1_Template, 2, 2, "div", $c0$);
|
||||
$i0$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $middle$ = ctx.$implicit;
|
||||
$r3$.Δselect(1);
|
||||
$i0$.ΔelementProperty(1, "ngForOf", $i0$.Δbind($middle$.items));
|
||||
$r3$.ɵɵselect(1);
|
||||
$i0$.ɵɵelementProperty(1, "ngForOf", $i0$.ɵɵbind($middle$.items));
|
||||
}
|
||||
}
|
||||
|
||||
function MyComponent_div_0_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.ΔelementStart(0, "div");
|
||||
$i0$.Δtemplate(1, MyComponent_div_0_div_1_Template, 2, 1, "div", $c0$);
|
||||
$i0$.ΔelementEnd();
|
||||
$i0$.ɵɵelementStart(0, "div");
|
||||
$i0$.ɵɵtemplate(1, MyComponent_div_0_div_1_Template, 2, 1, "div", $c0$);
|
||||
$i0$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $outer$ = ctx.$implicit;
|
||||
$r3$.Δselect(1);
|
||||
$i0$.ΔelementProperty(1, "ngForOf", $i0$.Δbind($outer$.items));
|
||||
$r3$.ɵɵselect(1);
|
||||
$i0$.ɵɵelementProperty(1, "ngForOf", $i0$.ɵɵbind($outer$.items));
|
||||
}
|
||||
}
|
||||
// ...
|
||||
template:function MyComponent_Template(rf, ctx){
|
||||
if (rf & 1) {
|
||||
$i0$.Δtemplate(0, MyComponent_div_0_Template, 2, 1, "div", $c0$);
|
||||
$i0$.ɵɵtemplate(0, MyComponent_div_0_Template, 2, 1, "div", $c0$);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$i0$.Δselect(0);
|
||||
$i0$.ΔelementProperty(0, "ngForOf", $i0$.Δbind(ctx.items));
|
||||
$i0$.ɵɵselect(0);
|
||||
$i0$.ɵɵelementProperty(0, "ngForOf", $i0$.ɵɵbind(ctx.items));
|
||||
}
|
||||
}`;
|
||||
|
||||
@ -414,7 +414,7 @@ describe('compiler compliance: template', () => {
|
||||
|
||||
function MyComponent_ng_template_0_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.Δtext(0, " some-content ");
|
||||
$i0$.ɵɵtext(0, " some-content ");
|
||||
}
|
||||
}
|
||||
|
||||
@ -422,11 +422,11 @@ describe('compiler compliance: template', () => {
|
||||
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.Δtemplate(0, MyComponent_ng_template_0_Template, 1, 0, "ng-template", $c0$);
|
||||
$i0$.ɵɵtemplate(0, MyComponent_ng_template_0_Template, 1, 0, "ng-template", $c0$);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$i0$.Δselect(0);
|
||||
$i0$.ΔelementProperty(0, "boundAttr", $i0$.Δbind(ctx.b));
|
||||
$i0$.ɵɵselect(0);
|
||||
$i0$.ɵɵelementProperty(0, "boundAttr", $i0$.ɵɵbind(ctx.b));
|
||||
}
|
||||
}`;
|
||||
|
||||
@ -459,7 +459,7 @@ describe('compiler compliance: template', () => {
|
||||
|
||||
function MyComponent_ng_template_0_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.Δtext(0, "some-content");
|
||||
$i0$.ɵɵtext(0, "some-content");
|
||||
}
|
||||
}
|
||||
|
||||
@ -467,7 +467,7 @@ describe('compiler compliance: template', () => {
|
||||
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.Δtemplate(0, MyComponent_ng_template_0_Template, 1, 0, "ng-template", null, $t0_refs$, $i0$.ΔtemplateRefExtractor);
|
||||
$i0$.ɵɵtemplate(0, MyComponent_ng_template_0_Template, 1, 0, "ng-template", null, $t0_refs$, $i0$.ɵɵtemplateRefExtractor);
|
||||
}
|
||||
}`;
|
||||
|
||||
@ -504,8 +504,8 @@ describe('compiler compliance: template', () => {
|
||||
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.Δtemplate(0, MyComponent_ng_template_0_Template, 0, 0, "ng-template", $t0_attrs$);
|
||||
$i0$.Δlistener("outDirective", function MyComponent_Template_ng_template_outDirective_0_listener($event) { return $event.doSth(); });
|
||||
$i0$.ɵɵtemplate(0, MyComponent_ng_template_0_Template, 0, 0, "ng-template", $t0_attrs$);
|
||||
$i0$.ɵɵlistener("outDirective", function MyComponent_Template_ng_template_outDirective_0_listener($event) { return $event.doSth(); });
|
||||
}
|
||||
}`;
|
||||
|
||||
@ -657,7 +657,7 @@ describe('compiler compliance: template', () => {
|
||||
|
||||
function MyComponent_div_0_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.Δelement(0, "div");
|
||||
$i0$.ɵɵelement(0, "div");
|
||||
}
|
||||
}
|
||||
|
||||
@ -665,11 +665,11 @@ describe('compiler compliance: template', () => {
|
||||
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.Δtemplate(0, MyComponent_div_0_Template, 1, 0, "div", $c0$);
|
||||
$i0$.Δpipe(1, "pipe");
|
||||
$i0$.ɵɵtemplate(0, MyComponent_div_0_Template, 1, 0, "div", $c0$);
|
||||
$i0$.ɵɵpipe(1, "pipe");
|
||||
} if (rf & 2) {
|
||||
$i0$.Δselect(0);
|
||||
$i0$.ΔelementProperty(0, "ngIf", $i0$.Δbind($i0$.ΔpipeBind1(1, 1, ctx.val)));
|
||||
$i0$.ɵɵselect(0);
|
||||
$i0$.ɵɵelementProperty(0, "ngIf", $i0$.ɵɵbind($i0$.ɵɵpipeBind1(1, 1, ctx.val)));
|
||||
}
|
||||
}`;
|
||||
|
||||
|
Reference in New Issue
Block a user