diff --git a/aio/tools/transforms/angular-api-package/index.js b/aio/tools/transforms/angular-api-package/index.js index edfd6b115a..be7d75cc8a 100644 --- a/aio/tools/transforms/angular-api-package/index.js +++ b/aio/tools/transforms/angular-api-package/index.js @@ -74,7 +74,7 @@ module.exports = new Package('angular-api', [basePackage, typeScriptPackage]) // API files are typescript readTypeScriptModules.basePath = API_SOURCE_PATH; - readTypeScriptModules.ignoreExportsMatching = [/^[_Δ]|^VERSION$/]; + readTypeScriptModules.ignoreExportsMatching = [/^_|^ɵɵ|^VERSION$/]; readTypeScriptModules.hidePrivateMembers = true; // NOTE: This list should be in sync with tools/public_api_guard/BUILD.bazel diff --git a/docs/PUBLIC_API.md b/docs/PUBLIC_API.md index cb1e2e94a2..53899d5770 100644 --- a/docs/PUBLIC_API.md +++ b/docs/PUBLIC_API.md @@ -37,7 +37,7 @@ We explicitly don't consider the following to be our public API surface: - any file/import paths within our package except for the `/`, `/testing` and `/bundles/*` and other documented package entry-points. - constructors of injectable classes (services and directives) - please use DI to obtain instances of these classes -- any class members or symbols marked as `private`, or prefixed with underscore (`_`), [barred latin o](https://en.wikipedia.org/wiki/%C6%9F) (`ɵ`), and [greek delta](https://en.wikipedia.org/wiki/Delta_(letter)) (`Δ`). +- any class members or symbols marked as `private`, or prefixed with underscore (`_`), [barred latin o](https://en.wikipedia.org/wiki/%C6%9F) (`ɵ`), and [double barred latin o](https://en.wikipedia.org/wiki/%C6%9F) (`ɵɵ`). - extending any of our classes unless the support for this is specifically documented in the API docs - the contents and API surface of the code generated by Angular's compiler (with one notable exception: the existence and name of `NgModuleFactory` instances exported from generated code is guaranteed) diff --git a/integration/ngcc/test.sh b/integration/ngcc/test.sh index 865d9eb175..9cfbc7c4d7 100755 --- a/integration/ngcc/test.sh +++ b/integration/ngcc/test.sh @@ -40,25 +40,25 @@ if [[ $? != 0 ]]; then exit 1; fi if [[ $? != 0 ]]; then exit 1; fi # Did it compile @angular/core/ApplicationModule correctly? - grep "ApplicationModule.ngModuleDef = ΔdefineNgModule" node_modules/@angular/core/fesm2015/core.js + grep "ApplicationModule.ngModuleDef = ɵɵdefineNgModule" node_modules/@angular/core/fesm2015/core.js if [[ $? != 0 ]]; then exit 1; fi - grep "ApplicationModule.ngModuleDef = ΔdefineNgModule" node_modules/@angular/core/fesm5/core.js + grep "ApplicationModule.ngModuleDef = ɵɵdefineNgModule" node_modules/@angular/core/fesm5/core.js if [[ $? != 0 ]]; then exit 1; fi - grep "ApplicationModule.ngModuleDef = ɵngcc0.ΔdefineNgModule" node_modules/@angular/core/esm2015/src/application_module.js + grep "ApplicationModule.ngModuleDef = ɵngcc0.ɵɵdefineNgModule" node_modules/@angular/core/esm2015/src/application_module.js if [[ $? != 0 ]]; then exit 1; fi - grep "ApplicationModule.ngModuleDef = ɵngcc0.ΔdefineNgModule" node_modules/@angular/core/esm5/src/application_module.js + grep "ApplicationModule.ngModuleDef = ɵngcc0.ɵɵdefineNgModule" node_modules/@angular/core/esm5/src/application_module.js if [[ $? != 0 ]]; then exit 1; fi # Did it transform @angular/core typing files correctly? grep "import [*] as ɵngcc0 from './src/r3_symbols';" node_modules/@angular/core/core.d.ts if [[ $? != 0 ]]; then exit 1; fi - grep "static ngInjectorDef: ɵngcc0.ΔInjectorDef;" node_modules/@angular/core/core.d.ts + grep "static ngInjectorDef: ɵngcc0.ɵɵInjectorDef;" node_modules/@angular/core/core.d.ts if [[ $? != 0 ]]; then exit 1; fi # Did it generate a base factory call for synthesized constructors correctly? - grep "const ɵMatTable_BaseFactory = ɵngcc0.ΔgetInheritedFactory(MatTable);" node_modules/@angular/material/esm2015/table.js + grep "const ɵMatTable_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(MatTable);" node_modules/@angular/material/esm2015/table.js if [[ $? != 0 ]]; then exit 1; fi - grep "const ɵMatTable_BaseFactory = ɵngcc0.ΔgetInheritedFactory(MatTable);" node_modules/@angular/material/esm5/table.es5.js + grep "const ɵMatTable_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(MatTable);" node_modules/@angular/material/esm5/table.es5.js if [[ $? != 0 ]]; then exit 1; fi # Can it be safely run again (as a noop)? diff --git a/modules/benchmarks/src/tree/render3_function/index.ts b/modules/benchmarks/src/tree/render3_function/index.ts index 8b07298caa..8f221cbc29 100644 --- a/modules/benchmarks/src/tree/render3_function/index.ts +++ b/modules/benchmarks/src/tree/render3_function/index.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {ɵRenderFlags, ɵrenderComponent as renderComponent, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, ΔdefineComponent, ΔelementEnd, ΔelementStart, ΔelementStyleProp, ΔelementStyling, ΔembeddedViewEnd, ΔembeddedViewStart, Δinterpolation1, Δtext, ΔtextBinding} from '@angular/core'; +import {ɵRenderFlags, ɵrenderComponent as renderComponent, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵdefineComponent, ɵɵelementEnd, ɵɵelementStart, ɵɵelementStyleProp, ɵɵelementStyling, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵinterpolation1, ɵɵtext, ɵɵtextBinding} from '@angular/core'; import {bindAction, profile} from '../../util'; import {createDom, destroyDom, detectChanges} from '../render3/tree'; @@ -18,7 +18,7 @@ export class TreeFunction { data: TreeNode = emptyTree; /** @nocollapse */ - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: TreeFunction, selectors: [['tree']], consts: 5, @@ -35,38 +35,38 @@ export class TreeFunction { const c1 = ['background-color']; export function TreeTpl(rf: ɵRenderFlags, ctx: TreeNode) { if (rf & ɵRenderFlags.Create) { - ΔelementStart(0, 'tree'); + ɵɵelementStart(0, 'tree'); { - ΔelementStart(1, 'span'); - ΔelementStyling(null, c1); - { Δtext(2); } - ΔelementEnd(); - Δcontainer(3); - Δcontainer(4); + ɵɵelementStart(1, 'span'); + ɵɵelementStyling(null, c1); + { ɵɵtext(2); } + ɵɵelementEnd(); + ɵɵcontainer(3); + ɵɵcontainer(4); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & ɵRenderFlags.Update) { - ΔelementStyleProp(1, 0, ctx.depth % 2 ? '' : 'grey'); - ΔtextBinding(2, Δinterpolation1(' ', ctx.value, ' ')); - ΔcontainerRefreshStart(3); + ɵɵelementStyleProp(1, 0, ctx.depth % 2 ? '' : 'grey'); + ɵɵtextBinding(2, ɵɵinterpolation1(' ', ctx.value, ' ')); + ɵɵcontainerRefreshStart(3); { if (ctx.left != null) { - let rf0 = ΔembeddedViewStart(0, 5, 1); + let rf0 = ɵɵembeddedViewStart(0, 5, 1); { TreeTpl(rf0, ctx.left); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); - ΔcontainerRefreshStart(4); + ɵɵcontainerRefreshEnd(); + ɵɵcontainerRefreshStart(4); { if (ctx.right != null) { - let rf0 = ΔembeddedViewStart(0, 5, 1); + let rf0 = ɵɵembeddedViewStart(0, 5, 1); { TreeTpl(rf0, ctx.right); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } diff --git a/packages/common/src/directives/ng_class.ts b/packages/common/src/directives/ng_class.ts index 8aa2ec5c61..d835d497dd 100644 --- a/packages/common/src/directives/ng_class.ts +++ b/packages/common/src/directives/ng_class.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import {Directive, DoCheck, Input, ɵRenderFlags, ΔdefineDirective, ΔelementHostStyling, ΔelementHostStylingApply, ΔelementHostStylingMap} from '@angular/core'; +import {Directive, DoCheck, Input, ɵRenderFlags, ɵɵdefineDirective, ɵɵelementHostStyling, ɵɵelementHostStylingApply, ɵɵelementHostStylingMap} from '@angular/core'; import {NgClassImpl, NgClassImplProvider} from './ng_class_impl'; @@ -29,17 +29,17 @@ export const ngClassDirectiveDef__PRE_R3__ = undefined; // used when the VE is not present (note the directive will // never be instantiated normally because it is apart of a // base class) -export const ngClassDirectiveDef__POST_R3__ = ΔdefineDirective({ +export const ngClassDirectiveDef__POST_R3__ = ɵɵdefineDirective({ type: function() {} as any, selectors: null as any, factory: () => {}, hostBindings: function(rf: ɵRenderFlags, ctx: any, elIndex: number) { if (rf & ɵRenderFlags.Create) { - ΔelementHostStyling(); + ɵɵelementHostStyling(); } if (rf & ɵRenderFlags.Update) { - ΔelementHostStylingMap(ctx.getValue()); - ΔelementHostStylingApply(); + ɵɵelementHostStylingMap(ctx.getValue()); + ɵɵelementHostStylingApply(); } } }); diff --git a/packages/common/src/directives/ng_style.ts b/packages/common/src/directives/ng_style.ts index afbbc9d0e2..5565472d91 100644 --- a/packages/common/src/directives/ng_style.ts +++ b/packages/common/src/directives/ng_style.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import {Directive, DoCheck, Input, ɵRenderFlags, ΔdefineDirective, ΔelementHostStyling, ΔelementHostStylingApply, ΔelementHostStylingMap} from '@angular/core'; +import {Directive, DoCheck, Input, ɵRenderFlags, ɵɵdefineDirective, ɵɵelementHostStyling, ɵɵelementHostStylingApply, ɵɵelementHostStylingMap} from '@angular/core'; import {NgStyleImpl, NgStyleImplProvider} from './ng_style_impl'; @@ -29,17 +29,17 @@ export const ngStyleDirectiveDef__PRE_R3__ = undefined; // used when the VE is not present (note the directive will // never be instantiated normally because it is apart of a // base class) -export const ngStyleDirectiveDef__POST_R3__ = ΔdefineDirective({ +export const ngStyleDirectiveDef__POST_R3__ = ɵɵdefineDirective({ type: function() {} as any, selectors: null as any, factory: () => {}, hostBindings: function(rf: ɵRenderFlags, ctx: any, elIndex: number) { if (rf & ɵRenderFlags.Create) { - ΔelementHostStyling(); + ɵɵelementHostStyling(); } if (rf & ɵRenderFlags.Update) { - ΔelementHostStylingMap(null, ctx.getValue()); - ΔelementHostStylingApply(); + ɵɵelementHostStylingMap(null, ctx.getValue()); + ɵɵelementHostStylingApply(); } } }); diff --git a/packages/common/src/viewport_scroller.ts b/packages/common/src/viewport_scroller.ts index 2ee49bee34..fad2a4e3af 100644 --- a/packages/common/src/viewport_scroller.ts +++ b/packages/common/src/viewport_scroller.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {ErrorHandler, ΔdefineInjectable, Δinject} from '@angular/core'; +import {ErrorHandler, ɵɵdefineInjectable, ɵɵinject} from '@angular/core'; import {DOCUMENT} from './dom_tokens'; @@ -21,9 +21,9 @@ export abstract class ViewportScroller { // De-sugared tree-shakable injection // See #23917 /** @nocollapse */ - static ngInjectableDef = ΔdefineInjectable({ + static ngInjectableDef = ɵɵdefineInjectable({ providedIn: 'root', - factory: () => new BrowserViewportScroller(Δinject(DOCUMENT), window, Δinject(ErrorHandler)) + factory: () => new BrowserViewportScroller(ɵɵinject(DOCUMENT), window, ɵɵinject(ErrorHandler)) }); /** diff --git a/packages/compiler-cli/ngcc/test/rendering/renderer_spec.ts b/packages/compiler-cli/ngcc/test/rendering/renderer_spec.ts index e54c38cd1a..177b342c86 100644 --- a/packages/compiler-cli/ngcc/test/rendering/renderer_spec.ts +++ b/packages/compiler-cli/ngcc/test/rendering/renderer_spec.ts @@ -152,11 +152,11 @@ describe('Renderer', () => { const addDefinitionsSpy = renderer.addDefinitions as jasmine.Spy; expect(addDefinitionsSpy.calls.first().args[2]) .toEqual( - `A.ngComponentDef = ɵngcc0.ΔdefineComponent({ type: A, selectors: [["a"]], factory: function A_Factory(t) { return new (t || A)(); }, consts: 1, vars: 1, template: function A_Template(rf, ctx) { if (rf & 1) { - ɵngcc0.Δtext(0); + `A.ngComponentDef = ɵngcc0.ɵɵdefineComponent({ type: A, selectors: [["a"]], factory: function A_Factory(t) { return new (t || A)(); }, consts: 1, vars: 1, template: function A_Template(rf, ctx) { if (rf & 1) { + ɵngcc0.ɵɵtext(0); } if (rf & 2) { - ɵngcc0.Δselect(0); - ɵngcc0.ΔtextBinding(0, ɵngcc0.Δinterpolation1("", ctx.person.name, "")); + ɵngcc0.ɵɵselect(0); + ɵngcc0.ɵɵtextBinding(0, ɵngcc0.ɵɵinterpolation1("", ctx.person.name, "")); } }, encapsulation: 2 }); /*@__PURE__*/ ɵngcc0.ɵsetClassMetadata(A, [{ type: Component, @@ -197,7 +197,7 @@ describe('Renderer', () => { })); expect(addDefinitionsSpy.calls.first().args[2]) .toEqual( - `A.ngDirectiveDef = ɵngcc0.ΔdefineDirective({ type: A, selectors: [["", "a", ""]], factory: function A_Factory(t) { return new (t || A)(); } }); + `A.ngDirectiveDef = ɵngcc0.ɵɵdefineDirective({ type: A, selectors: [["", "a", ""]], factory: function A_Factory(t) { return new (t || A)(); } }); /*@__PURE__*/ ɵngcc0.ɵsetClassMetadata(A, [{ type: Directive, args: [{ selector: '[a]' }] @@ -331,7 +331,7 @@ describe('Renderer', () => { const typingsFile = result.find(f => f.path === '/typings/file.d.ts') !; expect(typingsFile.contents) .toContain( - 'foo(x: number): number;\n static ngDirectiveDef: ɵngcc0.ΔDirectiveDefWithMeta'); + 'foo(x: number): number;\n static ngDirectiveDef: ɵngcc0.ɵɵDirectiveDefWithMeta'); }); it('should render imports into typings files', () => { diff --git a/packages/compiler-cli/src/metadata/bundler.ts b/packages/compiler-cli/src/metadata/bundler.ts index cae740edb6..50be5c11e1 100644 --- a/packages/compiler-cli/src/metadata/bundler.ts +++ b/packages/compiler-cli/src/metadata/bundler.ts @@ -423,7 +423,7 @@ export class MetadataBundler { result[key] = this.convertFunction(moduleName, value); } else if (isMetadataSymbolicCallExpression(value)) { // Class members can also contain static members that call a function with module - // references. e.g. "static ngInjectableDef = ΔdefineInjectable(..)". We also need to + // references. e.g. "static ngInjectableDef = ɵɵdefineInjectable(..)". We also need to // convert these module references because otherwise these resolve to non-existent files. result[key] = this.convertValue(moduleName, value); } else { diff --git a/packages/compiler-cli/src/ngtsc/imports/src/core.ts b/packages/compiler-cli/src/ngtsc/imports/src/core.ts index da60c29482..457a327347 100644 --- a/packages/compiler-cli/src/ngtsc/imports/src/core.ts +++ b/packages/compiler-cli/src/ngtsc/imports/src/core.ts @@ -48,15 +48,15 @@ export class NoopImportRewriter implements ImportRewriter { * which they're exported from r3_symbols. */ const CORE_SUPPORTED_SYMBOLS = new Map([ - ['ΔdefineInjectable', 'ΔdefineInjectable'], - ['ΔdefineInjector', 'ΔdefineInjector'], - ['ΔdefineNgModule', 'ΔdefineNgModule'], - ['ΔsetNgModuleScope', 'ΔsetNgModuleScope'], - ['Δinject', 'Δinject'], + ['ɵɵdefineInjectable', 'ɵɵdefineInjectable'], + ['ɵɵdefineInjector', 'ɵɵdefineInjector'], + ['ɵɵdefineNgModule', 'ɵɵdefineNgModule'], + ['ɵɵsetNgModuleScope', 'ɵɵsetNgModuleScope'], + ['ɵɵinject', 'ɵɵinject'], ['ɵsetClassMetadata', 'setClassMetadata'], - ['ΔInjectableDef', 'ΔInjectableDef'], - ['ΔInjectorDef', 'ΔInjectorDef'], - ['ΔNgModuleDefWithMeta', 'ΔNgModuleDefWithMeta'], + ['ɵɵInjectableDef', 'ɵɵInjectableDef'], + ['ɵɵInjectorDef', 'ɵɵInjectorDef'], + ['ɵɵNgModuleDefWithMeta', 'ɵɵNgModuleDefWithMeta'], ['ɵNgModuleFactory', 'NgModuleFactory'], ]); diff --git a/packages/compiler-cli/test/compliance/mock_compiler_spec.ts b/packages/compiler-cli/test/compliance/mock_compiler_spec.ts index 2d6d2cdcbb..94d69b2780 100644 --- a/packages/compiler-cli/test/compliance/mock_compiler_spec.ts +++ b/packages/compiler-cli/test/compliance/mock_compiler_spec.ts @@ -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'); diff --git a/packages/compiler-cli/test/compliance/r3_compiler_compliance_spec.ts b/packages/compiler-cli/test/compliance/r3_compiler_compliance_spec.ts index f0bdbbd077..845569198b 100644 --- a/packages/compiler-cli/test/compliance/r3_compiler_compliance_spec.ts +++ b/packages/compiler-cli/test/compliance/r3_compiler_compliance_spec.ts @@ -53,16 +53,16 @@ describe('compiler compliance', () => { … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div", $c1$); - $r3$.ΔnamespaceSVG(); - $r3$.ΔelementStart(1, "svg"); - $r3$.Δelement(2, "circle", $c2$); - $r3$.ΔelementEnd(); - $r3$.ΔnamespaceHTML(); - $r3$.ΔelementStart(3, "p"); - $r3$.Δtext(4, "test"); - $r3$.ΔelementEnd(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div", $c1$); + $r3$.ɵɵnamespaceSVG(); + $r3$.ɵɵelementStart(1, "svg"); + $r3$.ɵɵelement(2, "circle", $c2$); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵnamespaceHTML(); + $r3$.ɵɵelementStart(3, "p"); + $r3$.ɵɵtext(4, "test"); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementEnd(); } } `; @@ -102,16 +102,16 @@ describe('compiler compliance', () => { … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div", $c1$); - $r3$.ΔnamespaceMathML(); - $r3$.ΔelementStart(1, "math"); - $r3$.Δelement(2, "infinity"); - $r3$.ΔelementEnd(); - $r3$.ΔnamespaceHTML(); - $r3$.ΔelementStart(3, "p"); - $r3$.Δtext(4, "test"); - $r3$.ΔelementEnd(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div", $c1$); + $r3$.ɵɵnamespaceMathML(); + $r3$.ɵɵelementStart(1, "math"); + $r3$.ɵɵelement(2, "infinity"); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵnamespaceHTML(); + $r3$.ɵɵelementStart(3, "p"); + $r3$.ɵɵtext(4, "test"); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementEnd(); } } `; @@ -150,13 +150,13 @@ describe('compiler compliance', () => { … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div", $c1$); - $r3$.Δtext(1, "Hello "); - $r3$.ΔelementStart(2, "b"); - $r3$.Δtext(3, "World"); - $r3$.ΔelementEnd(); - $r3$.Δtext(4, "!"); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div", $c1$); + $r3$.ɵɵtext(1, "Hello "); + $r3$.ɵɵelementStart(2, "b"); + $r3$.ɵɵtext(3, "World"); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵtext(4, "!"); + $r3$.ɵɵelementEnd(); } } `; @@ -198,13 +198,13 @@ describe('compiler compliance', () => { … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div", $e0_attrs$); - $r3$.Δtext(1, "Hello "); - $r3$.ΔelementStart(2, "b"); - $r3$.Δtext(3, "World"); - $r3$.ΔelementEnd(); - $r3$.Δtext(4, "!"); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div", $e0_attrs$); + $r3$.ɵɵtext(1, "Hello "); + $r3$.ɵɵelementStart(2, "b"); + $r3$.ɵɵtext(3, "World"); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵtext(4, "!"); + $r3$.ɵɵelementEnd(); } } `; @@ -239,12 +239,12 @@ describe('compiler compliance', () => { … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - i0.ΔelementContainerStart(0); - i0.ΔelementStart(1, "span"); - i0.Δtext(2, "in a "); - i0.ΔelementEnd(); - i0.Δtext(3, "container"); - i0.ΔelementContainerEnd(); + i0.ɵɵelementContainerStart(0); + i0.ɵɵelementStart(1, "span"); + i0.ɵɵtext(2, "in a "); + i0.ɵɵelementEnd(); + i0.ɵɵtext(3, "container"); + i0.ɵɵelementContainerEnd(); } } `; @@ -276,8 +276,8 @@ describe('compiler compliance', () => { … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - i0.ΔelementContainerStart(0); - i0.ΔelementContainerEnd(); + i0.ɵɵelementContainerStart(0); + i0.ɵɵelementContainerEnd(); } } `; @@ -313,11 +313,11 @@ describe('compiler compliance', () => { … 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$.ΔelementProperty(0, "id", $r3$.Δbind(ctx.id)); + $r3$.ɵɵselect(0); + $r3$.ɵɵelementProperty(0, "id", $r3$.ɵɵbind(ctx.id)); } } `; @@ -360,15 +360,15 @@ describe('compiler compliance', () => { const template = ` template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.Δelement(0, "div", $e0_attrs$); - $r3$.Δpipe(1,"pipe"); + $r3$.ɵɵelement(0, "div", $e0_attrs$); + $r3$.ɵɵpipe(1,"pipe"); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔelementProperty(0, "ternary", $r3$.Δbind((ctx.cond ? $r3$.ΔpureFunction1(8, $c0$, ctx.a): $c1$))); - $r3$.ΔelementProperty(0, "pipe", $r3$.Δbind($r3$.ΔpipeBind3(1, 4, ctx.value, 1, 2))); - $r3$.ΔelementProperty(0, "and", $r3$.Δbind((ctx.cond && $r3$.ΔpureFunction1(10, $c0$, ctx.b)))); - $r3$.ΔelementProperty(0, "or", $r3$.Δbind((ctx.cond || $r3$.ΔpureFunction1(12, $c0$, ctx.c)))); + $r3$.ɵɵselect(0); + $r3$.ɵɵelementProperty(0, "ternary", $r3$.ɵɵbind((ctx.cond ? $r3$.ɵɵpureFunction1(8, $c0$, ctx.a): $c1$))); + $r3$.ɵɵelementProperty(0, "pipe", $r3$.ɵɵbind($r3$.ɵɵpipeBind3(1, 4, ctx.value, 1, 2))); + $r3$.ɵɵelementProperty(0, "and", $r3$.ɵɵbind((ctx.cond && $r3$.ɵɵpureFunction1(10, $c0$, ctx.b)))); + $r3$.ɵɵelementProperty(0, "or", $r3$.ɵɵbind((ctx.cond || $r3$.ɵɵpureFunction1(12, $c0$, ctx.c)))); } } `; @@ -433,20 +433,20 @@ describe('compiler compliance', () => { … hostBindings: function MyComponent_HostBindings(rf, ctx, elIndex) { if (rf & 1) { - $r3$.ΔallocHostVars(14); + $r3$.ɵɵallocHostVars(14); } if (rf & 2) { - $r3$.ΔcomponentHostSyntheticProperty(elIndex, "@expansionHeight", - $r3$.Δbind( - $r3$.ΔpureFunction2(5, $_c1$, ctx.getExpandedState(), - $r3$.ΔpureFunction2(2, $_c0$, ctx.collapsedHeight, ctx.expandedHeight) + $r3$.ɵɵcomponentHostSyntheticProperty(elIndex, "@expansionHeight", + $r3$.ɵɵbind( + $r3$.ɵɵpureFunction2(5, $_c1$, ctx.getExpandedState(), + $r3$.ɵɵpureFunction2(2, $_c0$, ctx.collapsedHeight, ctx.expandedHeight) ) ), null, true ); - $r3$.ΔcomponentHostSyntheticProperty(elIndex, "@expansionWidth", - $r3$.Δbind( - $r3$.ΔpureFunction2(11, $_c1$, ctx.getExpandedState(), - $r3$.ΔpureFunction2(8, $_c2$, ctx.collapsedWidth, ctx.expandedWidth) + $r3$.ɵɵcomponentHostSyntheticProperty(elIndex, "@expansionWidth", + $r3$.ɵɵbind( + $r3$.ɵɵpureFunction2(11, $_c1$, ctx.getExpandedState(), + $r3$.ɵɵpureFunction2(8, $_c2$, ctx.collapsedWidth, ctx.expandedWidth) ) ), null, true ); @@ -485,7 +485,7 @@ describe('compiler compliance', () => { const $e0_classBindings$ = ["error"]; const $e0_styleBindings$ = ["background-color"]; … - MyComponent.ngComponentDef = i0.ΔdefineComponent({type:MyComponent,selectors:[["my-component"]], + MyComponent.ngComponentDef = i0.ɵɵdefineComponent({type:MyComponent,selectors:[["my-component"]], factory: function MyComponent_Factory(t){ return new (t || MyComponent)(); }, @@ -493,14 +493,14 @@ describe('compiler compliance', () => { vars: 0, template: function MyComponent_Template(rf,ctx){ if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.ΔelementStyling($e0_classBindings$, $e0_styleBindings$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵelementStyling($e0_classBindings$, $e0_styleBindings$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.ΔelementStyleProp(0, 0, ctx.color); - $r3$.ΔelementClassProp(0, 0, ctx.error); - $r3$.ΔelementStylingApply(0); + $r3$.ɵɵelementStyleProp(0, 0, ctx.color); + $r3$.ɵɵelementClassProp(0, 0, ctx.error); + $r3$.ɵɵelementStylingApply(0); } }, encapsulation: 2 @@ -540,7 +540,7 @@ describe('compiler compliance', () => { // ChildComponent definition should be: const ChildComponentDefinition = ` - ChildComponent.ngComponentDef = $r3$.ΔdefineComponent({ + ChildComponent.ngComponentDef = $r3$.ɵɵdefineComponent({ type: ChildComponent, selectors: [["child"]], factory: function ChildComponent_Factory(t) { return new (t || ChildComponent)(); }, @@ -548,7 +548,7 @@ describe('compiler compliance', () => { vars: 0, template: function ChildComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.Δtext(0, "child-view"); + $r3$.ɵɵtext(0, "child-view"); } }, encapsulation: 2 @@ -556,7 +556,7 @@ describe('compiler compliance', () => { // SomeDirective definition should be: const SomeDirectiveDefinition = ` - SomeDirective.ngDirectiveDef = $r3$.ΔdefineDirective({ + SomeDirective.ngDirectiveDef = $r3$.ɵɵdefineDirective({ type: SomeDirective, selectors: [["", "some-directive", ""]], factory: function SomeDirective_Factory(t) {return new (t || SomeDirective)(); } @@ -567,7 +567,7 @@ describe('compiler compliance', () => { const MyComponentDefinition = ` const $c1$ = ["some-directive", ""]; … - MyComponent.ngComponentDef = $r3$.ΔdefineComponent({ + MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({ type: MyComponent, selectors: [["my-component"]], factory: function MyComponent_Factory(t) { return new (t || MyComponent)(); }, @@ -575,8 +575,8 @@ describe('compiler compliance', () => { vars: 0, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.Δelement(0, "child", $c1$); - $r3$.Δtext(1, "!"); + $r3$.ɵɵelement(0, "child", $c1$); + $r3$.ɵɵtext(1, "!"); } }, directives: [ChildComponent, SomeDirective], @@ -613,7 +613,7 @@ describe('compiler compliance', () => { // SomeDirective definition should be: const SomeDirectiveDefinition = ` - SomeDirective.ngDirectiveDef = $r3$.ΔdefineDirective({ + SomeDirective.ngDirectiveDef = $r3$.ɵɵdefineDirective({ type: SomeDirective, selectors: [["div", "some-directive", "", 8, "foo", 3, "title", "", 9, "baz"]], factory: function SomeDirective_Factory(t) {return new (t || SomeDirective)(); } @@ -622,7 +622,7 @@ describe('compiler compliance', () => { // OtherDirective definition should be: const OtherDirectiveDefinition = ` - OtherDirective.ngDirectiveDef = $r3$.ΔdefineDirective({ + OtherDirective.ngDirectiveDef = $r3$.ɵɵdefineDirective({ type: OtherDirective, selectors: [["", 5, "span", "title", "", 9, "baz"]], factory: function OtherDirective_Factory(t) {return new (t || OtherDirective)(); } @@ -654,7 +654,7 @@ describe('compiler compliance', () => { // EmptyOutletComponent definition should be: const EmptyOutletComponentDefinition = ` … - EmptyOutletComponent.ngComponentDef = $r3$.ΔdefineComponent({ + EmptyOutletComponent.ngComponentDef = $r3$.ɵɵdefineComponent({ type: EmptyOutletComponent, selectors: [["ng-component"]], factory: function EmptyOutletComponent_Factory(t) { return new (t || EmptyOutletComponent)(); }, @@ -662,7 +662,7 @@ describe('compiler compliance', () => { vars: 0, template: function EmptyOutletComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.Δelement(0, "router-outlet"); + $r3$.ɵɵelement(0, "router-outlet"); } }, encapsulation: 2 @@ -737,13 +737,13 @@ describe('compiler compliance', () => { const MyComponentDefinition = ` … - MyComponent.ngComponentDef = $r3$.ΔdefineComponent({ + MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({ type: MyComponent, selectors: [["my-component"]], factory: function MyComponent_Factory(t) { return new (t || MyComponent)( - $r3$.ΔdirectiveInject($i$.ElementRef), $r3$.ΔdirectiveInject($i$.ViewContainerRef), - $r3$.ΔdirectiveInject($i$.ChangeDetectorRef)); + $r3$.ɵɵdirectiveInject($i$.ElementRef), $r3$.ɵɵdirectiveInject($i$.ViewContainerRef), + $r3$.ɵɵdirectiveInject($i$.ChangeDetectorRef)); }, consts: 0, vars: 0, @@ -783,29 +783,29 @@ describe('compiler compliance', () => { }; const IfDirectiveDefinition = ` - IfDirective.ngDirectiveDef = $r3$.ΔdefineDirective({ + IfDirective.ngDirectiveDef = $r3$.ɵɵdefineDirective({ type: IfDirective, selectors: [["", "if", ""]], - factory: function IfDirective_Factory(t) { return new (t || IfDirective)($r3$.ΔdirectiveInject($i$.TemplateRef)); } + factory: function IfDirective_Factory(t) { return new (t || IfDirective)($r3$.ɵɵdirectiveInject($i$.TemplateRef)); } });`; const MyComponentDefinition = ` const $c1$ = ["foo", ""]; const $c2$ = [${AttributeMarker.Template}, "if"]; function MyComponent_li_2_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "li"); - $r3$.Δtext(1); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "li"); + $r3$.ɵɵtext(1); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - const $myComp$ = $r3$.ΔnextContext(); - const $foo$ = $r3$.Δreference(1); - $r3$.Δselect(1); - $r3$.ΔtextBinding(1, $r3$.Δinterpolation2("", $myComp$.salutation, " ", $foo$, "")); + const $myComp$ = $r3$.ɵɵnextContext(); + const $foo$ = $r3$.ɵɵreference(1); + $r3$.ɵɵselect(1); + $r3$.ɵɵtextBinding(1, $r3$.ɵɵinterpolation2("", $myComp$.salutation, " ", $foo$, "")); } } … - MyComponent.ngComponentDef = $r3$.ΔdefineComponent({ + MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({ type: MyComponent, selectors: [["my-component"]], factory: function MyComponent_Factory(t) { return new (t || MyComponent)(); }, @@ -813,9 +813,9 @@ describe('compiler compliance', () => { vars: 0, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "ul", null, $c1$); - $r3$.Δtemplate(2, MyComponent_li_2_Template, 2, 2, "li", $c2$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "ul", null, $c1$); + $r3$.ɵɵtemplate(2, MyComponent_li_2_Template, 2, 2, "li", $c2$); + $r3$.ɵɵelementEnd(); } }, directives:[IfDirective], @@ -868,7 +868,7 @@ describe('compiler compliance', () => { const $e0_attrs$ = [${AttributeMarker.Bindings}, "names"]; const $e0_ff$ = function ($v$) { return ["Nancy", $v$]; }; … - MyApp.ngComponentDef = $r3$.ΔdefineComponent({ + MyApp.ngComponentDef = $r3$.ɵɵdefineComponent({ type: MyApp, selectors: [["my-app"]], factory: function MyApp_Factory(t) { return new (t || MyApp)(); }, @@ -876,11 +876,11 @@ describe('compiler compliance', () => { vars: 3, template: function MyApp_Template(rf, ctx) { if (rf & 1) { - $r3$.Δelement(0, "my-comp", $e0_attrs$); + $r3$.ɵɵelement(0, "my-comp", $e0_attrs$); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔelementProperty(0, "names", $r3$.Δbind($r3$.ΔpureFunction1(1, $e0_ff$, ctx.customName))); + $r3$.ɵɵselect(0); + $r3$.ɵɵelementProperty(0, "names", $r3$.ɵɵbind($r3$.ɵɵpureFunction1(1, $e0_ff$, ctx.customName))); } }, directives: [MyComp], @@ -951,7 +951,7 @@ describe('compiler compliance', () => { return ["start-", $v0$, $v1$, $v2$, $v3$, $v4$, "-middle-", $v5$, $v6$, $v7$, $v8$, "-end"]; } … - MyApp.ngComponentDef = $r3$.ΔdefineComponent({ + MyApp.ngComponentDef = $r3$.ɵɵdefineComponent({ type: MyApp, selectors: [["my-app"]], factory: function MyApp_Factory(t) { return new (t || MyApp)(); }, @@ -959,13 +959,13 @@ describe('compiler compliance', () => { vars: 11, template: function MyApp_Template(rf, ctx) { if (rf & 1) { - $r3$.Δelement(0, "my-comp", $e0_attr$); + $r3$.ɵɵelement(0, "my-comp", $e0_attr$); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔelementProperty( + $r3$.ɵɵselect(0); + $r3$.ɵɵelementProperty( 0, "names", - $r3$.Δbind($r3$.ΔpureFunctionV(1, $e0_ff$, [ctx.n0, ctx.n1, ctx.n2, ctx.n3, ctx.n4, ctx.n5, ctx.n6, ctx.n7, ctx.n8]))); + $r3$.ɵɵbind($r3$.ɵɵpureFunctionV(1, $e0_ff$, [ctx.n0, ctx.n1, ctx.n2, ctx.n3, ctx.n4, ctx.n5, ctx.n6, ctx.n7, ctx.n8]))); } }, directives: [MyComp], @@ -1016,7 +1016,7 @@ describe('compiler compliance', () => { const $e0_attrs$ = [${AttributeMarker.Bindings}, "config"]; const $e0_ff$ = function ($v$) { return {"duration": 500, animation: $v$}; }; … - MyApp.ngComponentDef = $r3$.ΔdefineComponent({ + MyApp.ngComponentDef = $r3$.ɵɵdefineComponent({ type: MyApp, selectors: [["my-app"]], factory: function MyApp_Factory(t) { return new (t || MyApp)(); }, @@ -1024,11 +1024,11 @@ describe('compiler compliance', () => { vars: 3, template: function MyApp_Template(rf, ctx) { if (rf & 1) { - $r3$.Δelement(0, "object-comp", $e0_attrs$); + $r3$.ɵɵelement(0, "object-comp", $e0_attrs$); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔelementProperty(0, "config", $r3$.Δbind($r3$.ΔpureFunction1(1, $e0_ff$, ctx.name))); + $r3$.ɵɵselect(0); + $r3$.ɵɵelementProperty(0, "config", $r3$.ɵɵbind($r3$.ɵɵpureFunction1(1, $e0_ff$, ctx.name))); } }, directives: [ObjectComp], @@ -1085,7 +1085,7 @@ describe('compiler compliance', () => { const $e0_ff_1$ = function ($v$) { return [$c0$, $v$]; }; const $e0_ff_2$ = function ($v1$, $v2$) { return {animation: $v1$, actions: $v2$}; }; … - MyApp.ngComponentDef = $r3$.ΔdefineComponent({ + MyApp.ngComponentDef = $r3$.ɵɵdefineComponent({ type: MyApp, selectors: [["my-app"]], factory: function MyApp_Factory(t) { return new (t || MyApp)(); }, @@ -1093,13 +1093,13 @@ describe('compiler compliance', () => { vars: 8, template: function MyApp_Template(rf, ctx) { if (rf & 1) { - $r3$.Δelement(0, "nested-comp", $e0_attrs$); + $r3$.ɵɵelement(0, "nested-comp", $e0_attrs$); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔelementProperty( + $r3$.ɵɵselect(0); + $r3$.ɵɵelementProperty( 0, "config", - $r3$.Δbind($r3$.ΔpureFunction2(5, $e0_ff_2$, ctx.name, $r3$.ΔpureFunction1(3, $e0_ff_1$, $r3$.ΔpureFunction1(1, $e0_ff$, ctx.duration))))); + $r3$.ɵɵbind($r3$.ɵɵpureFunction2(5, $e0_ff_2$, ctx.name, $r3$.ɵɵpureFunction1(3, $e0_ff_1$, $r3$.ɵɵpureFunction1(1, $e0_ff$, ctx.duration))))); } }, directives: [NestedComp], @@ -1147,7 +1147,7 @@ describe('compiler compliance', () => { }; const SimpleComponentDefinition = ` - SimpleComponent.ngComponentDef = $r3$.ΔdefineComponent({ + SimpleComponent.ngComponentDef = $r3$.ɵɵdefineComponent({ type: SimpleComponent, selectors: [["simple"]], factory: function SimpleComponent_Factory(t) { return new (t || SimpleComponent)(); }, @@ -1156,10 +1156,10 @@ describe('compiler compliance', () => { vars: 0, template: function SimpleComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔprojectionDef(); - $r3$.ΔelementStart(0, "div"); - $r3$.Δprojection(1); - $r3$.ΔelementEnd(); + $r3$.ɵɵprojectionDef(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵprojection(1); + $r3$.ɵɵelementEnd(); } }, encapsulation: 2 @@ -1170,7 +1170,7 @@ describe('compiler compliance', () => { const $c4$ = ["id","second"]; const $c1$ = [[["span", "title", "tofirst"]], [["span", "title", "tosecond"]]]; … - ComplexComponent.ngComponentDef = $r3$.ΔdefineComponent({ + ComplexComponent.ngComponentDef = $r3$.ɵɵdefineComponent({ type: ComplexComponent, selectors: [["complex"]], factory: function ComplexComponent_Factory(t) { return new (t || ComplexComponent)(); }, @@ -1179,13 +1179,13 @@ describe('compiler compliance', () => { vars: 0, template: function ComplexComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔprojectionDef($c1$); - $r3$.ΔelementStart(0, "div", $c3$); - $r3$.Δprojection(1, 1); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(2, "div", $c4$); - $r3$.Δprojection(3, 2); - $r3$.ΔelementEnd(); + $r3$.ɵɵprojectionDef($c1$); + $r3$.ɵɵelementStart(0, "div", $c3$); + $r3$.ɵɵprojection(1, 1); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(2, "div", $c4$); + $r3$.ɵɵprojection(3, 2); + $r3$.ɵɵelementEnd(); } }, encapsulation: 2 @@ -1232,38 +1232,38 @@ describe('compiler compliance', () => { const $_c1$ = ["id", "third", ${AttributeMarker.Template}, "ngIf"]; const $_c2$ = ["id", "second"]; function Cmp_div_0_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div", $_c2$); - $r3$.Δprojection(1, 1); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div", $_c2$); + $r3$.ɵɵprojection(1, 1); + $r3$.ɵɵelementEnd(); } } const $_c3$ = ["id", "third"]; function Cmp_div_1_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div", $_c3$); - $r3$.Δtext(1, " No ng-content, no instructions generated. "); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div", $_c3$); + $r3$.ɵɵtext(1, " No ng-content, no instructions generated. "); + $r3$.ɵɵelementEnd(); } } function Cmp_ng_template_2_Template(rf, ctx) { if (rf & 1) { - $r3$.Δtext(0, " '*' selector: "); - $r3$.Δprojection(1); + $r3$.ɵɵtext(0, " '*' selector: "); + $r3$.ɵɵprojection(1); } } const $_c4$ = [[["span", "title", "tofirst"]]]; … template: function Cmp_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔprojectionDef($_c4$); - $r3$.Δtemplate(0, Cmp_div_0_Template, 2, 0, "div", $_c0$); - $r3$.Δtemplate(1, Cmp_div_1_Template, 2, 0, "div", $_c1$); - $r3$.Δtemplate(2, Cmp_ng_template_2_Template, 2, 0, "ng-template"); + $r3$.ɵɵprojectionDef($_c4$); + $r3$.ɵɵtemplate(0, Cmp_div_0_Template, 2, 0, "div", $_c0$); + $r3$.ɵɵtemplate(1, Cmp_div_1_Template, 2, 0, "div", $_c1$); + $r3$.ɵɵtemplate(2, Cmp_ng_template_2_Template, 2, 0, "ng-template"); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔelementProperty(0, "ngIf", $r3$.Δbind(ctx.visible)); - $r3$.Δselect(1); - $r3$.ΔelementProperty(1, "ngIf", $r3$.Δbind(ctx.visible)); + $r3$.ɵɵselect(0); + $r3$.ɵɵelementProperty(0, "ngIf", $r3$.ɵɵbind(ctx.visible)); + $r3$.ɵɵselect(1); + $r3$.ɵɵelementProperty(1, "ngIf", $r3$.ɵɵbind(ctx.visible)); } } `; @@ -1304,19 +1304,19 @@ describe('compiler compliance', () => { const output = ` function Cmp_ng_template_1_ng_template_1_Template(rf, ctx) { if (rf & 1) { - $r3$.Δprojection(0, 4); + $r3$.ɵɵprojection(0, 4); } } function Cmp_ng_template_1_Template(rf, ctx) { if (rf & 1) { - $r3$.Δprojection(0, 3); - $r3$.Δtemplate(1, Cmp_ng_template_1_ng_template_1_Template, 1, 0, "ng-template"); + $r3$.ɵɵprojection(0, 3); + $r3$.ɵɵtemplate(1, Cmp_ng_template_1_ng_template_1_Template, 1, 0, "ng-template"); } } function Cmp_ng_template_2_Template(rf, ctx) { if (rf & 1) { - $r3$.Δtext(0, " '*' selector in a template: "); - $r3$.Δprojection(1); + $r3$.ɵɵtext(0, " '*' selector in a template: "); + $r3$.ɵɵprojection(1); } } const $_c0$ = [[["", "id", "tomainbefore"]], [["", "id", "tomainafter"]], [["", "id", "totemplate"]], [["", "id", "tonestedtemplate"]]]; @@ -1324,11 +1324,11 @@ describe('compiler compliance', () => { … template: function Cmp_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔprojectionDef($_c2$); - $r3$.Δprojection(0, 1); - $r3$.Δtemplate(1, Cmp_ng_template_1_Template, 2, 0, "ng-template"); - $r3$.Δtemplate(2, Cmp_ng_template_2_Template, 2, 0, "ng-template"); - $r3$.Δprojection(3, 2); + $r3$.ɵɵprojectionDef($_c2$); + $r3$.ɵɵprojection(0, 1); + $r3$.ɵɵtemplate(1, Cmp_ng_template_1_Template, 2, 0, "ng-template"); + $r3$.ɵɵtemplate(2, Cmp_ng_template_2_Template, 2, 0, "ng-template"); + $r3$.ɵɵprojection(3, 2); } } `; @@ -1368,7 +1368,7 @@ describe('compiler compliance', () => { const $_c1$ = ["[title]"]; const $_c2$ = [5, ["", "title", ""]]; … - MyApp.ngComponentDef = $r3$.ΔdefineComponent({ + MyApp.ngComponentDef = $r3$.ɵɵdefineComponent({ type: MyApp, selectors: [["my-app"]], factory: function MyApp_Factory(t) { @@ -1378,9 +1378,9 @@ describe('compiler compliance', () => { vars: 0, template: function MyApp_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "simple"); - $r3$.Δelement(1, "h1", $_c2$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "simple"); + $r3$.ɵɵelement(1, "h1", $_c2$); + $r3$.ɵɵelementEnd(); } }, encapsulation: 2 @@ -1423,7 +1423,7 @@ describe('compiler compliance', () => { const $_c1$ = ["[title]"]; const $_c2$ = [5, ["", "title", ""]]; … - MyApp.ngComponentDef = $r3$.ΔdefineComponent({ + MyApp.ngComponentDef = $r3$.ɵɵdefineComponent({ type: MyApp, selectors: [["my-app"]], factory: function MyApp_Factory(t) { @@ -1433,9 +1433,9 @@ describe('compiler compliance', () => { vars: 0, template: function MyApp_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "simple"); - $r3$.Δelement(1, "h1", $_c2$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "simple"); + $r3$.ɵɵelement(1, "h1", $_c2$); + $r3$.ɵɵelementEnd(); } }, encapsulation: 2 @@ -1489,26 +1489,26 @@ describe('compiler compliance', () => { const ViewQueryComponentDefinition = ` const $e0_attrs$ = ["someDir",""]; … - ViewQueryComponent.ngComponentDef = $r3$.ΔdefineComponent({ + ViewQueryComponent.ngComponentDef = $r3$.ɵɵdefineComponent({ type: ViewQueryComponent, selectors: [["view-query-component"]], factory: function ViewQueryComponent_Factory(t) { return new (t || ViewQueryComponent)(); }, viewQuery: function ViewQueryComponent_Query(rf, ctx) { if (rf & 1) { - $r3$.ΔviewQuery(SomeDirective, true, null); - $r3$.ΔviewQuery(SomeDirective, true, null); + $r3$.ɵɵviewQuery(SomeDirective, true, null); + $r3$.ɵɵviewQuery(SomeDirective, true, null); } if (rf & 2) { var $tmp$; - ($r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadViewQuery())) && (ctx.someDir = $tmp$.first)); - ($r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadViewQuery())) && (ctx.someDirs = $tmp$)); + ($r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadViewQuery())) && (ctx.someDir = $tmp$.first)); + ($r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadViewQuery())) && (ctx.someDirs = $tmp$)); } }, consts: 1, vars: 0, template: function ViewQueryComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.Δelement(0, "div", $e0_attrs$); + $r3$.ɵɵelement(0, "div", $e0_attrs$); } }, directives: function () { return [SomeDirective]; }, @@ -1549,17 +1549,17 @@ describe('compiler compliance', () => { const $e0_attrs$ = ["myRef"]; const $e1_attrs$ = ["myRef1", "myRef2", "myRef3"]; … - ViewQueryComponent.ngComponentDef = $r3$.ΔdefineComponent({ + ViewQueryComponent.ngComponentDef = $r3$.ɵɵdefineComponent({ … viewQuery: function ViewQueryComponent_Query(rf, ctx) { if (rf & 1) { - $r3$.ΔviewQuery($e0_attrs$, true, null); - $r3$.ΔviewQuery($e1_attrs$, true, null); + $r3$.ɵɵviewQuery($e0_attrs$, true, null); + $r3$.ɵɵviewQuery($e1_attrs$, true, null); } if (rf & 2) { var $tmp$; - ($r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadViewQuery())) && (ctx.myRef = $tmp$.first)); - ($r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadViewQuery())) && (ctx.myRefs = $tmp$)); + ($r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadViewQuery())) && (ctx.myRef = $tmp$.first)); + ($r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadViewQuery())) && (ctx.myRefs = $tmp$)); } }, … @@ -1600,26 +1600,26 @@ describe('compiler compliance', () => { const $refs$ = ["foo"]; const $e0_attrs$ = ["someDir",""]; … - ViewQueryComponent.ngComponentDef = $r3$.ΔdefineComponent({ + ViewQueryComponent.ngComponentDef = $r3$.ɵɵdefineComponent({ type: ViewQueryComponent, selectors: [["view-query-component"]], factory: function ViewQueryComponent_Factory(t) { return new (t || ViewQueryComponent)(); }, viewQuery: function ViewQueryComponent_Query(rf, ctx) { if (rf & 1) { - $r3$.ΔstaticViewQuery(SomeDirective, true, null); - $r3$.ΔviewQuery($refs$, true, null); + $r3$.ɵɵstaticViewQuery(SomeDirective, true, null); + $r3$.ɵɵviewQuery($refs$, true, null); } if (rf & 2) { var $tmp$; - ($r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadViewQuery())) && (ctx.someDir = $tmp$.first)); - ($r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadViewQuery())) && (ctx.foo = $tmp$.first)); + ($r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadViewQuery())) && (ctx.someDir = $tmp$.first)); + ($r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadViewQuery())) && (ctx.foo = $tmp$.first)); } }, consts: 1, vars: 0, template: function ViewQueryComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.Δelement(0, "div", $e0_attrs$); + $r3$.ɵɵelement(0, "div", $e0_attrs$); } }, directives: function () { return [SomeDirective]; }, @@ -1665,21 +1665,21 @@ describe('compiler compliance', () => { const $e0_attrs$ = ["myRef"]; const $e1_attrs$ = ["myRef1", "myRef2", "myRef3"]; … - ViewQueryComponent.ngComponentDef = $r3$.ΔdefineComponent({ + ViewQueryComponent.ngComponentDef = $r3$.ɵɵdefineComponent({ … viewQuery: function ViewQueryComponent_Query(rf, ctx) { if (rf & 1) { - $r3$.ΔviewQuery($e0_attrs$, true, TemplateRef); - $r3$.ΔviewQuery(SomeDirective, true, ElementRef); - $r3$.ΔviewQuery($e1_attrs$, true, ElementRef); - $r3$.ΔviewQuery(SomeDirective, true, TemplateRef); + $r3$.ɵɵviewQuery($e0_attrs$, true, TemplateRef); + $r3$.ɵɵviewQuery(SomeDirective, true, ElementRef); + $r3$.ɵɵviewQuery($e1_attrs$, true, ElementRef); + $r3$.ɵɵviewQuery(SomeDirective, true, TemplateRef); } if (rf & 2) { var $tmp$; - ($r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadViewQuery())) && (ctx.myRef = $tmp$.first)); - ($r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadViewQuery())) && (ctx.someDir = $tmp$.first)); - ($r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadViewQuery())) && (ctx.myRefs = $tmp$)); - ($r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadViewQuery())) && (ctx.someDirs = $tmp$)); + ($r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadViewQuery())) && (ctx.myRef = $tmp$.first)); + ($r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadViewQuery())) && (ctx.someDir = $tmp$.first)); + ($r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadViewQuery())) && (ctx.myRefs = $tmp$)); + ($r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadViewQuery())) && (ctx.someDirs = $tmp$)); } }, … @@ -1727,7 +1727,7 @@ describe('compiler compliance', () => { }; const ContentQueryComponentDefinition = ` - ContentQueryComponent.ngComponentDef = $r3$.ΔdefineComponent({ + ContentQueryComponent.ngComponentDef = $r3$.ɵɵdefineComponent({ type: ContentQueryComponent, selectors: [["content-query-component"]], factory: function ContentQueryComponent_Factory(t) { @@ -1735,13 +1735,13 @@ describe('compiler compliance', () => { }, contentQueries: function ContentQueryComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) { - $r3$.ΔcontentQuery(dirIndex, SomeDirective, true, null); - $r3$.ΔcontentQuery(dirIndex, SomeDirective, false, null); + $r3$.ɵɵcontentQuery(dirIndex, SomeDirective, true, null); + $r3$.ɵɵcontentQuery(dirIndex, SomeDirective, false, null); } if (rf & 2) { var $tmp$; - ($r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadContentQuery())) && (ctx.someDir = $tmp$.first)); - ($r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadContentQuery())) && (ctx.someDirList = $tmp$)); + ($r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadContentQuery())) && (ctx.someDir = $tmp$.first)); + ($r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadContentQuery())) && (ctx.someDirList = $tmp$)); } }, ngContentSelectors: _c0, @@ -1749,10 +1749,10 @@ describe('compiler compliance', () => { vars: 0, template: function ContentQueryComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔprojectionDef(); - $r3$.ΔelementStart(0, "div"); - $r3$.Δprojection(1); - $r3$.ΔelementEnd(); + $r3$.ɵɵprojectionDef(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵprojection(1); + $r3$.ɵɵelementEnd(); } }, encapsulation: 2 @@ -1791,17 +1791,17 @@ describe('compiler compliance', () => { const $e0_attrs$ = ["myRef"]; const $e1_attrs$ = ["myRef1", "myRef2", "myRef3"]; … - ContentQueryComponent.ngComponentDef = $r3$.ΔdefineComponent({ + ContentQueryComponent.ngComponentDef = $r3$.ɵɵdefineComponent({ … contentQueries: function ContentQueryComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) { - $r3$.ΔcontentQuery(dirIndex, $e0_attrs$, true, null); - $r3$.ΔcontentQuery(dirIndex, $e1_attrs$, false, null); + $r3$.ɵɵcontentQuery(dirIndex, $e0_attrs$, true, null); + $r3$.ɵɵcontentQuery(dirIndex, $e1_attrs$, false, null); } if (rf & 2) { var $tmp$; - ($r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadContentQuery())) && (ctx.myRef = $tmp$.first)); - ($r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadContentQuery())) && (ctx.myRefs = $tmp$)); + ($r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadContentQuery())) && (ctx.myRef = $tmp$.first)); + ($r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadContentQuery())) && (ctx.myRefs = $tmp$)); } }, … @@ -1849,7 +1849,7 @@ describe('compiler compliance', () => { }; const ContentQueryComponentDefinition = ` - ContentQueryComponent.ngComponentDef = $r3$.ΔdefineComponent({ + ContentQueryComponent.ngComponentDef = $r3$.ɵɵdefineComponent({ type: ContentQueryComponent, selectors: [["content-query-component"]], factory: function ContentQueryComponent_Factory(t) { @@ -1857,13 +1857,13 @@ describe('compiler compliance', () => { }, contentQueries: function ContentQueryComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) { - $r3$.ΔstaticContentQuery(dirIndex, SomeDirective, true, null); - $r3$.ΔcontentQuery(dirIndex, $ref0$, true, null); + $r3$.ɵɵstaticContentQuery(dirIndex, SomeDirective, true, null); + $r3$.ɵɵcontentQuery(dirIndex, $ref0$, true, null); } if (rf & 2) { var $tmp$; - ($r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadContentQuery())) && (ctx.someDir = $tmp$.first)); - ($r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadContentQuery())) && (ctx.foo = $tmp$.first)); + ($r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadContentQuery())) && (ctx.someDir = $tmp$.first)); + ($r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadContentQuery())) && (ctx.foo = $tmp$.first)); } }, ngContentSelectors: $_c1$, @@ -1871,10 +1871,10 @@ describe('compiler compliance', () => { vars: 0, template: function ContentQueryComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔprojectionDef(); - $r3$.ΔelementStart(0, "div"); - $r3$.Δprojection(1); - $r3$.ΔelementEnd(); + $r3$.ɵɵprojectionDef(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵprojection(1); + $r3$.ɵɵelementEnd(); } }, encapsulation: 2 @@ -1918,21 +1918,21 @@ describe('compiler compliance', () => { const $e0_attrs$ = ["myRef"]; const $e1_attrs$ = ["myRef1", "myRef2", "myRef3"]; … - ContentQueryComponent.ngComponentDef = $r3$.ΔdefineComponent({ + ContentQueryComponent.ngComponentDef = $r3$.ɵɵdefineComponent({ … contentQueries: function ContentQueryComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) { - $r3$.ΔcontentQuery(dirIndex, $e0_attrs$, true, TemplateRef); - $r3$.ΔcontentQuery(dirIndex, SomeDirective, true, ElementRef); - $r3$.ΔcontentQuery(dirIndex, $e1_attrs$, false, ElementRef); - $r3$.ΔcontentQuery(dirIndex, SomeDirective, false, TemplateRef); + $r3$.ɵɵcontentQuery(dirIndex, $e0_attrs$, true, TemplateRef); + $r3$.ɵɵcontentQuery(dirIndex, SomeDirective, true, ElementRef); + $r3$.ɵɵcontentQuery(dirIndex, $e1_attrs$, false, ElementRef); + $r3$.ɵɵcontentQuery(dirIndex, SomeDirective, false, TemplateRef); } if (rf & 2) { var $tmp$; - ($r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadContentQuery())) && (ctx.myRef = $tmp$.first)); - ($r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadContentQuery())) && (ctx.someDir = $tmp$.first)); - ($r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadContentQuery())) && (ctx.myRefs = $tmp$)); - ($r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadContentQuery())) && (ctx.someDirs = $tmp$)); + ($r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadContentQuery())) && (ctx.myRef = $tmp$.first)); + ($r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadContentQuery())) && (ctx.someDir = $tmp$.first)); + ($r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadContentQuery())) && (ctx.myRefs = $tmp$)); + ($r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadContentQuery())) && (ctx.someDirs = $tmp$)); } }, … @@ -2026,7 +2026,7 @@ describe('compiler compliance', () => { }; const MyPipeDefinition = ` - MyPipe.ngPipeDef = $r3$.ΔdefinePipe({ + MyPipe.ngPipeDef = $r3$.ɵɵdefinePipe({ name: "myPipe", type: MyPipe, factory: function MyPipe_Factory(t) { return new (t || MyPipe)(); }, @@ -2035,7 +2035,7 @@ describe('compiler compliance', () => { `; const MyPurePipeDefinition = ` - MyPurePipe.ngPipeDef = $r3$.ΔdefinePipe({ + MyPurePipe.ngPipeDef = $r3$.ɵɵdefinePipe({ name: "myPurePipe", type: MyPurePipe, factory: function MyPurePipe_Factory(t) { return new (t || MyPurePipe)(); }, @@ -2047,7 +2047,7 @@ describe('compiler compliance', () => { return [$a0$, 1, 2, 3, 4, 5]; }; // ... - MyApp.ngComponentDef = $r3$.ΔdefineComponent({ + MyApp.ngComponentDef = $r3$.ɵɵdefineComponent({ type: MyApp, selectors: [["my-app"]], factory: function MyApp_Factory(t) { return new (t || MyApp)(); }, @@ -2055,20 +2055,20 @@ describe('compiler compliance', () => { vars: 20, template: function MyApp_Template(rf, ctx) { if (rf & 1) { - $r3$.Δtext(0); - $r3$.Δpipe(1, "myPurePipe"); - $r3$.Δpipe(2, "myPipe"); - $r3$.ΔelementStart(3, "p"); - $r3$.Δtext(4); - $r3$.Δpipe(5, "myPipe"); - $r3$.Δpipe(6, "myPipe"); - $r3$.ΔelementEnd(); + $r3$.ɵɵtext(0); + $r3$.ɵɵpipe(1, "myPurePipe"); + $r3$.ɵɵpipe(2, "myPipe"); + $r3$.ɵɵelementStart(3, "p"); + $r3$.ɵɵtext(4); + $r3$.ɵɵpipe(5, "myPipe"); + $r3$.ɵɵpipe(6, "myPipe"); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔtextBinding(0, $r3$.Δinterpolation1("", $r3$.ΔpipeBind2(1, 3, $r3$.ΔpipeBind2(2, 6, ctx.name, ctx.size), ctx.size), "")); - $r3$.Δselect(4); - $r3$.ΔtextBinding(4, $r3$.Δinterpolation2("", $r3$.ΔpipeBindV(5, 9, $r3$.ΔpureFunction1(18, $c0$, ctx.name)), " ", (ctx.name ? 1 : $r3$.ΔpipeBind1(6, 16, 2)), "")); + $r3$.ɵɵselect(0); + $r3$.ɵɵtextBinding(0, $r3$.ɵɵinterpolation1("", $r3$.ɵɵpipeBind2(1, 3, $r3$.ɵɵpipeBind2(2, 6, ctx.name, ctx.size), ctx.size), "")); + $r3$.ɵɵselect(4); + $r3$.ɵɵtextBinding(4, $r3$.ɵɵinterpolation2("", $r3$.ɵɵpipeBindV(5, 9, $r3$.ɵɵpureFunction1(18, $c0$, ctx.name)), " ", (ctx.name ? 1 : $r3$.ɵɵpipeBind1(6, 16, 2)), "")); } }, pipes: [MyPurePipe, MyPipe], @@ -2114,7 +2114,7 @@ describe('compiler compliance', () => { const MyAppDefinition = ` // ... - MyApp.ngComponentDef = $r3$.ΔdefineComponent({ + MyApp.ngComponentDef = $r3$.ɵɵdefineComponent({ type: MyApp, selectors: [["my-app"]], factory: function MyApp_Factory(t) { return new (t || MyApp)(); }, @@ -2122,21 +2122,21 @@ describe('compiler compliance', () => { vars: 27, template: function MyApp_Template(rf, ctx) { if (rf & 1) { - $r3$.Δtext(0); - $r3$.Δpipe(1, "myPipe"); - $r3$.Δpipe(2, "myPipe"); - $r3$.Δpipe(3, "myPipe"); - $r3$.Δpipe(4, "myPipe"); - $r3$.Δpipe(5, "myPipe"); + $r3$.ɵɵtext(0); + $r3$.ɵɵpipe(1, "myPipe"); + $r3$.ɵɵpipe(2, "myPipe"); + $r3$.ɵɵpipe(3, "myPipe"); + $r3$.ɵɵpipe(4, "myPipe"); + $r3$.ɵɵpipe(5, "myPipe"); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔtextBinding(0, $r3$.Δinterpolation5( - "0:", i0.ΔpipeBind1(1, 5, ctx.name), - "1:", i0.ΔpipeBind2(2, 7, ctx.name, 1), - "2:", i0.ΔpipeBind3(3, 10, ctx.name, 1, 2), - "3:", i0.ΔpipeBind4(4, 14, ctx.name, 1, 2, 3), - "4:", i0.ΔpipeBindV(5, 19, $r3$.ΔpureFunction1(25, $c0$, ctx.name)), + $r3$.ɵɵselect(0); + $r3$.ɵɵtextBinding(0, $r3$.ɵɵinterpolation5( + "0:", i0.ɵɵpipeBind1(1, 5, ctx.name), + "1:", i0.ɵɵpipeBind2(2, 7, ctx.name, 1), + "2:", i0.ɵɵpipeBind3(3, 10, ctx.name, 1, 2), + "3:", i0.ɵɵpipeBind4(4, 14, ctx.name, 1, 2, 3), + "4:", i0.ɵɵpipeBindV(5, 19, $r3$.ɵɵpureFunction1(25, $c0$, ctx.name)), "" )); } @@ -2170,7 +2170,7 @@ describe('compiler compliance', () => { const MyComponentDefinition = ` const $c1$ = ["user", ""]; … - MyComponent.ngComponentDef = $r3$.ΔdefineComponent({ + MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({ type: MyComponent, selectors: [["my-component"]], factory: function MyComponent_Factory(t) { return new (t || MyComponent)(); }, @@ -2178,13 +2178,13 @@ describe('compiler compliance', () => { vars: 1, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.Δelement(0, "input", null, $c1$); - $r3$.Δtext(2); + $r3$.ɵɵelement(0, "input", null, $c1$); + $r3$.ɵɵtext(2); } if (rf & 2) { - const $user$ = $r3$.Δreference(1); - $r3$.Δselect(2); - $r3$.ΔtextBinding(2, $r3$.Δinterpolation1("Hello ", $user$.value, "!")); + const $user$ = $r3$.ɵɵreference(1); + $r3$.ɵɵselect(2); + $r3$.ɵɵtextBinding(2, $r3$.ɵɵinterpolation1("Hello ", $user$.value, "!")); } }, encapsulation: 2 @@ -2236,38 +2236,38 @@ describe('compiler compliance', () => { const $c4$ = ["bar", ""]; function MyComponent_div_3_span_2_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "span"); - $r3$.Δtext(1); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "span"); + $r3$.ɵɵtext(1); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.ΔnextContext(); - const $bar$ = $r3$.Δreference(4); - $r3$.ΔnextContext(); - const $foo$ = $r3$.Δreference(1); - const $baz$ = $r3$.Δreference(5); - $r3$.Δselect(1); - $r3$.ΔtextBinding(1, $r3$.Δinterpolation3("", $foo$, "-", $bar$, "-", $baz$, "")); + $r3$.ɵɵnextContext(); + const $bar$ = $r3$.ɵɵreference(4); + $r3$.ɵɵnextContext(); + const $foo$ = $r3$.ɵɵreference(1); + const $baz$ = $r3$.ɵɵreference(5); + $r3$.ɵɵselect(1); + $r3$.ɵɵtextBinding(1, $r3$.ɵɵinterpolation3("", $foo$, "-", $bar$, "-", $baz$, "")); } } function MyComponent_div_3_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δtext(1); - $r3$.Δtemplate(2, MyComponent_div_3_span_2_Template, 2, 3, "span", $c2$); - $r3$.Δelement(3, "span", null, $c4$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵtext(1); + $r3$.ɵɵtemplate(2, MyComponent_div_3_span_2_Template, 2, 3, "span", $c2$); + $r3$.ɵɵelement(3, "span", null, $c4$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - const $bar$ = $r3$.Δreference(4); - $r3$.ΔnextContext(); - const $foo$ = $r3$.Δreference(1); - $r3$.Δselect(1); - $r3$.ΔtextBinding(1, $r3$.Δinterpolation2(" ", $foo$, "-", $bar$, " ")); + const $bar$ = $r3$.ɵɵreference(4); + $r3$.ɵɵnextContext(); + const $foo$ = $r3$.ɵɵreference(1); + $r3$.ɵɵselect(1); + $r3$.ɵɵtextBinding(1, $r3$.ɵɵinterpolation2(" ", $foo$, "-", $bar$, " ")); } } … - MyComponent.ngComponentDef = $r3$.ΔdefineComponent({ + MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({ type: MyComponent, selectors: [["my-component"]], factory: function MyComponent_Factory(t) { return new (t || MyComponent)(); }, @@ -2275,15 +2275,15 @@ describe('compiler compliance', () => { vars: 1, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.Δelement(0, "div", null, $c1$); - $r3$.Δtext(2); - $r3$.Δtemplate(3, MyComponent_div_3_Template, 5, 2, "div", $c2$); - $r3$.Δelement(4, "div", null, $c3$); + $r3$.ɵɵelement(0, "div", null, $c1$); + $r3$.ɵɵtext(2); + $r3$.ɵɵtemplate(3, MyComponent_div_3_Template, 5, 2, "div", $c2$); + $r3$.ɵɵelement(4, "div", null, $c3$); } if (rf & 2) { - const $foo$ = $r3$.Δreference(1); - $r3$.Δselect(2); - $r3$.ΔtextBinding(2, $r3$.Δinterpolation1(" ", $foo$, " ")); + const $foo$ = $r3$.ɵɵreference(1); + $r3$.ɵɵselect(2); + $r3$.ɵɵtextBinding(2, $r3$.ɵɵinterpolation1(" ", $foo$, " ")); } }, directives:[IfDirective], @@ -2328,40 +2328,40 @@ describe('compiler compliance', () => { function MyComponent_div_0_span_3_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$ = $i0$.ΔnextContext().$implicit; - const $foo$ = $i0$.Δreference(2); - $r3$.Δselect(1); - $i0$.ΔtextBinding(1, $i0$.Δinterpolation2(" ", $foo$, " - ", $item$, " ")); + const $item$ = $i0$.ɵɵnextContext().$implicit; + const $foo$ = $i0$.ɵɵreference(2); + $r3$.ɵɵselect(1); + $i0$.ɵɵtextBinding(1, $i0$.ɵɵinterpolation2(" ", $foo$, " - ", $item$, " ")); } } function MyComponent_div_0_Template(rf, ctx) { if (rf & 1) { - $i0$.ΔelementStart(0, "div"); - $i0$.Δelement(1, "div", null, $c1$); - $i0$.Δtemplate(3, MyComponent_div_0_span_3_Template, 2, 2, "span", $c2$); - $i0$.ΔelementEnd(); + $i0$.ɵɵelementStart(0, "div"); + $i0$.ɵɵelement(1, "div", null, $c1$); + $i0$.ɵɵtemplate(3, MyComponent_div_0_span_3_Template, 2, 2, "span", $c2$); + $i0$.ɵɵelementEnd(); } if (rf & 2) { - const $app$ = $i0$.ΔnextContext(); - $r3$.Δselect(3); - $i0$.ΔelementProperty(3, "ngIf", $i0$.Δbind($app$.showing)); + const $app$ = $i0$.ɵɵnextContext(); + $r3$.ɵɵselect(3); + $i0$.ɵɵelementProperty(3, "ngIf", $i0$.ɵɵbind($app$.showing)); } } // ... template:function MyComponent_Template(rf, ctx){ if (rf & 1) { - $i0$.Δtemplate(0, MyComponent_div_0_Template, 4, 1, "div", $c0$); + $i0$.ɵɵtemplate(0, MyComponent_div_0_Template, 4, 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)); } }`; @@ -2416,12 +2416,12 @@ describe('compiler compliance', () => { it('should gen hooks with a few simple components', () => { const LifecycleCompDefinition = ` - LifecycleComp.ngComponentDef = $r3$.ΔdefineComponent({ + LifecycleComp.ngComponentDef = $r3$.ɵɵdefineComponent({ type: LifecycleComp, selectors: [["lifecycle-comp"]], factory: function LifecycleComp_Factory(t) { return new (t || LifecycleComp)(); }, inputs: {nameMin: ["name", "nameMin"]}, - features: [$r3$.ΔNgOnChangesFeature()], + features: [$r3$.ɵɵNgOnChangesFeature()], consts: 0, vars: 0, template: function LifecycleComp_Template(rf, ctx) {}, @@ -2429,7 +2429,7 @@ describe('compiler compliance', () => { });`; const SimpleLayoutDefinition = ` - SimpleLayout.ngComponentDef = $r3$.ΔdefineComponent({ + SimpleLayout.ngComponentDef = $r3$.ɵɵdefineComponent({ type: SimpleLayout, selectors: [["simple-layout"]], factory: function SimpleLayout_Factory(t) { return new (t || SimpleLayout)(); }, @@ -2437,14 +2437,14 @@ describe('compiler compliance', () => { vars: 2, template: function SimpleLayout_Template(rf, ctx) { if (rf & 1) { - $r3$.Δelement(0, "lifecycle-comp", $e0_attrs$); - $r3$.Δelement(1, "lifecycle-comp", $e1_attrs$); + $r3$.ɵɵelement(0, "lifecycle-comp", $e0_attrs$); + $r3$.ɵɵelement(1, "lifecycle-comp", $e1_attrs$); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔelementProperty(0, "name", $r3$.Δbind(ctx.name1)); - $r3$.Δselect(1); - $r3$.ΔelementProperty(1, "name", $r3$.Δbind(ctx.name2)); + $r3$.ɵɵselect(0); + $r3$.ɵɵelementProperty(0, "name", $r3$.ɵɵbind(ctx.name1)); + $r3$.ɵɵselect(1); + $r3$.ɵɵelementProperty(1, "name", $r3$.ɵɵbind(ctx.name2)); } }, directives: [LifecycleComp], @@ -2539,13 +2539,13 @@ describe('compiler compliance', () => { // TODO(benlesh): Enforce this when the directives are specified const ForDirectiveDefinition = ` - ForOfDirective.ngDirectiveDef = $r3$.ΔdefineDirective({ + ForOfDirective.ngDirectiveDef = $r3$.ɵɵdefineDirective({ type: ForOfDirective, selectors: [["", "forOf", ""]], factory: function ForOfDirective_Factory(t) { - return new (t || ForOfDirective)($r3$.ΔdirectiveInject(ViewContainerRef), $r3$.ΔdirectiveInject(TemplateRef)); + return new (t || ForOfDirective)($r3$.ɵɵdirectiveInject(ViewContainerRef), $r3$.ɵɵdirectiveInject(TemplateRef)); }, - features: [$r3$.ΔNgOnChangesFeature()], + features: [$r3$.ɵɵNgOnChangesFeature()], inputs: {forOf: "forOf"} }); `; @@ -2554,14 +2554,14 @@ describe('compiler compliance', () => { const $t1_attrs$ = [${AttributeMarker.Template}, "for", "forOf"]; function MyComponent__svg_g_1_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔnamespaceSVG(); - $r3$.ΔelementStart(0,"g"); - $r3$.Δelement(1,"circle"); - $r3$.ΔelementEnd(); + $r3$.ɵɵnamespaceSVG(); + $r3$.ɵɵelementStart(0,"g"); + $r3$.ɵɵelement(1,"circle"); + $r3$.ɵɵelementEnd(); } } … - MyComponent.ngComponentDef = $r3$.ΔdefineComponent({ + MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({ type: MyComponent, selectors: [["my-component"]], factory: function MyComponent_Factory(t) { return new (t || MyComponent)(); }, @@ -2569,14 +2569,14 @@ describe('compiler compliance', () => { vars: 1, template: function MyComponent_Template(rf, ctx){ if (rf & 1) { - $r3$.ΔnamespaceSVG(); - $r3$.ΔelementStart(0,"svg"); - $r3$.Δtemplate(1, MyComponent__svg_g_1_Template, 2, 0, "g", $t1_attrs$); - $r3$.ΔelementEnd(); + $r3$.ɵɵnamespaceSVG(); + $r3$.ɵɵelementStart(0,"svg"); + $r3$.ɵɵtemplate(1, MyComponent__svg_g_1_Template, 2, 0, "g", $t1_attrs$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(1); - $r3$.ΔelementProperty(1,"forOf",$r3$.Δbind(ctx.items)); + $r3$.ɵɵselect(1); + $r3$.ɵɵelementProperty(1,"forOf",$r3$.ɵɵbind(ctx.items)); } }, directives: function() { return [ForOfDirective]; }, @@ -2618,13 +2618,13 @@ describe('compiler compliance', () => { // TODO(chuckj): Enforce this when the directives are specified const ForDirectiveDefinition = ` - ForOfDirective.ngDirectiveDef = $r3$.ΔdefineDirective({ + ForOfDirective.ngDirectiveDef = $r3$.ɵɵdefineDirective({ type: ForOfDirective, selectors: [["", "forOf", ""]], factory: function ForOfDirective_Factory(t) { - return new (t || ForOfDirective)($r3$.ΔdirectiveInject(ViewContainerRef), $r3$.ΔdirectiveInject(TemplateRef)); + return new (t || ForOfDirective)($r3$.ɵɵdirectiveInject(ViewContainerRef), $r3$.ɵɵdirectiveInject(TemplateRef)); }, - features: [$r3$.ΔNgOnChangesFeature()], + features: [$r3$.ɵɵNgOnChangesFeature()], inputs: {forOf: "forOf"} }); `; @@ -2633,18 +2633,18 @@ describe('compiler compliance', () => { const $t1_attrs$ = [${AttributeMarker.Template}, "for", "forOf"]; function MyComponent_li_1_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "li"); - $r3$.Δtext(1); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "li"); + $r3$.ɵɵtext(1); + $r3$.ɵɵelementEnd(); } if (rf & 2) { const $item$ = ctx.$implicit; - $r3$.Δselect(1); - $r3$.ΔtextBinding(1, $r3$.Δinterpolation1("", $item$.name, "")); + $r3$.ɵɵselect(1); + $r3$.ɵɵtextBinding(1, $r3$.ɵɵinterpolation1("", $item$.name, "")); } } … - MyComponent.ngComponentDef = $r3$.ΔdefineComponent({ + MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({ type: MyComponent, selectors: [["my-component"]], factory: function MyComponent_Factory(t) { return new (t || MyComponent)(); }, @@ -2652,13 +2652,13 @@ describe('compiler compliance', () => { vars: 1, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "ul"); - $r3$.Δtemplate(1, MyComponent_li_1_Template, 2, 1, "li", $t1_attrs$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "ul"); + $r3$.ɵɵtemplate(1, MyComponent_li_1_Template, 2, 1, "li", $t1_attrs$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(1); - $r3$.ΔelementProperty(1, "forOf", $r3$.Δbind(ctx.items)); + $r3$.ɵɵselect(1); + $r3$.ɵɵelementProperty(1, "forOf", $r3$.ɵɵbind(ctx.items)); } }, directives: function() { return [ForOfDirective]; }, @@ -2715,40 +2715,40 @@ describe('compiler compliance', () => { const $t4_attrs$ = [${AttributeMarker.Template}, "for", "forOf"]; function MyComponent_li_1_li_4_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "li"); - $r3$.Δtext(1); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "li"); + $r3$.ɵɵtext(1); + $r3$.ɵɵelementEnd(); } if (rf & 2) { const $info$ = ctx.$implicit; - const $item$ = $r3$.ΔnextContext().$implicit; - $r3$.Δselect(1); - $r3$.ΔtextBinding(1, $r3$.Δinterpolation2(" ", $item$.name, ": ", $info$.description, " ")); + const $item$ = $r3$.ɵɵnextContext().$implicit; + $r3$.ɵɵselect(1); + $r3$.ɵɵtextBinding(1, $r3$.ɵɵinterpolation2(" ", $item$.name, ": ", $info$.description, " ")); } } function MyComponent_li_1_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "li"); - $r3$.ΔelementStart(1, "div"); - $r3$.Δtext(2); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(3, "ul"); - $r3$.Δtemplate(4, MyComponent_li_1_li_4_Template, 2, 2, "li", $t4_attrs$); - $r3$.ΔelementEnd(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "li"); + $r3$.ɵɵelementStart(1, "div"); + $r3$.ɵɵtext(2); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(3, "ul"); + $r3$.ɵɵtemplate(4, MyComponent_li_1_li_4_Template, 2, 2, "li", $t4_attrs$); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementEnd(); } if (rf & 2) { const $item$ = ctx.$implicit; - $r3$.Δselect(2); - $r3$.ΔtextBinding(2, $r3$.Δinterpolation1("", IDENT.name, "")); - $r3$.Δselect(4); - $r3$.ΔelementProperty(4, "forOf", $r3$.Δbind(IDENT.infos)); + $r3$.ɵɵselect(2); + $r3$.ɵɵtextBinding(2, $r3$.ɵɵinterpolation1("", IDENT.name, "")); + $r3$.ɵɵselect(4); + $r3$.ɵɵelementProperty(4, "forOf", $r3$.ɵɵbind(IDENT.infos)); } } … - MyComponent.ngComponentDef = $r3$.ΔdefineComponent({ + MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({ type: MyComponent, selectors: [["my-component"]], factory: function MyComponent_Factory(t) { return new (t || MyComponent)(); }, @@ -2756,13 +2756,13 @@ describe('compiler compliance', () => { vars: 1, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "ul"); - $r3$.Δtemplate(1, MyComponent_li_1_Template, 5, 2, "li", $c1$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "ul"); + $r3$.ɵɵtemplate(1, MyComponent_li_1_Template, 5, 2, "li", $c1$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(1); - $r3$.ΔelementProperty(1, "forOf", $r3$.Δbind(ctx.items)); + $r3$.ɵɵselect(1); + $r3$.ɵɵelementProperty(1, "forOf", $r3$.ɵɵbind(ctx.items)); } }, directives: function () { return [ForOfDirective]; }, @@ -2866,7 +2866,7 @@ describe('compiler compliance', () => { // SomeDirective definition should be: const SomeDirectiveDefinition = ` - SomeDirective.ngDirectiveDef = $r3$.ΔdefineDirective({ + SomeDirective.ngDirectiveDef = $r3$.ɵɵdefineDirective({ type: SomeDirective, selectors: [["", "some-directive", ""]], factory: function SomeDirective_Factory(t) {return new (t || SomeDirective)(); }, @@ -2912,7 +2912,7 @@ describe('compiler compliance', () => { }; const expectedOutput = ` // ... - BaseClass.ngBaseDef = i0.ΔdefineBase({ + BaseClass.ngBaseDef = i0.ɵɵdefineBase({ inputs: { input1: "input1", input2: ["alias2", "input2"] @@ -2958,7 +2958,7 @@ describe('compiler compliance', () => { }; const expectedOutput = ` // ... - BaseClass.ngBaseDef = i0.ΔdefineBase({ + BaseClass.ngBaseDef = i0.ɵɵdefineBase({ outputs: { output1: "output1", output2: "output2" @@ -3010,7 +3010,7 @@ describe('compiler compliance', () => { }; const expectedOutput = ` // ... - BaseClass.ngBaseDef = i0.ΔdefineBase({ + BaseClass.ngBaseDef = i0.ɵɵdefineBase({ inputs: { input1: "input1", input2: ["whatever", "input2"] diff --git a/packages/compiler-cli/test/compliance/r3_view_compiler_binding_spec.ts b/packages/compiler-cli/test/compliance/r3_view_compiler_binding_spec.ts index 93087ae452..0b3189a2ca 100644 --- a/packages/compiler-cli/test/compliance/r3_view_compiler_binding_spec.ts +++ b/packages/compiler-cli/test/compliance/r3_view_compiler_binding_spec.ts @@ -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"); } } `; diff --git a/packages/compiler-cli/test/compliance/r3_view_compiler_di_spec.ts b/packages/compiler-cli/test/compliance/r3_view_compiler_di_spec.ts index 6e3fd1d315..f68c5a037e 100644 --- a/packages/compiler-cli/test/compliance/r3_view_compiler_di_spec.ts +++ b/packages/compiler-cli/test/compliance/r3_view_compiler_di_spec.ts @@ -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) ); }`; diff --git a/packages/compiler-cli/test/compliance/r3_view_compiler_directives_spec.ts b/packages/compiler-cli/test/compliance/r3_view_compiler_directives_spec.ts index 4958e311ec..6632fdb85a 100644 --- a/packages/compiler-cli/test/compliance/r3_view_compiler_directives_spec.ts +++ b/packages/compiler-cli/test/compliance/r3_view_compiler_directives_spec.ts @@ -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(); } }, … diff --git a/packages/compiler-cli/test/compliance/r3_view_compiler_i18n_spec.ts b/packages/compiler-cli/test/compliance/r3_view_compiler_i18n_spec.ts index d73943213f..9653632481 100644 --- a/packages/compiler-cli/test/compliance/r3_view_compiler_i18n_spec.ts +++ b/packages/compiler-cli/test/compliance/r3_view_compiler_i18n_spec.ts @@ -195,7 +195,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_idA$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("Content A"); + $I18N_0$ = $r3$.ɵɵi18nLocalize("Content A"); } var $I18N_1$; if (ngI18nClosureMode) { @@ -207,7 +207,7 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_EXTERNAL_idB$$APP_SPEC_TS_1$; } else { - $I18N_1$ = $r3$.Δi18nLocalize("Title B"); + $I18N_1$ = $r3$.ɵɵi18nLocalize("Title B"); } const $_c2$ = ["title", $I18N_1$]; var $I18N_3$; @@ -219,7 +219,7 @@ describe('i18n support in the view compiler', () => { $I18N_3$ = $MSG_EXTERNAL_4978592519614169666$$APP_SPEC_TS_3$; } else { - $I18N_3$ = $r3$.Δi18nLocalize("Title C"); + $I18N_3$ = $r3$.ɵɵi18nLocalize("Title C"); } const $_c4$ = ["title", $I18N_3$]; var $I18N_5$; @@ -232,7 +232,7 @@ describe('i18n support in the view compiler', () => { $I18N_5$ = $MSG_EXTERNAL_5200291527729162531$$APP_SPEC_TS_5$; } else { - $I18N_5$ = $r3$.Δi18nLocalize("Title D"); + $I18N_5$ = $r3$.ɵɵi18nLocalize("Title D"); } const $_c6$ = ["title", $I18N_5$]; var $I18N_7$; @@ -244,7 +244,7 @@ describe('i18n support in the view compiler', () => { $I18N_7$ = $MSG_EXTERNAL_idE$$APP_SPEC_TS_7$; } else { - $I18N_7$ = $r3$.Δi18nLocalize("Title E"); + $I18N_7$ = $r3$.ɵɵi18nLocalize("Title E"); } const $_c8$ = ["title", $I18N_7$]; var $I18N_9$; @@ -253,7 +253,7 @@ describe('i18n support in the view compiler', () => { $I18N_9$ = $MSG_EXTERNAL_idF$$APP_SPEC_TS_9$; } else { - $I18N_9$ = $r3$.Δi18nLocalize("Title F"); + $I18N_9$ = $r3$.ɵɵi18nLocalize("Title F"); } const $_c10$ = ["title", $I18N_9$]; var $I18N_11$; @@ -265,39 +265,39 @@ describe('i18n support in the view compiler', () => { $I18N_11$ = $MSG_EXTERNAL_idG$$APP_SPEC_TS_11$; } else { - $I18N_11$ = $r3$.Δi18nLocalize("Title G"); + $I18N_11$ = $r3$.ɵɵi18nLocalize("Title G"); } const $_c12$ = ["title", $I18N_11$]; … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18n(1, $I18N_0$); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(2, "div"); - $r3$.Δi18nAttributes(3, $_c2$); - $r3$.Δtext(4, "Content B"); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(5, "div"); - $r3$.Δi18nAttributes(6, $_c4$); - $r3$.Δtext(7, "Content C"); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(8, "div"); - $r3$.Δi18nAttributes(9, $_c6$); - $r3$.Δtext(10, "Content D"); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(11, "div"); - $r3$.Δi18nAttributes(12, $_c8$); - $r3$.Δtext(13, "Content E"); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(14, "div"); - $r3$.Δi18nAttributes(15, $_c10$); - $r3$.Δtext(16, "Content F"); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(17, "div"); - $r3$.Δi18nAttributes(18, $_c12$); - $r3$.Δtext(19, "Content G"); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18n(1, $I18N_0$); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(2, "div"); + $r3$.ɵɵi18nAttributes(3, $_c2$); + $r3$.ɵɵtext(4, "Content B"); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(5, "div"); + $r3$.ɵɵi18nAttributes(6, $_c4$); + $r3$.ɵɵtext(7, "Content C"); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(8, "div"); + $r3$.ɵɵi18nAttributes(9, $_c6$); + $r3$.ɵɵtext(10, "Content D"); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(11, "div"); + $r3$.ɵɵi18nAttributes(12, $_c8$); + $r3$.ɵɵtext(13, "Content E"); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(14, "div"); + $r3$.ɵɵi18nAttributes(15, $_c10$); + $r3$.ɵɵtext(16, "Content F"); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(17, "div"); + $r3$.ɵɵi18nAttributes(18, $_c12$); + $r3$.ɵɵtext(19, "Content G"); + $r3$.ɵɵelementEnd(); } } `; @@ -315,7 +315,7 @@ describe('i18n support in the view compiler', () => { … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.Δelement(0, "div", $_c0$); + $r3$.ɵɵelement(0, "div", $_c0$); } } `; @@ -340,15 +340,15 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_EXTERNAL_8809028065680254561$$APP_SPEC_TS_1$; } else { - $I18N_1$ = $r3$.Δi18nLocalize("introduction"); + $I18N_1$ = $r3$.ɵɵi18nLocalize("introduction"); } const $_c1$ = ["title", $I18N_1$]; … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div", $_c0$); - $r3$.Δi18nAttributes(1, $_c1$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div", $_c0$); + $r3$.ɵɵi18nAttributes(1, $_c1$); + $r3$.ɵɵelementEnd(); } } `; @@ -377,7 +377,7 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_EXTERNAL_5526535577705876535$$APP_SPEC_TS_1$; } else { - $I18N_1$ = $r3$.Δi18nLocalize("static text"); + $I18N_1$ = $r3$.ɵɵi18nLocalize("static text"); } var $I18N_2$; if (ngI18nClosureMode) { @@ -391,7 +391,7 @@ describe('i18n support in the view compiler', () => { $I18N_2$ = $MSG_EXTERNAL_8977039798304050198$$APP_SPEC_TS_2$; } else { - $I18N_2$ = $r3$.Δi18nLocalize("intro {$interpolation}", { + $I18N_2$ = $r3$.ɵɵi18nLocalize("intro {$interpolation}", { "interpolation": "\uFFFD0\uFFFD" }); } @@ -407,7 +407,7 @@ describe('i18n support in the view compiler', () => { $I18N_3$ = $MSG_EXTERNAL_7432761130955693041$$APP_SPEC_TS_3$; } else { - $I18N_3$ = $r3$.Δi18nLocalize("{$interpolation}", { + $I18N_3$ = $r3$.ɵɵi18nLocalize("{$interpolation}", { "interpolation": "\uFFFD0\uFFFD" }); } @@ -429,7 +429,7 @@ describe('i18n support in the view compiler', () => { $I18N_6$ = $MSG_EXTERNAL_7566208596013750546$$APP_SPEC_TS_6$; } else { - $I18N_6$ = $r3$.Δi18nLocalize("{$interpolation} and {$interpolation_1} and again {$interpolation_2}", { + $I18N_6$ = $r3$.ɵɵi18nLocalize("{$interpolation} and {$interpolation_1} and again {$interpolation_2}", { "interpolation": "\uFFFD0\uFFFD", "interpolation_1": "\uFFFD1\uFFFD", "interpolation_2": "\uFFFD2\uFFFD" }); } @@ -441,7 +441,7 @@ describe('i18n support in the view compiler', () => { $I18N_7$ = $MSG_EXTERNAL_6639222533406278123$$APP_SPEC_TS_7$; } else { - $I18N_7$ = $r3$.Δi18nLocalize("{$interpolation}", { + $I18N_7$ = $r3$.ɵɵi18nLocalize("{$interpolation}", { "interpolation": "\uFFFD0\uFFFD" }); } @@ -454,25 +454,25 @@ describe('i18n support in the view compiler', () => { vars: 8, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div", $_c0$); - $r3$.Δpipe(1, "uppercase"); - $r3$.Δi18nAttributes(2, $_c1$); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(3, "div", $_c2$); - $r3$.Δi18nAttributes(4, $_c3$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div", $_c0$); + $r3$.ɵɵpipe(1, "uppercase"); + $r3$.ɵɵi18nAttributes(2, $_c1$); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(3, "div", $_c2$); + $r3$.ɵɵi18nAttributes(4, $_c3$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.Δi18nExp($r3$.Δbind($r3$.ΔpipeBind1(1, 0, ctx.valueA))); - $r3$.Δi18nExp($r3$.Δbind(ctx.valueB)); - $r3$.Δi18nApply(2); - $r3$.Δselect(3); - $r3$.Δi18nExp($r3$.Δbind(ctx.valueA)); - $r3$.Δi18nExp($r3$.Δbind(ctx.valueB)); - $r3$.Δi18nExp($r3$.Δbind((ctx.valueA + ctx.valueB))); - $r3$.Δi18nExp($r3$.Δbind(ctx.valueC)); - $r3$.Δi18nApply(4); + $r3$.ɵɵselect(0); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($r3$.ɵɵpipeBind1(1, 0, ctx.valueA))); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.valueB)); + $r3$.ɵɵi18nApply(2); + $r3$.ɵɵselect(3); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.valueA)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.valueB)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind((ctx.valueA + ctx.valueB))); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.valueC)); + $r3$.ɵɵi18nApply(4); } } `; @@ -498,7 +498,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_8977039798304050198$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("intro {$interpolation}", { + $I18N_0$ = $r3$.ɵɵi18nLocalize("intro {$interpolation}", { "interpolation": "\uFFFD0\uFFFD" }); } @@ -506,15 +506,15 @@ describe('i18n support in the view compiler', () => { … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δpipe(1, "uppercase"); - $r3$.Δi18nAttributes(2, $_c0$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵpipe(1, "uppercase"); + $r3$.ɵɵi18nAttributes(2, $_c0$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.Δi18nExp($r3$.Δbind($r3$.ΔpipeBind1(1, 0, ctx.valueA))); - $r3$.Δi18nApply(2); + $r3$.ɵɵselect(0); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($r3$.ɵɵpipeBind1(1, 0, ctx.valueA))); + $r3$.ɵɵi18nApply(2); } } `; @@ -542,25 +542,25 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_EXTERNAL_8538466649243975456$$APP_SPEC_TS__1$; } else { - $I18N_1$ = $r3$.Δi18nLocalize("different scope {$interpolation}", { + $I18N_1$ = $r3$.ɵɵi18nLocalize("different scope {$interpolation}", { "interpolation": "\uFFFD0\uFFFD" }); } const $_c1$ = ["title", $I18N_1$]; function MyComponent_div_0_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.ΔelementStart(1, "div"); - $r3$.Δpipe(2, "uppercase"); - $r3$.Δi18nAttributes(3, $_c1$); - $r3$.ΔelementEnd(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵelementStart(1, "div"); + $r3$.ɵɵpipe(2, "uppercase"); + $r3$.ɵɵi18nAttributes(3, $_c1$); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementEnd(); } if (rf & 2) { const $outer_r1$ = ctx.$implicit; - $r3$.Δselect(1); - $r3$.Δi18nExp($r3$.Δbind($r3$.ΔpipeBind1(2, 0, $outer_r1$))); - $r3$.Δi18nApply(3); + $r3$.ɵɵselect(1); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($r3$.ɵɵpipeBind1(2, 0, $outer_r1$))); + $r3$.ɵɵi18nApply(3); } } … @@ -568,11 +568,11 @@ describe('i18n support in the view compiler', () => { vars: 1, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.Δtemplate(0, MyComponent_div_0_Template, 4, 3, "div", $_c0$); + $r3$.ɵɵtemplate(0, MyComponent_div_0_Template, 4, 3, "div", $_c0$); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔelementProperty(0, "ngForOf", $r3$.Δbind(ctx.items)); + $r3$.ɵɵselect(0); + $r3$.ɵɵelementProperty(0, "ngForOf", $r3$.ɵɵbind(ctx.items)); } } `; @@ -601,7 +601,7 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_EXTERNAL_5526535577705876535$$APP_SPEC_TS_1$; } else { - $I18N_1$ = $r3$.Δi18nLocalize("static text"); + $I18N_1$ = $r3$.ɵɵi18nLocalize("static text"); } var $I18N_2$; if (ngI18nClosureMode) { @@ -615,7 +615,7 @@ describe('i18n support in the view compiler', () => { $I18N_2$ = $MSG_EXTERNAL_8977039798304050198$$APP_SPEC_TS_2$; } else { - $I18N_2$ = $r3$.Δi18nLocalize("intro {$interpolation}", { + $I18N_2$ = $r3$.ɵɵi18nLocalize("intro {$interpolation}", { "interpolation": "\uFFFD0\uFFFD" }); } @@ -631,7 +631,7 @@ describe('i18n support in the view compiler', () => { $I18N_3$ = $MSG_EXTERNAL_7432761130955693041$$APP_SPEC_TS_3$; } else { - $I18N_3$ = $r3$.Δi18nLocalize("{$interpolation}", { + $I18N_3$ = $r3$.ɵɵi18nLocalize("{$interpolation}", { "interpolation": "\uFFFD0\uFFFD" }); } @@ -653,7 +653,7 @@ describe('i18n support in the view compiler', () => { $I18N_6$ = $MSG_EXTERNAL_7566208596013750546$$APP_SPEC_TS_6$; } else { - $I18N_6$ = $r3$.Δi18nLocalize("{$interpolation} and {$interpolation_1} and again {$interpolation_2}", { + $I18N_6$ = $r3$.ɵɵi18nLocalize("{$interpolation} and {$interpolation_1} and again {$interpolation_2}", { "interpolation": "\uFFFD0\uFFFD", "interpolation_1": "\uFFFD1\uFFFD", "interpolation_2": "\uFFFD2\uFFFD" }); } @@ -665,7 +665,7 @@ describe('i18n support in the view compiler', () => { $I18N_7$ = $MSG_EXTERNAL_6639222533406278123$$APP_SPEC_TS_7$; } else { - $I18N_7$ = $r3$.Δi18nLocalize("{$interpolation}", { + $I18N_7$ = $r3$.ɵɵi18nLocalize("{$interpolation}", { "interpolation": "\uFFFD0\uFFFD" }); } @@ -678,25 +678,25 @@ describe('i18n support in the view compiler', () => { vars: 8, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div", $_c0$); - $r3$.Δpipe(1, "uppercase"); - $r3$.Δi18nAttributes(2, $_c1$); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(3, "div", $_c2$); - $r3$.Δi18nAttributes(4, $_c3$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div", $_c0$); + $r3$.ɵɵpipe(1, "uppercase"); + $r3$.ɵɵi18nAttributes(2, $_c1$); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(3, "div", $_c2$); + $r3$.ɵɵi18nAttributes(4, $_c3$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.Δi18nExp($r3$.Δbind($r3$.ΔpipeBind1(1, 0, ctx.valueA))); - $r3$.Δi18nExp($r3$.Δbind(ctx.valueB)); - $r3$.Δi18nApply(2); - $r3$.Δselect(3); - $r3$.Δi18nExp($r3$.Δbind(ctx.valueA)); - $r3$.Δi18nExp($r3$.Δbind(ctx.valueB)); - $r3$.Δi18nExp($r3$.Δbind((ctx.valueA + ctx.valueB))); - $r3$.Δi18nExp($r3$.Δbind(ctx.valueC)); - $r3$.Δi18nApply(4); + $r3$.ɵɵselect(0); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($r3$.ɵɵpipeBind1(1, 0, ctx.valueA))); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.valueB)); + $r3$.ɵɵi18nApply(2); + $r3$.ɵɵselect(3); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.valueA)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.valueB)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind((ctx.valueA + ctx.valueB))); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.valueC)); + $r3$.ɵɵi18nApply(4); } } `; @@ -725,25 +725,25 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_EXTERNAL_8538466649243975456$$APP_SPEC_TS__1$; } else { - $I18N_1$ = $r3$.Δi18nLocalize("different scope {$interpolation}", { + $I18N_1$ = $r3$.ɵɵi18nLocalize("different scope {$interpolation}", { "interpolation": "\uFFFD0\uFFFD" }); } const $_c1$ = ["title", $I18N_1$]; function MyComponent_div_0_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.ΔelementStart(1, "div"); - $r3$.Δpipe(2, "uppercase"); - $r3$.Δi18nAttributes(3, $_c1$); - $r3$.ΔelementEnd(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵelementStart(1, "div"); + $r3$.ɵɵpipe(2, "uppercase"); + $r3$.ɵɵi18nAttributes(3, $_c1$); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementEnd(); } if (rf & 2) { const $outer_r1$ = ctx.$implicit; - $r3$.Δselect(1); - $r3$.Δi18nExp($r3$.Δbind($r3$.ΔpipeBind1(2, 0, $outer_r1$))); - $r3$.Δi18nApply(3); + $r3$.ɵɵselect(1); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($r3$.ɵɵpipeBind1(2, 0, $outer_r1$))); + $r3$.ɵɵi18nApply(3); } } … @@ -751,11 +751,11 @@ describe('i18n support in the view compiler', () => { vars: 1, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.Δtemplate(0, MyComponent_div_0_Template, 4, 3, "div", $_c0$); + $r3$.ɵɵtemplate(0, MyComponent_div_0_Template, 4, 3, "div", $_c0$); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔelementProperty(0, "ngForOf", $r3$.Δbind(ctx.items)); + $r3$.ɵɵselect(0); + $r3$.ɵɵelementProperty(0, "ngForOf", $r3$.ɵɵbind(ctx.items)); } } `; @@ -779,7 +779,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_7727043314656808423$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("Element title"); + $I18N_0$ = $r3$.ɵɵi18nLocalize("Element title"); } const $_c1$ = ["title", $I18N_0$]; var $I18N_2$; @@ -788,15 +788,15 @@ describe('i18n support in the view compiler', () => { $I18N_2$ = $MSG_EXTERNAL_4969674997806975147$$APP_SPEC_TS_2$; } else { - $I18N_2$ = $r3$.Δi18nLocalize("Some content"); + $I18N_2$ = $r3$.ɵɵi18nLocalize("Some content"); } … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18nAttributes(1, $_c1$); - $r3$.Δi18n(2, $I18N_2$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18nAttributes(1, $_c1$); + $r3$.ɵɵi18n(2, $I18N_2$); + $r3$.ɵɵelementEnd(); } } `; @@ -818,7 +818,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_ID_WITH_INVALID_CHARS$$APP_SPEC_TS_1$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("Element title"); + $I18N_0$ = $r3$.ɵɵi18nLocalize("Element title"); } const $_c1$ = ["title", $I18N_0$]; var $I18N_2$; @@ -827,7 +827,7 @@ describe('i18n support in the view compiler', () => { $I18N_2$ = $MSG_EXTERNAL_ID_WITH_INVALID_CHARS_2$$APP_SPEC_TS_4$; } else { - $I18N_2$ = $r3$.Δi18nLocalize(" Some content "); + $I18N_2$ = $r3$.ɵɵi18nLocalize(" Some content "); } … `; @@ -853,9 +853,9 @@ describe('i18n support in the view compiler', () => { const output = String.raw ` 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"); } } `; @@ -879,7 +879,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_4924931801512133405$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("Some text 'with single quotes', \"with double quotes\" and without quotes."); + $I18N_0$ = $r3$.ɵɵi18nLocalize("Some text 'with single quotes', \"with double quotes\" and without quotes."); } `; @@ -902,7 +902,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_4890179241114413722$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("My i18n block #1"); + $I18N_0$ = $r3$.ɵɵi18nLocalize("My i18n block #1"); } var $I18N_1$; if (ngI18nClosureMode) { @@ -910,7 +910,7 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_EXTERNAL_2413150872298537152$$APP_SPEC_TS_1$; } else { - $I18N_1$ = $r3$.Δi18nLocalize("My i18n block #2"); + $I18N_1$ = $r3$.ɵɵi18nLocalize("My i18n block #2"); } var $I18N_2$; if (ngI18nClosureMode) { @@ -918,26 +918,26 @@ describe('i18n support in the view compiler', () => { $I18N_2$ = $MSG_EXTERNAL_5023003143537152794$$APP_SPEC_TS_2$; } else { - $I18N_2$ = $r3$.Δi18nLocalize("My i18n block #3"); + $I18N_2$ = $r3$.ɵɵi18nLocalize("My i18n block #3"); } … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18n(1, $I18N_0$); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(2, "div"); - $r3$.Δtext(3, "My non-i18n block #1"); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(4, "div"); - $r3$.Δi18n(5, $I18N_1$); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(6, "div"); - $r3$.Δtext(7, "My non-i18n block #2"); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(8, "div"); - $r3$.Δi18n(9, $I18N_2$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18n(1, $I18N_0$); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(2, "div"); + $r3$.ɵɵtext(3, "My non-i18n block #1"); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(4, "div"); + $r3$.ɵɵi18n(5, $I18N_1$); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(6, "div"); + $r3$.ɵɵtext(7, "My non-i18n block #2"); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(8, "div"); + $r3$.ɵɵi18n(9, $I18N_2$); + $r3$.ɵɵelementEnd(); } } `; @@ -959,7 +959,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_2817319788724342848$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("Some value: {$phA}", { + $I18N_0$ = $r3$.ɵɵi18nLocalize("Some value: {$phA}", { "phA": "\uFFFD0\uFFFD" }); } @@ -968,14 +968,14 @@ describe('i18n support in the view compiler', () => { vars: 1, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18n(1, $I18N_0$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18n(1, $I18N_0$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(1); - $r3$.Δi18nExp($r3$.Δbind(ctx.valueA)); - $r3$.Δi18nApply(1); + $r3$.ɵɵselect(1); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.valueA)); + $r3$.ɵɵi18nApply(1); } } `; @@ -997,21 +997,21 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_6749967533321674787$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("{$interpolation}", { + $I18N_0$ = $r3$.ɵɵi18nLocalize("{$interpolation}", { "interpolation": "\uFFFD0\uFFFD" }); } … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18n(1, $I18N_0$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18n(1, $I18N_0$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(1); - $r3$.Δi18nExp($r3$.Δbind(ctx.valueA)); - $r3$.Δi18nApply(1); + $r3$.ɵɵselect(1); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.valueA)); + $r3$.ɵɵi18nApply(1); } } `; @@ -1036,7 +1036,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_1482713963707913023$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize(" {$interpolation} {$interpolation_1} ", { + $I18N_0$ = $r3$.ɵɵi18nLocalize(" {$interpolation} {$interpolation_1} ", { "interpolation": "\uFFFD0\uFFFD", "interpolation_1": "\uFFFD1\uFFFD" }); @@ -1044,16 +1044,16 @@ describe('i18n support in the view compiler', () => { … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18n(1, $I18N_0$); - $r3$.Δpipe(2, "async"); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18n(1, $I18N_0$); + $r3$.ɵɵpipe(2, "async"); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(1); - $r3$.Δi18nExp($r3$.Δbind($r3$.ΔpipeBind1(2, 2, ctx.valueA))); - $r3$.Δi18nExp($r3$.Δbind(((ctx.valueA == null) ? null : ((ctx.valueA.a == null) ? null : ctx.valueA.a.b)))); - $r3$.Δi18nApply(1); + $r3$.ɵɵselect(1); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($r3$.ɵɵpipeBind1(2, 2, ctx.valueA))); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(((ctx.valueA == null) ? null : ((ctx.valueA.a == null) ? null : ctx.valueA.a.b)))); + $r3$.ɵɵi18nApply(1); } } `; @@ -1076,7 +1076,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_572579892698764378$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("My i18n block #{$interpolation}", { + $I18N_0$ = $r3$.ɵɵi18nLocalize("My i18n block #{$interpolation}", { "interpolation": "\uFFFD0\uFFFD" }); } @@ -1088,7 +1088,7 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_EXTERNAL_609623417156596326$$APP_SPEC_TS_1$; } else { - $I18N_1$ = $r3$.Δi18nLocalize("My i18n block #{$interpolation}", { + $I18N_1$ = $r3$.ɵɵi18nLocalize("My i18n block #{$interpolation}", { "interpolation": "\uFFFD0\uFFFD" }); } @@ -1100,7 +1100,7 @@ describe('i18n support in the view compiler', () => { $I18N_2$ = $MSG_EXTERNAL_3998119318957372120$$APP_SPEC_TS_2$; } else { - $I18N_2$ = $r3$.Δi18nLocalize("My i18n block #{$interpolation}", { + $I18N_2$ = $r3$.ɵɵi18nLocalize("My i18n block #{$interpolation}", { "interpolation": "\uFFFD0\uFFFD" }); } @@ -1109,27 +1109,27 @@ describe('i18n support in the view compiler', () => { vars: 5, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18n(1, $I18N_0$); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(2, "div"); - $r3$.Δi18n(3, $I18N_1$); - $r3$.Δpipe(4, "uppercase"); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(5, "div"); - $r3$.Δi18n(6, $I18N_2$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18n(1, $I18N_0$); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(2, "div"); + $r3$.ɵɵi18n(3, $I18N_1$); + $r3$.ɵɵpipe(4, "uppercase"); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(5, "div"); + $r3$.ɵɵi18n(6, $I18N_2$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(1); - $r3$.Δi18nExp($r3$.Δbind(ctx.one)); - $r3$.Δi18nApply(1); - $r3$.Δselect(3); - $r3$.Δi18nExp($r3$.Δbind($r3$.ΔpipeBind1(4, 3, ctx.two))); - $r3$.Δi18nApply(3); - $r3$.Δselect(6); - $r3$.Δi18nExp($r3$.Δbind(((ctx.three + ctx.four) + ctx.five))); - $r3$.Δi18nApply(6); + $r3$.ɵɵselect(1); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.one)); + $r3$.ɵɵi18nApply(1); + $r3$.ɵɵselect(3); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($r3$.ɵɵpipeBind1(4, 3, ctx.two))); + $r3$.ɵɵi18nApply(3); + $r3$.ɵɵselect(6); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(((ctx.three + ctx.four) + ctx.five))); + $r3$.ɵɵi18nApply(6); } } `; @@ -1166,7 +1166,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_7905233330103651696$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize(" My i18n block #{$interpolation} {$startTagSpan}Plain text in nested element{$closeTagSpan}", { + $I18N_0$ = $r3$.ɵɵi18nLocalize(" My i18n block #{$interpolation} {$startTagSpan}Plain text in nested element{$closeTagSpan}", { "interpolation": "\uFFFD0\uFFFD", "startTagSpan": "\uFFFD#2\uFFFD", "closeTagSpan": "\uFFFD/#2\uFFFD" @@ -1185,7 +1185,7 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_EXTERNAL_5788821996131681377$$APP_SPEC_TS_1$; } else { - $I18N_1$ = $r3$.Δi18nLocalize(" My i18n block #{$interpolation} {$startTagDiv}{$startTagDiv}{$startTagSpan} More bindings in more nested element: {$interpolation_1} {$closeTagSpan}{$closeTagDiv}{$closeTagDiv}", { + $I18N_1$ = $r3$.ɵɵi18nLocalize(" My i18n block #{$interpolation} {$startTagDiv}{$startTagDiv}{$startTagSpan} More bindings in more nested element: {$interpolation_1} {$closeTagSpan}{$closeTagDiv}{$closeTagDiv}", { "interpolation": "\uFFFD0\uFFFD", "startTagDiv": "[\uFFFD#6\uFFFD|\uFFFD#7\uFFFD]", "startTagSpan": "\uFFFD#8\uFFFD", @@ -1194,36 +1194,36 @@ describe('i18n support in the view compiler', () => { "closeTagDiv": "[\uFFFD/#7\uFFFD|\uFFFD/#6\uFFFD]" }); } - $I18N_1$ = $r3$.Δi18nPostprocess($I18N_1$); + $I18N_1$ = $r3$.ɵɵi18nPostprocess($I18N_1$); … consts: 9, vars: 5, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18nStart(1, $I18N_0$); - $r3$.Δelement(2, "span"); - $r3$.Δi18nEnd(); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(3, "div"); - $r3$.Δi18nStart(4, $I18N_1$); - $r3$.Δpipe(5, "uppercase"); - $r3$.ΔelementStart(6, "div"); - $r3$.ΔelementStart(7, "div"); - $r3$.Δelement(8, "span"); - $r3$.ΔelementEnd(); - $r3$.ΔelementEnd(); - $r3$.Δi18nEnd(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18nStart(1, $I18N_0$); + $r3$.ɵɵelement(2, "span"); + $r3$.ɵɵi18nEnd(); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(3, "div"); + $r3$.ɵɵi18nStart(4, $I18N_1$); + $r3$.ɵɵpipe(5, "uppercase"); + $r3$.ɵɵelementStart(6, "div"); + $r3$.ɵɵelementStart(7, "div"); + $r3$.ɵɵelement(8, "span"); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵi18nEnd(); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(1); - $r3$.Δi18nExp($r3$.Δbind(ctx.one)); - $r3$.Δi18nApply(1); - $r3$.Δselect(4); - $r3$.Δi18nExp($r3$.Δbind($r3$.ΔpipeBind1(5, 3, ctx.two))); - $r3$.Δi18nExp($r3$.Δbind(ctx.nestedInBlockTwo)); - $r3$.Δi18nApply(4); + $r3$.ɵɵselect(1); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.one)); + $r3$.ɵɵi18nApply(1); + $r3$.ɵɵselect(4); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($r3$.ɵɵpipeBind1(5, 3, ctx.two))); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.nestedInBlockTwo)); + $r3$.ɵɵi18nApply(4); } } `; @@ -1257,7 +1257,7 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_EXTERNAL_4782264005467235841$$APP_SPEC_TS_1$; } else { - $I18N_1$ = $r3$.Δi18nLocalize("Span title {$interpolation} and {$interpolation_1}", { + $I18N_1$ = $r3$.ɵɵi18nLocalize("Span title {$interpolation} and {$interpolation_1}", { "interpolation": "\uFFFD0\uFFFD", "interpolation_1": "\uFFFD1\uFFFD" }); @@ -1273,7 +1273,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_4446430594603971069$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize(" My i18n block #1 with value: {$interpolation} {$startTagSpan} Plain text in nested element (block #1) {$closeTagSpan}", { + $I18N_0$ = $r3$.ɵɵi18nLocalize(" My i18n block #1 with value: {$interpolation} {$startTagSpan} Plain text in nested element (block #1) {$closeTagSpan}", { "interpolation": "\uFFFD0\uFFFD", "startTagSpan": "\uFFFD#2\uFFFD", "closeTagSpan": "\uFFFD/#2\uFFFD" @@ -1287,7 +1287,7 @@ describe('i18n support in the view compiler', () => { $I18N_4$ = $MSG_EXTERNAL_2719594642740200058$$APP_SPEC_TS_4$; } else { - $I18N_4$ = $r3$.Δi18nLocalize("Span title {$interpolation}", { + $I18N_4$ = $r3$.ɵɵi18nLocalize("Span title {$interpolation}", { "interpolation": "\uFFFD0\uFFFD" }); } @@ -1302,7 +1302,7 @@ describe('i18n support in the view compiler', () => { $I18N_3$ = $MSG_EXTERNAL_2778714953278357902$$APP_SPEC_TS_3$; } else { - $I18N_3$ = $r3$.Δi18nLocalize(" My i18n block #2 with value {$interpolation} {$startTagSpan} Plain text in nested element (block #2) {$closeTagSpan}", { + $I18N_3$ = $r3$.ɵɵi18nLocalize(" My i18n block #2 with value {$interpolation} {$startTagSpan} Plain text in nested element (block #2) {$closeTagSpan}", { "interpolation": "\uFFFD0\uFFFD", "startTagSpan": "\uFFFD#7\uFFFD", "closeTagSpan": "\uFFFD/#7\uFFFD" @@ -1313,34 +1313,34 @@ describe('i18n support in the view compiler', () => { vars: 7, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18nStart(1, $I18N_0$); - $r3$.ΔelementStart(2, "span"); - $r3$.Δi18nAttributes(3, $_c2$); - $r3$.ΔelementEnd(); - $r3$.Δi18nEnd(); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(4, "div"); - $r3$.Δi18nStart(5, $I18N_3$); - $r3$.Δpipe(6, "uppercase"); - $r3$.ΔelementStart(7, "span"); - $r3$.Δi18nAttributes(8, $_c5$); - $r3$.ΔelementEnd(); - $r3$.Δi18nEnd(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18nStart(1, $I18N_0$); + $r3$.ɵɵelementStart(2, "span"); + $r3$.ɵɵi18nAttributes(3, $_c2$); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵi18nEnd(); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(4, "div"); + $r3$.ɵɵi18nStart(5, $I18N_3$); + $r3$.ɵɵpipe(6, "uppercase"); + $r3$.ɵɵelementStart(7, "span"); + $r3$.ɵɵi18nAttributes(8, $_c5$); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵi18nEnd(); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(2); - $r3$.Δi18nExp($r3$.Δbind(ctx.valueB)); - $r3$.Δi18nExp($r3$.Δbind(ctx.valueC)); - $r3$.Δi18nApply(3); - $r3$.Δi18nExp($r3$.Δbind(ctx.valueA)); - $r3$.Δi18nApply(1); - $r3$.Δselect(7); - $r3$.Δi18nExp($r3$.Δbind(ctx.valueE)); - $r3$.Δi18nApply(8); - $r3$.Δi18nExp($r3$.Δbind($r3$.ΔpipeBind1(6, 5, ctx.valueD))); - $r3$.Δi18nApply(5); + $r3$.ɵɵselect(2); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.valueB)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.valueC)); + $r3$.ɵɵi18nApply(3); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.valueA)); + $r3$.ɵɵi18nApply(1); + $r3$.ɵɵselect(7); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.valueE)); + $r3$.ɵɵi18nApply(8); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($r3$.ɵɵpipeBind1(6, 5, ctx.valueD))); + $r3$.ɵɵi18nApply(5); } } `; @@ -1376,7 +1376,7 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_EXTERNAL_7679414751795588050$$APP_SPEC_TS__1$; } else { - $I18N_1$ = $r3$.Δi18nLocalize(" Some other content {$interpolation} {$startTagDiv} More nested levels with bindings {$interpolation_1} {$closeTagDiv}", { + $I18N_1$ = $r3$.ɵɵi18nLocalize(" Some other content {$interpolation} {$startTagDiv} More nested levels with bindings {$interpolation_1} {$closeTagDiv}", { "interpolation": "\uFFFD0\uFFFD", "startTagDiv": "\uFFFD#3\uFFFD", "interpolation_1": "\uFFFD1\uFFFD", @@ -1386,21 +1386,21 @@ describe('i18n support in the view compiler', () => { … function MyComponent_div_2_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.ΔelementStart(1, "div"); - $r3$.Δi18nStart(2, $I18N_1$); - $r3$.Δelement(3, "div"); - $r3$.Δpipe(4, "uppercase"); - $r3$.Δi18nEnd(); - $r3$.ΔelementEnd(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵelementStart(1, "div"); + $r3$.ɵɵi18nStart(2, $I18N_1$); + $r3$.ɵɵelement(3, "div"); + $r3$.ɵɵpipe(4, "uppercase"); + $r3$.ɵɵi18nEnd(); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - const $ctx_r0$ = $r3$.ΔnextContext(); - $r3$.Δselect(2); - $r3$.Δi18nExp($r3$.Δbind($ctx_r0$.valueA)); - $r3$.Δi18nExp($r3$.Δbind($r3$.ΔpipeBind1(4, 2, $ctx_r0$.valueB))); - $r3$.Δi18nApply(2); + const $ctx_r0$ = $r3$.ɵɵnextContext(); + $r3$.ɵɵselect(2); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($ctx_r0$.valueA)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($r3$.ɵɵpipeBind1(4, 2, $ctx_r0$.valueB))); + $r3$.ɵɵi18nApply(2); } } … @@ -1408,14 +1408,14 @@ describe('i18n support in the view compiler', () => { vars: 1, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δtext(1, " Some content "); - $r3$.Δtemplate(2, MyComponent_div_2_Template, 5, 4, "div", $_c0$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵtext(1, " Some content "); + $r3$.ɵɵtemplate(2, MyComponent_div_2_Template, 5, 4, "div", $_c0$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(2); - $r3$.ΔelementProperty(2, "ngIf", $r3$.Δbind(ctx.visible)); + $r3$.ɵɵselect(2); + $r3$.ɵɵelementProperty(2, "ngIf", $r3$.ɵɵbind(ctx.visible)); } } `; @@ -1436,7 +1436,7 @@ describe('i18n support in the view compiler', () => { const $_c2$ = ["src", "logo.png", ${AttributeMarker.Bindings}, "title", ${AttributeMarker.Template}, "ngIf"]; function MyComponent_img_1_Template(rf, ctx) { if (rf & 1) { - $r3$.Δelement(0, "img", $_c0$); + $r3$.ɵɵelement(0, "img", $_c0$); } } var $I18N_2$; @@ -1447,22 +1447,22 @@ describe('i18n support in the view compiler', () => { $I18N_2$ = $MSG_EXTERNAL_2367729185105559721$$APP_SPEC_TS__2$; } else { - $I18N_2$ = $r3$.Δi18nLocalize("App logo #{$interpolation}", { + $I18N_2$ = $r3$.ɵɵi18nLocalize("App logo #{$interpolation}", { "interpolation": "\uFFFD0\uFFFD" }); } const $_c3$ = ["title", $I18N_2$]; function MyComponent_img_2_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "img", $_c0$); - $r3$.Δi18nAttributes(1, $_c3$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "img", $_c0$); + $r3$.ɵɵi18nAttributes(1, $_c3$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - const $ctx_r1$ = $r3$.ΔnextContext(); - $r3$.Δselect(0); - $r3$.Δi18nExp($r3$.Δbind($ctx_r1$.id)); - $r3$.Δi18nApply(1); + const $ctx_r1$ = $r3$.ɵɵnextContext(); + $r3$.ɵɵselect(0); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($ctx_r1$.id)); + $r3$.ɵɵi18nApply(1); } } … @@ -1470,15 +1470,15 @@ describe('i18n support in the view compiler', () => { vars: 2, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.Δelement(0, "img", $_c0$); - $r3$.Δtemplate(1, MyComponent_img_1_Template, 1, 0, "img", $_c1$); - $r3$.Δtemplate(2, MyComponent_img_2_Template, 2, 1, "img", $_c2$); + $r3$.ɵɵelement(0, "img", $_c0$); + $r3$.ɵɵtemplate(1, MyComponent_img_1_Template, 1, 0, "img", $_c1$); + $r3$.ɵɵtemplate(2, MyComponent_img_2_Template, 2, 1, "img", $_c2$); } if (rf & 2) { - $r3$.Δselect(1); - $r3$.ΔelementProperty(1, "ngIf", $r3$.Δbind(ctx.visible)); - $r3$.Δselect(2); - $r3$.ΔelementProperty(2, "ngIf", $r3$.Δbind(ctx.visible)); + $r3$.ɵɵselect(1); + $r3$.ɵɵelementProperty(1, "ngIf", $r3$.ɵɵbind(ctx.visible)); + $r3$.ɵɵselect(2); + $r3$.ɵɵelementProperty(2, "ngIf", $r3$.ɵɵbind(ctx.visible)); } } `; @@ -1515,38 +1515,38 @@ describe('i18n support in the view compiler', () => { const $_c0$ = [${AttributeMarker.Template}, "ngIf"]; function MyComponent_div_2_div_4_Template(rf, ctx) { if (rf & 1) { - $r3$.Δi18nStart(0, $I18N_0$, 2); - $r3$.ΔelementStart(1, "div"); - $r3$.Δelement(2, "div"); - $r3$.ΔelementEnd(); - $r3$.Δi18nEnd(); + $r3$.ɵɵi18nStart(0, $I18N_0$, 2); + $r3$.ɵɵelementStart(1, "div"); + $r3$.ɵɵelement(2, "div"); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵi18nEnd(); } if (rf & 2) { - const $ctx_r2$ = $r3$.ΔnextContext(2); - $r3$.Δselect(0); - $r3$.Δi18nExp($r3$.Δbind($ctx_r2$.valueC)); - $r3$.Δi18nExp($r3$.Δbind($ctx_r2$.valueD)); - $r3$.Δi18nApply(0); + const $ctx_r2$ = $r3$.ɵɵnextContext(2); + $r3$.ɵɵselect(0); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($ctx_r2$.valueC)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($ctx_r2$.valueD)); + $r3$.ɵɵi18nApply(0); } } function MyComponent_div_2_Template(rf, ctx) { if (rf & 1) { - $r3$.Δi18nStart(0, $I18N_0$, 1); - $r3$.ΔelementStart(1, "div"); - $r3$.ΔelementStart(2, "div"); - $r3$.Δpipe(3, "uppercase"); - $r3$.Δtemplate(4, MyComponent_div_2_div_4_Template, 3, 2, "div", $_c1$); - $r3$.ΔelementEnd(); - $r3$.ΔelementEnd(); - $r3$.Δi18nEnd(); + $r3$.ɵɵi18nStart(0, $I18N_0$, 1); + $r3$.ɵɵelementStart(1, "div"); + $r3$.ɵɵelementStart(2, "div"); + $r3$.ɵɵpipe(3, "uppercase"); + $r3$.ɵɵtemplate(4, MyComponent_div_2_div_4_Template, 3, 2, "div", $_c1$); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵi18nEnd(); } if (rf & 2) { - const $ctx_r0$ = $r3$.ΔnextContext(); - $r3$.Δselect(4); - $r3$.ΔelementProperty(4, "ngIf", $r3$.Δbind($ctx_r0$.exists)); - $r3$.Δi18nExp($r3$.Δbind($ctx_r0$.valueA)); - $r3$.Δi18nExp($r3$.Δbind($r3$.ΔpipeBind1(3, 3, $ctx_r0$.valueB))); - $r3$.Δi18nApply(0); + const $ctx_r0$ = $r3$.ɵɵnextContext(); + $r3$.ɵɵselect(4); + $r3$.ɵɵelementProperty(4, "ngIf", $r3$.ɵɵbind($ctx_r0$.exists)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($ctx_r0$.valueA)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($r3$.ɵɵpipeBind1(3, 3, $ctx_r0$.valueB))); + $r3$.ɵɵi18nApply(0); } } var $I18N_0$; @@ -1567,7 +1567,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_1221890473527419724$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize(" Some content {$startTagDiv_2} Some other content {$interpolation} {$startTagDiv} More nested levels with bindings {$interpolation_1} {$startTagDiv_1} Content inside sub-template {$interpolation_2} {$startTagDiv} Bottom level element {$interpolation_3} {$closeTagDiv}{$closeTagDiv}{$closeTagDiv}{$closeTagDiv}{$startTagDiv_3} Some other content {$interpolation_4} {$startTagDiv} More nested levels with bindings {$interpolation_5} {$closeTagDiv}{$closeTagDiv}", { + $I18N_0$ = $r3$.ɵɵi18nLocalize(" Some content {$startTagDiv_2} Some other content {$interpolation} {$startTagDiv} More nested levels with bindings {$interpolation_1} {$startTagDiv_1} Content inside sub-template {$interpolation_2} {$startTagDiv} Bottom level element {$interpolation_3} {$closeTagDiv}{$closeTagDiv}{$closeTagDiv}{$closeTagDiv}{$startTagDiv_3} Some other content {$interpolation_4} {$startTagDiv} More nested levels with bindings {$interpolation_5} {$closeTagDiv}{$closeTagDiv}", { "startTagDiv_2": "\uFFFD*2:1\uFFFD\uFFFD#1:1\uFFFD", "closeTagDiv": "[\uFFFD/#2:2\uFFFD|\uFFFD/#1:2\uFFFD\uFFFD/*4:2\uFFFD|\uFFFD/#2:1\uFFFD|\uFFFD/#1:1\uFFFD\uFFFD/*2:1\uFFFD|\uFFFD/#2:3\uFFFD|\uFFFD/#1:3\uFFFD\uFFFD/*3:3\uFFFD]", "startTagDiv_3": "\uFFFD*3:3\uFFFD\uFFFD#1:3\uFFFD", @@ -1581,22 +1581,22 @@ describe('i18n support in the view compiler', () => { "interpolation_5": "\uFFFD1:3\uFFFD" }); } - $I18N_0$ = $r3$.Δi18nPostprocess($I18N_0$); + $I18N_0$ = $r3$.ɵɵi18nPostprocess($I18N_0$); function MyComponent_div_3_Template(rf, ctx) { if (rf & 1) { - $r3$.Δi18nStart(0, $I18N_0$, 3); - $r3$.ΔelementStart(1, "div"); - $r3$.Δelement(2, "div"); - $r3$.Δpipe(3, "uppercase"); - $r3$.ΔelementEnd(); - $r3$.Δi18nEnd(); + $r3$.ɵɵi18nStart(0, $I18N_0$, 3); + $r3$.ɵɵelementStart(1, "div"); + $r3$.ɵɵelement(2, "div"); + $r3$.ɵɵpipe(3, "uppercase"); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵi18nEnd(); } if (rf & 2) { - const $ctx_r1$ = $r3$.ΔnextContext(); - $r3$.Δselect(0); - $r3$.Δi18nExp($r3$.Δbind(($ctx_r1$.valueE + $ctx_r1$.valueF))); - $r3$.Δi18nExp($r3$.Δbind($r3$.ΔpipeBind1(3, 2, $ctx_r1$.valueG))); - $r3$.Δi18nApply(0); + const $ctx_r1$ = $r3$.ɵɵnextContext(); + $r3$.ɵɵselect(0); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(($ctx_r1$.valueE + $ctx_r1$.valueF))); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($r3$.ɵɵpipeBind1(3, 2, $ctx_r1$.valueG))); + $r3$.ɵɵi18nApply(0); } } … @@ -1604,18 +1604,18 @@ describe('i18n support in the view compiler', () => { vars: 2, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18nStart(1, $I18N_0$); - $r3$.Δtemplate(2, MyComponent_div_2_Template, 5, 5, "div", $_c1$); - $r3$.Δtemplate(3, MyComponent_div_3_Template, 4, 4, "div", $_c1$); - $r3$.Δi18nEnd(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18nStart(1, $I18N_0$); + $r3$.ɵɵtemplate(2, MyComponent_div_2_Template, 5, 5, "div", $_c1$); + $r3$.ɵɵtemplate(3, MyComponent_div_3_Template, 4, 4, "div", $_c1$); + $r3$.ɵɵi18nEnd(); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(2); - $r3$.ΔelementProperty(2, "ngIf", $r3$.Δbind(ctx.visible)); - $r3$.Δselect(3); - $r3$.ΔelementProperty(3, "ngIf", $r3$.Δbind(!ctx.visible)); + $r3$.ɵɵselect(2); + $r3$.ɵɵelementProperty(2, "ngIf", $r3$.ɵɵbind(ctx.visible)); + $r3$.ɵɵselect(3); + $r3$.ɵɵelementProperty(3, "ngIf", $r3$.ɵɵbind(!ctx.visible)); } } `; @@ -1640,7 +1640,7 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_EXTERNAL_119975189388320493$$APP_SPEC_TS__1$; } else { - $I18N_1$ = $r3$.Δi18nLocalize("Some other content {$startTagSpan}{$interpolation}{$closeTagSpan}", { + $I18N_1$ = $r3$.ɵɵi18nLocalize("Some other content {$startTagSpan}{$interpolation}{$closeTagSpan}", { "startTagSpan": "\uFFFD#2\uFFFD", "interpolation": "\uFFFD0\uFFFD", "closeTagSpan": "\uFFFD/#2\uFFFD" @@ -1649,17 +1649,17 @@ describe('i18n support in the view compiler', () => { … function MyComponent_div_0_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18nStart(1, $I18N_1$); - $r3$.Δelement(2, "span"); - $r3$.Δi18nEnd(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18nStart(1, $I18N_1$); + $r3$.ɵɵelement(2, "span"); + $r3$.ɵɵi18nEnd(); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - const $ctx_r0$ = $r3$.ΔnextContext(); - $r3$.Δselect(1); - $r3$.Δi18nExp($r3$.Δbind($ctx_r0$.valueA)); - $r3$.Δi18nApply(1); + const $ctx_r0$ = $r3$.ɵɵnextContext(); + $r3$.ɵɵselect(1); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($ctx_r0$.valueA)); + $r3$.ɵɵi18nApply(1); } } … @@ -1667,11 +1667,11 @@ describe('i18n support in the view compiler', () => { vars: 1, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.Δtemplate(0, MyComponent_div_0_Template, 3, 1, "div", $_c0$); + $r3$.ɵɵtemplate(0, MyComponent_div_0_Template, 3, 1, "div", $_c0$); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔelementProperty(0, "ngIf", $r3$.Δbind(ctx.visible)); + $r3$.ɵɵselect(0); + $r3$.ɵɵelementProperty(0, "ngIf", $r3$.ɵɵbind(ctx.visible)); } } `; @@ -1692,15 +1692,15 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_APP_SPEC_TS_2$; } else { - $I18N_1$ = $r3$.Δi18nLocalize("Hello"); + $I18N_1$ = $r3$.ɵɵi18nLocalize("Hello"); } … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div", $_c0$); - $r3$.Δlistener("click", function MyComponent_Template_div_click_0_listener($event) { return ctx.onClick(); }); - $r3$.Δi18n(1, $I18N_1$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div", $_c0$); + $r3$.ɵɵlistener("click", function MyComponent_Template_div_click_0_listener($event) { return ctx.onClick(); }); + $r3$.ɵɵi18n(1, $I18N_1$); + $r3$.ɵɵelementEnd(); } } `; @@ -1722,14 +1722,14 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_4890179241114413722$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("My i18n block #1"); + $I18N_0$ = $r3$.ɵɵi18nLocalize("My i18n block #1"); } … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18n(1, $I18N_0$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18n(1, $I18N_0$); + $r3$.ɵɵelementEnd(); } } `; @@ -1749,9 +1749,9 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_8806993169187953163$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, 10 {ten} 20 {twenty} other {other}}"); + $I18N_0$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, 10 {ten} 20 {twenty} other {other}}"); } - $I18N_0$ = $r3$.Δi18nPostprocess($I18N_0$, { + $I18N_0$ = $r3$.ɵɵi18nPostprocess($I18N_0$, { "VAR_SELECT": "\uFFFD0\uFFFD" }); … @@ -1759,14 +1759,14 @@ describe('i18n support in the view compiler', () => { vars: 1, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18n(1, $I18N_0$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18n(1, $I18N_0$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(1); - $r3$.Δi18nExp($r3$.Δbind(ctx.age)); - $r3$.Δi18nApply(1); + $r3$.ɵɵselect(1); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.age)); + $r3$.ɵɵi18nApply(1); } } `; @@ -1787,7 +1787,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_2413150872298537152$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("My i18n block #2"); + $I18N_0$ = $r3$.ɵɵi18nLocalize("My i18n block #2"); } var $I18N_1$; if (ngI18nClosureMode) { @@ -1795,20 +1795,20 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_EXTERNAL_4890179241114413722$$APP_SPEC_TS__1$; } else { - $I18N_1$ = $r3$.Δi18nLocalize("My i18n block #1"); + $I18N_1$ = $r3$.ɵɵi18nLocalize("My i18n block #1"); } function MyComponent_ng_template_0_Template(rf, ctx) { if (rf & 1) { - $r3$.Δi18n(0, $I18N_1$); + $r3$.ɵɵi18n(0, $I18N_1$); } } … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.Δtemplate(0, MyComponent_ng_template_0_Template, 1, 0, "ng-template"); - $r3$.ΔelementContainerStart(1); - $r3$.Δi18n(2, $I18N_0$); - $r3$.ΔelementContainerEnd(); + $r3$.ɵɵtemplate(0, MyComponent_ng_template_0_Template, 1, 0, "ng-template"); + $r3$.ɵɵelementContainerStart(1); + $r3$.ɵɵi18n(2, $I18N_0$); + $r3$.ɵɵelementContainerEnd(); } } `; @@ -1830,7 +1830,7 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_EXTERNAL_5295701706185791735$$APP_SPEC_TS_1$; } else { - $I18N_1$ = $r3$.Δi18nLocalize("Text #1"); + $I18N_1$ = $r3$.ɵɵi18nLocalize("Text #1"); } const $_c2$ = [${AttributeMarker.Styles}, "padding", "10px"]; var $I18N_3$; @@ -1839,19 +1839,19 @@ describe('i18n support in the view compiler', () => { $I18N_3$ = $MSG_EXTERNAL_4722270221386399294$$APP_SPEC_TS_3$; } else { - $I18N_3$ = $r3$.Δi18nLocalize("Text #2"); + $I18N_3$ = $r3$.ɵɵi18nLocalize("Text #2"); } … consts: 4, vars: 0, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "span", $_c0$); - $r3$.Δi18n(1, $I18N_1$); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(2, "span", $_c1$); - $r3$.Δi18n(3, $I18N_3$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "span", $_c0$); + $r3$.ɵɵi18n(1, $I18N_1$); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(2, "span", $_c1$); + $r3$.ɵɵi18n(3, $I18N_3$); + $r3$.ɵɵelementEnd(); } } `; @@ -1875,7 +1875,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_355394464191978948$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("Some content: {$interpolation}", { + $I18N_0$ = $r3$.ɵɵi18nLocalize("Some content: {$interpolation}", { "interpolation": "\uFFFD0\uFFFD" }); } @@ -1884,15 +1884,15 @@ describe('i18n support in the view compiler', () => { vars: 3, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementContainerStart(0); - $r3$.Δi18n(1, $I18N_0$); - $r3$.Δpipe(2, "uppercase"); - $r3$.ΔelementContainerEnd(); + $r3$.ɵɵelementContainerStart(0); + $r3$.ɵɵi18n(1, $I18N_0$); + $r3$.ɵɵpipe(2, "uppercase"); + $r3$.ɵɵelementContainerEnd(); } if (rf & 2) { - $r3$.Δselect(1); - $r3$.Δi18nExp($r3$.Δbind($r3$.ΔpipeBind1(2, 1, ctx.valueA))); - $r3$.Δi18nApply(1); + $r3$.ɵɵselect(1); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($r3$.ɵɵpipeBind1(2, 1, ctx.valueA))); + $r3$.ɵɵi18nApply(1); } } `; @@ -1914,19 +1914,19 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_355394464191978948$$APP_SPEC_TS__0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("Some content: {$interpolation}", { + $I18N_0$ = $r3$.ɵɵi18nLocalize("Some content: {$interpolation}", { "interpolation": "\uFFFD0\uFFFD" }); } function MyComponent_ng_template_0_Template(rf, ctx) { if (rf & 1) { - $r3$.Δi18n(0, $I18N_0$); - $r3$.Δpipe(1, "uppercase"); + $r3$.ɵɵi18n(0, $I18N_0$); + $r3$.ɵɵpipe(1, "uppercase"); } if (rf & 2) { - const $ctx_r0$ = $r3$.ΔnextContext(); - $r3$.Δselect(0); - $r3$.Δi18nExp($r3$.Δbind($r3$.ΔpipeBind1(1, 1, $ctx_r0$.valueA))); - $r3$.Δi18nApply(0); + const $ctx_r0$ = $r3$.ɵɵnextContext(); + $r3$.ɵɵselect(0); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($r3$.ɵɵpipeBind1(1, 1, $ctx_r0$.valueA))); + $r3$.ɵɵi18nApply(0); } } … @@ -1934,7 +1934,7 @@ describe('i18n support in the view compiler', () => { vars: 0, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.Δtemplate(0, MyComponent_ng_template_0_Template, 2, 3, "ng-template"); + $r3$.ɵɵtemplate(0, MyComponent_ng_template_0_Template, 2, 3, "ng-template"); } } `; @@ -1964,7 +1964,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_702706566400598764$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("{$startTagNgTemplate}Template content: {$interpolation}{$closeTagNgTemplate}{$startTagNgContainer}Container content: {$interpolation_1}{$closeTagNgContainer}", { + $I18N_0$ = $r3$.ɵɵi18nLocalize("{$startTagNgTemplate}Template content: {$interpolation}{$closeTagNgTemplate}{$startTagNgContainer}Container content: {$interpolation_1}{$closeTagNgContainer}", { "startTagNgTemplate": "\uFFFD*2:1\uFFFD", "closeTagNgTemplate": "\uFFFD/*2:1\uFFFD", "startTagNgContainer": "\uFFFD#3\uFFFD", @@ -1975,14 +1975,14 @@ describe('i18n support in the view compiler', () => { } function MyComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) { - $r3$.Δi18n(0, $I18N_0$, 1); - $r3$.Δpipe(1, "uppercase"); + $r3$.ɵɵi18n(0, $I18N_0$, 1); + $r3$.ɵɵpipe(1, "uppercase"); } if (rf & 2) { - const $ctx_r0$ = $r3$.ΔnextContext(); - $r3$.Δselect(0); - $r3$.Δi18nExp($r3$.Δbind($r3$.ΔpipeBind1(1, 1, $ctx_r0$.valueA))); - $r3$.Δi18nApply(0); + const $ctx_r0$ = $r3$.ɵɵnextContext(); + $r3$.ɵɵselect(0); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($r3$.ɵɵpipeBind1(1, 1, $ctx_r0$.valueA))); + $r3$.ɵɵi18nApply(0); } } … @@ -1990,19 +1990,19 @@ describe('i18n support in the view compiler', () => { vars: 3, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18nStart(1, $I18N_0$); - $r3$.Δtemplate(2, MyComponent_ng_template_2_Template, 2, 3, "ng-template"); - $r3$.ΔelementContainerStart(3); - $r3$.Δpipe(4, "uppercase"); - $r3$.ΔelementContainerEnd(); - $r3$.Δi18nEnd(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18nStart(1, $I18N_0$); + $r3$.ɵɵtemplate(2, MyComponent_ng_template_2_Template, 2, 3, "ng-template"); + $r3$.ɵɵelementContainerStart(3); + $r3$.ɵɵpipe(4, "uppercase"); + $r3$.ɵɵelementContainerEnd(); + $r3$.ɵɵi18nEnd(); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(1); - $r3$.Δi18nExp($r3$.Δbind($r3$.ΔpipeBind1(4, 1, ctx.valueB))); - $r3$.Δi18nApply(1); + $r3$.ɵɵselect(1); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($r3$.ɵɵpipeBind1(4, 1, ctx.valueB))); + $r3$.ɵɵi18nApply(1); } } `; @@ -2023,9 +2023,9 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_8806993169187953163$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, 10 {ten} 20 {twenty} other {other}}"); + $I18N_0$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, 10 {ten} 20 {twenty} other {other}}"); } - $I18N_0$ = $r3$.Δi18nPostprocess($I18N_0$, { + $I18N_0$ = $r3$.ɵɵi18nPostprocess($I18N_0$, { "VAR_SELECT": "\uFFFD0\uFFFD" }); var $I18N_1$; @@ -2034,20 +2034,20 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_EXTERNAL_7842238767399919809$$APP_SPEC_TS__1$; } else { - $I18N_1$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, male {male} female {female} other {other}}"); + $I18N_1$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, male {male} female {female} other {other}}"); } - $I18N_1$ = $r3$.Δi18nPostprocess($I18N_1$, { + $I18N_1$ = $r3$.ɵɵi18nPostprocess($I18N_1$, { "VAR_SELECT": "\uFFFD0\uFFFD" }); function MyComponent_ng_template_0_Template(rf, ctx) { if (rf & 1) { - $r3$.Δi18n(0, $I18N_1$); + $r3$.ɵɵi18n(0, $I18N_1$); } if (rf & 2) { - const $ctx_r0$ = $r3$.ΔnextContext(); - $r3$.Δselect(0); - $r3$.Δi18nExp($r3$.Δbind($ctx_r0$.gender)); - $r3$.Δi18nApply(0); + const $ctx_r0$ = $r3$.ɵɵnextContext(); + $r3$.ɵɵselect(0); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($ctx_r0$.gender)); + $r3$.ɵɵi18nApply(0); } } … @@ -2055,15 +2055,15 @@ describe('i18n support in the view compiler', () => { vars: 1, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.Δtemplate(0, MyComponent_ng_template_0_Template, 1, 1, "ng-template"); - $r3$.ΔelementContainerStart(1); - $r3$.Δi18n(2, $I18N_0$); - $r3$.ΔelementContainerEnd(); + $r3$.ɵɵtemplate(0, MyComponent_ng_template_0_Template, 1, 1, "ng-template"); + $r3$.ɵɵelementContainerStart(1); + $r3$.ɵɵi18n(2, $I18N_0$); + $r3$.ɵɵelementContainerEnd(); } if (rf & 2) { - $r3$.Δselect(2); - $r3$.Δi18nExp($r3$.Δbind(ctx.age)); - $r3$.Δi18nApply(2); + $r3$.ɵɵselect(2); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.age)); + $r3$.ɵɵi18nApply(2); } } `; @@ -2089,26 +2089,26 @@ describe('i18n support in the view compiler', () => { const output = String.raw ` function MyComponent_ng_template_2_ng_template_2_ng_template_1_Template(rf, ctx) { if (rf & 1) { - $r3$.Δi18n(0, $I18N_0$, 3); + $r3$.ɵɵi18n(0, $I18N_0$, 3); } if (rf & 2) { - const $ctx_r2$ = $r3$.ΔnextContext(3); - $r3$.Δselect(0); - $r3$.Δi18nExp($r3$.Δbind($ctx_r2$.valueC)); - $r3$.Δi18nApply(0); + const $ctx_r2$ = $r3$.ɵɵnextContext(3); + $r3$.ɵɵselect(0); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($ctx_r2$.valueC)); + $r3$.ɵɵi18nApply(0); } } function MyComponent_ng_template_2_ng_template_2_Template(rf, ctx) { if (rf & 1) { - $r3$.Δi18nStart(0, $I18N_0$, 2); - $r3$.Δtemplate(1, MyComponent_ng_template_2_ng_template_2_ng_template_1_Template, 1, 1, "ng-template"); - $r3$.Δi18nEnd(); + $r3$.ɵɵi18nStart(0, $I18N_0$, 2); + $r3$.ɵɵtemplate(1, MyComponent_ng_template_2_ng_template_2_ng_template_1_Template, 1, 1, "ng-template"); + $r3$.ɵɵi18nEnd(); } if (rf & 2) { - const $ctx_r1$ = $r3$.ΔnextContext(2); - $r3$.Δselect(0); - $r3$.Δi18nExp($r3$.Δbind($ctx_r1$.valueB)); - $r3$.Δi18nApply(0); + const $ctx_r1$ = $r3$.ɵɵnextContext(2); + $r3$.ɵɵselect(0); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($ctx_r1$.valueB)); + $r3$.ɵɵi18nApply(0); } } var $I18N_0$; @@ -2123,7 +2123,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_2051477021417799640$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("{$startTagNgTemplate} Template A: {$interpolation} {$startTagNgTemplate} Template B: {$interpolation_1} {$startTagNgTemplate} Template C: {$interpolation_2} {$closeTagNgTemplate}{$closeTagNgTemplate}{$closeTagNgTemplate}", { + $I18N_0$ = $r3$.ɵɵi18nLocalize("{$startTagNgTemplate} Template A: {$interpolation} {$startTagNgTemplate} Template B: {$interpolation_1} {$startTagNgTemplate} Template C: {$interpolation_2} {$closeTagNgTemplate}{$closeTagNgTemplate}{$closeTagNgTemplate}", { "startTagNgTemplate": "[\uFFFD*2:1\uFFFD|\uFFFD*2:2\uFFFD|\uFFFD*1:3\uFFFD]", "closeTagNgTemplate": "[\uFFFD/*1:3\uFFFD|\uFFFD/*2:2\uFFFD|\uFFFD/*2:1\uFFFD]", "interpolation": "\uFFFD0:1\uFFFD", @@ -2131,19 +2131,19 @@ describe('i18n support in the view compiler', () => { "interpolation_2": "\uFFFD0:3\uFFFD" }); } - $I18N_0$ = $r3$.Δi18nPostprocess($I18N_0$); + $I18N_0$ = $r3$.ɵɵi18nPostprocess($I18N_0$); function MyComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) { - $r3$.Δi18nStart(0, $I18N_0$, 1); - $r3$.Δpipe(1, "uppercase"); - $r3$.Δtemplate(2, MyComponent_ng_template_2_ng_template_2_Template, 2, 1, "ng-template"); - $r3$.Δi18nEnd(); + $r3$.ɵɵi18nStart(0, $I18N_0$, 1); + $r3$.ɵɵpipe(1, "uppercase"); + $r3$.ɵɵtemplate(2, MyComponent_ng_template_2_ng_template_2_Template, 2, 1, "ng-template"); + $r3$.ɵɵi18nEnd(); } if (rf & 2) { - const $ctx_r0$ = $r3$.ΔnextContext(); - $r3$.Δselect(0); - $r3$.Δi18nExp($r3$.Δbind($r3$.ΔpipeBind1(1, 1, $ctx_r0$.valueA))); - $r3$.Δi18nApply(0); + const $ctx_r0$ = $r3$.ɵɵnextContext(); + $r3$.ɵɵselect(0); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($r3$.ɵɵpipeBind1(1, 1, $ctx_r0$.valueA))); + $r3$.ɵɵi18nApply(0); } } … @@ -2151,11 +2151,11 @@ describe('i18n support in the view compiler', () => { vars: 0, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18nStart(1, $I18N_0$); - $r3$.Δtemplate(2, MyComponent_ng_template_2_Template, 3, 3, "ng-template"); - $r3$.Δi18nEnd(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18nStart(1, $I18N_0$); + $r3$.ɵɵtemplate(2, MyComponent_ng_template_2_Template, 3, 3, "ng-template"); + $r3$.ɵɵi18nEnd(); + $r3$.ɵɵelementEnd(); } } `; @@ -2176,9 +2176,9 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_7842238767399919809$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, male {male} female {female} other {other}}"); + $I18N_0$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, male {male} female {female} other {other}}"); } - $I18N_0$ = $r3$.Δi18nPostprocess($I18N_0$, { + $I18N_0$ = $r3$.ɵɵi18nPostprocess($I18N_0$, { "VAR_SELECT": "\uFFFD0\uFFFD" }); var $I18N_1$; @@ -2187,20 +2187,20 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_EXTERNAL_8806993169187953163$$APP_SPEC_TS__1$; } else { - $I18N_1$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, 10 {ten} 20 {twenty} other {other}}"); + $I18N_1$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, 10 {ten} 20 {twenty} other {other}}"); } - $I18N_1$ = $r3$.Δi18nPostprocess($I18N_1$, { + $I18N_1$ = $r3$.ɵɵi18nPostprocess($I18N_1$, { "VAR_SELECT": "\uFFFD0\uFFFD" }); function MyComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) { - $r3$.Δi18n(0, $I18N_1$); + $r3$.ɵɵi18n(0, $I18N_1$); } if (rf & 2) { - const $ctx_r0$ = $r3$.ΔnextContext(); - $r3$.Δselect(0); - $r3$.Δi18nExp($r3$.Δbind($ctx_r0$.age)); - $r3$.Δi18nApply(0); + const $ctx_r0$ = $r3$.ɵɵnextContext(); + $r3$.ɵɵselect(0); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($ctx_r0$.age)); + $r3$.ɵɵi18nApply(0); } } … @@ -2208,15 +2208,15 @@ describe('i18n support in the view compiler', () => { vars: 1, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementContainerStart(0); - $r3$.Δi18n(1, $I18N_0$); - $r3$.ΔelementContainerEnd(); - $r3$.Δtemplate(2, MyComponent_ng_template_2_Template, 1, 1, "ng-template"); + $r3$.ɵɵelementContainerStart(0); + $r3$.ɵɵi18n(1, $I18N_0$); + $r3$.ɵɵelementContainerEnd(); + $r3$.ɵɵtemplate(2, MyComponent_ng_template_2_Template, 1, 1, "ng-template"); } if (rf & 2) { - $r3$.Δselect(1); - $r3$.Δi18nExp($r3$.Δbind(ctx.gender)); - $r3$.Δi18nApply(1); + $r3$.ɵɵselect(1); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.gender)); + $r3$.ɵɵi18nApply(1); } } `; @@ -2244,7 +2244,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_4891196282781544695$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("{$tagImg} is my logo #1 ", { + $I18N_0$ = $r3$.ɵɵi18nLocalize("{$tagImg} is my logo #1 ", { "tagImg": "\uFFFD#2\uFFFD\uFFFD/#2\uFFFD" }); } @@ -2256,26 +2256,26 @@ describe('i18n support in the view compiler', () => { $I18N_2$ = $MSG_EXTERNAL_461986953980355147$$APP_SPEC_TS__2$; } else { - $I18N_2$ = $r3$.Δi18nLocalize("{$tagImg} is my logo #2 ", { + $I18N_2$ = $r3$.ɵɵi18nLocalize("{$tagImg} is my logo #2 ", { "tagImg": "\uFFFD#1\uFFFD\uFFFD/#1\uFFFD" }); } function MyComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) { - $r3$.Δi18nStart(0, $I18N_2$); - $r3$.Δelement(1, "img", $_c0$); - $r3$.Δi18nEnd(); + $r3$.ɵɵi18nStart(0, $I18N_2$); + $r3$.ɵɵelement(1, "img", $_c0$); + $r3$.ɵɵi18nEnd(); } } … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementContainerStart(0); - $r3$.Δi18nStart(1, $I18N_0$); - $r3$.Δelement(2, "img", $_c0$); - $r3$.Δi18nEnd(); - $r3$.ΔelementContainerEnd(); - $r3$.Δtemplate(3, MyComponent_ng_template_3_Template, 2, 0, "ng-template"); + $r3$.ɵɵelementContainerStart(0); + $r3$.ɵɵi18nStart(1, $I18N_0$); + $r3$.ɵɵelement(2, "img", $_c0$); + $r3$.ɵɵi18nEnd(); + $r3$.ɵɵelementContainerEnd(); + $r3$.ɵɵtemplate(3, MyComponent_ng_template_3_Template, 2, 0, "ng-template"); } } `; @@ -2303,7 +2303,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_8537814667662432133$$APP_SPEC_TS__0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize(" Root content {$startTagNgContainer} Nested content {$closeTagNgContainer}", { + $I18N_0$ = $r3$.ɵɵi18nLocalize(" Root content {$startTagNgContainer} Nested content {$closeTagNgContainer}", { "startTagNgContainer": "\uFFFD*1:1\uFFFD\uFFFD#1:1\uFFFD", "closeTagNgContainer": "\uFFFD/#1:1\uFFFD\uFFFD/*1:1\uFFFD" }); @@ -2330,7 +2330,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_6563391987554512024$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("Test"); + $I18N_0$ = $r3$.ɵɵi18nLocalize("Test"); } var $I18N_1$; if (ngI18nClosureMode) { @@ -2338,7 +2338,7 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_EXTERNAL_6563391987554512024$$APP_SPEC_TS_1$; } else { - $I18N_1$ = $r3$.Δi18nLocalize("Test"); + $I18N_1$ = $r3$.ɵɵi18nLocalize("Test"); } … `; @@ -2366,7 +2366,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_963542717423364282$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("\n Some text\n {$startTagSpan}Text inside span{$closeTagSpan}\n ", { + $I18N_0$ = $r3$.ɵɵi18nLocalize("\n Some text\n {$startTagSpan}Text inside span{$closeTagSpan}\n ", { "startTagSpan": "\uFFFD#3\uFFFD", "closeTagSpan": "\uFFFD/#3\uFFFD" }); @@ -2374,13 +2374,13 @@ describe('i18n support in the view compiler', () => { … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.Δtext(0, "\n "); - $r3$.ΔelementStart(1, "div"); - $r3$.Δi18nStart(2, $I18N_0$); - $r3$.Δelement(3, "span"); - $r3$.Δi18nEnd(); - $r3$.ΔelementEnd(); - $r3$.Δtext(4, "\n "); + $r3$.ɵɵtext(0, "\n "); + $r3$.ɵɵelementStart(1, "div"); + $r3$.ɵɵi18nStart(2, $I18N_0$); + $r3$.ɵɵelement(3, "span"); + $r3$.ɵɵi18nEnd(); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵtext(4, "\n "); } } `; @@ -2402,9 +2402,9 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_7842238767399919809$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, male {male} female {female} other {other}}"); + $I18N_0$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, male {male} female {female} other {other}}"); } - $I18N_0$ = $r3$.Δi18nPostprocess($I18N_0$, { + $I18N_0$ = $r3$.ɵɵi18nPostprocess($I18N_0$, { "VAR_SELECT": "\uFFFD0\uFFFD" }); … @@ -2412,14 +2412,14 @@ describe('i18n support in the view compiler', () => { vars: 1, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18n(1, $I18N_0$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18n(1, $I18N_0$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(1); - $r3$.Δi18nExp($r3$.Δbind(ctx.gender)); - $r3$.Δi18nApply(1); + $r3$.ɵɵselect(1); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.gender)); + $r3$.ɵɵi18nApply(1); } } `; @@ -2439,9 +2439,9 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_4166854826696768832$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, single {'single quotes'} double {\"double quotes\"} other {other}}"); + $I18N_0$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, single {'single quotes'} double {\"double quotes\"} other {other}}"); } - $I18N_0$ = $r3$.Δi18nPostprocess($I18N_0$, { + $I18N_0$ = $r3$.ɵɵi18nPostprocess($I18N_0$, { "VAR_SELECT": "\uFFFD0\uFFFD" }); `; @@ -2461,9 +2461,9 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_8806993169187953163$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, 10 {ten} 20 {twenty} other {other}}"); + $I18N_0$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, 10 {ten} 20 {twenty} other {other}}"); } - $I18N_0$ = $r3$.Δi18nPostprocess($I18N_0$, { + $I18N_0$ = $r3$.ɵɵi18nPostprocess($I18N_0$, { "VAR_SELECT": "\uFFFD0\uFFFD" }); … @@ -2471,12 +2471,12 @@ describe('i18n support in the view compiler', () => { vars: 1, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.Δi18n(0, $I18N_0$); + $r3$.ɵɵi18n(0, $I18N_0$); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.Δi18nExp($r3$.Δbind(ctx.age)); - $r3$.Δi18nApply(0); + $r3$.ɵɵselect(0); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.age)); + $r3$.ɵɵi18nApply(0); } } `; @@ -2502,9 +2502,9 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_7842238767399919809$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, male {male} female {female} other {other}}"); + $I18N_0$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, male {male} female {female} other {other}}"); } - $I18N_0$ = $r3$.Δi18nPostprocess($I18N_0$, { + $I18N_0$ = $r3$.ɵɵi18nPostprocess($I18N_0$, { "VAR_SELECT": "\uFFFD0\uFFFD" }); const $_c0$ = ["title", "icu only", ${AttributeMarker.Template}, "ngIf"]; @@ -2516,22 +2516,22 @@ describe('i18n support in the view compiler', () => { $I18N_3$ = $MSG_EXTERNAL_8806993169187953163$$APP_SPEC_TS__3$; } else { - $I18N_3$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, 10 {ten} 20 {twenty} other {other}}"); + $I18N_3$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, 10 {ten} 20 {twenty} other {other}}"); } - $I18N_3$ = $r3$.Δi18nPostprocess($I18N_3$, { + $I18N_3$ = $r3$.ɵɵi18nPostprocess($I18N_3$, { "VAR_SELECT": "\uFFFD0\uFFFD" }); function MyComponent_div_2_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div", $_c2$); - $r3$.Δi18n(1, $I18N_3$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div", $_c2$); + $r3$.ɵɵi18n(1, $I18N_3$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - const $ctx_r0$ = $r3$.ΔnextContext(); - $r3$.Δselect(1); - $r3$.Δi18nExp($r3$.Δbind($ctx_r0$.age)); - $r3$.Δi18nApply(1); + const $ctx_r0$ = $r3$.ɵɵnextContext(); + $r3$.ɵɵselect(1); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($ctx_r0$.age)); + $r3$.ɵɵi18nApply(1); } } const $_c3$ = ["title", "icu and text"]; @@ -2543,27 +2543,27 @@ describe('i18n support in the view compiler', () => { $I18N_5$ = $MSG_EXTERNAL_1922743304863699161$$APP_SPEC_TS__5$; } else { - $I18N_5$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, 0 {no emails} 1 {one email} other {{$interpolation} emails}}", { + $I18N_5$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, 0 {no emails} 1 {one email} other {{$interpolation} emails}}", { "interpolation": "\uFFFD1\uFFFD" }); } - $I18N_5$ = $r3$.Δi18nPostprocess($I18N_5$, { + $I18N_5$ = $r3$.ɵɵi18nPostprocess($I18N_5$, { "VAR_SELECT": "\uFFFD0\uFFFD" }); function MyComponent_div_3_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div", $_c3$); - $r3$.Δtext(1, " You have "); - $r3$.Δi18n(2, $I18N_5$); - $r3$.Δtext(3, ". "); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div", $_c3$); + $r3$.ɵɵtext(1, " You have "); + $r3$.ɵɵi18n(2, $I18N_5$); + $r3$.ɵɵtext(3, ". "); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - const $ctx_r1$ = $r3$.ΔnextContext(); - $r3$.Δselect(2); - $r3$.Δi18nExp($r3$.Δbind($ctx_r1$.count)); - $r3$.Δi18nExp($r3$.Δbind($ctx_r1$.count)); - $r3$.Δi18nApply(2); + const $ctx_r1$ = $r3$.ɵɵnextContext(); + $r3$.ɵɵselect(2); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($ctx_r1$.count)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($ctx_r1$.count)); + $r3$.ɵɵi18nApply(2); } } … @@ -2571,20 +2571,20 @@ describe('i18n support in the view compiler', () => { vars: 3, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18n(1, $I18N_0$); - $r3$.ΔelementEnd(); - $r3$.Δtemplate(2, MyComponent_div_2_Template, 2, 1, "div", $_c0$); - $r3$.Δtemplate(3, MyComponent_div_3_Template, 4, 2, "div", $_c1$); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18n(1, $I18N_0$); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵtemplate(2, MyComponent_div_2_Template, 2, 1, "div", $_c0$); + $r3$.ɵɵtemplate(3, MyComponent_div_3_Template, 4, 2, "div", $_c1$); } if (rf & 2) { - $r3$.Δselect(1); - $r3$.Δi18nExp($r3$.Δbind(ctx.gender)); - $r3$.Δi18nApply(1); - $r3$.Δselect(2); - $r3$.ΔelementProperty(2, "ngIf", $r3$.Δbind(ctx.visible)); - $r3$.Δselect(3); - $r3$.ΔelementProperty(3, "ngIf", $r3$.Δbind(ctx.available)); + $r3$.ɵɵselect(1); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.gender)); + $r3$.ɵɵi18nApply(1); + $r3$.ɵɵselect(2); + $r3$.ɵɵelementProperty(2, "ngIf", $r3$.ɵɵbind(ctx.visible)); + $r3$.ɵɵselect(3); + $r3$.ɵɵelementProperty(3, "ngIf", $r3$.ɵɵbind(ctx.available)); } } `; @@ -2606,25 +2606,25 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_2949673783721159566$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, 10 {ten} 20 {twenty} other {{$interpolation}}}", { + $I18N_0$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, 10 {ten} 20 {twenty} other {{$interpolation}}}", { "interpolation": "\uFFFD1\uFFFD" }); } - $I18N_0$ = $r3$.Δi18nPostprocess($I18N_0$, { + $I18N_0$ = $r3$.ɵɵi18nPostprocess($I18N_0$, { "VAR_SELECT": "\uFFFD0\uFFFD" }); … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18n(1, $I18N_0$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18n(1, $I18N_0$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(1); - $r3$.Δi18nExp($r3$.Δbind(ctx.age)); - $r3$.Δi18nExp($r3$.Δbind(ctx.other)); - $r3$.Δi18nApply(1); + $r3$.ɵɵselect(1); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.age)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.other)); + $r3$.ɵɵi18nApply(1); } } `; @@ -2654,7 +2654,7 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_EXTERNAL_2417296354340576868$$APP_SPEC_TS_1$; } else { - $I18N_1$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, male {male - {$startBoldText}male{$closeBoldText}} female {female {$startBoldText}female{$closeBoldText}} other {{$startTagDiv}{$startItalicText}other{$closeItalicText}{$closeTagDiv}}}", { + $I18N_1$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, male {male - {$startBoldText}male{$closeBoldText}} female {female {$startBoldText}female{$closeBoldText}} other {{$startTagDiv}{$startItalicText}other{$closeItalicText}{$closeTagDiv}}}", { "startBoldText": "", "closeBoldText": "", "startItalicText": "", @@ -2663,7 +2663,7 @@ describe('i18n support in the view compiler', () => { "closeTagDiv": "" }); } - $I18N_1$ = $r3$.Δi18nPostprocess($I18N_1$, { + $I18N_1$ = $r3$.ɵɵi18nPostprocess($I18N_1$, { "VAR_SELECT": "\uFFFD0\uFFFD" }); const $_c2$ = [1, "other"]; @@ -2681,7 +2681,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_5791551881115084301$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("{$icu}{$startBoldText}Other content{$closeBoldText}{$startTagDiv}{$startItalicText}Another content{$closeItalicText}{$closeTagDiv}", { + $I18N_0$ = $r3$.ɵɵi18nLocalize("{$icu}{$startBoldText}Other content{$closeBoldText}{$startTagDiv}{$startItalicText}Another content{$closeItalicText}{$closeTagDiv}", { "startBoldText": "\uFFFD#2\uFFFD", "closeBoldText": "\uFFFD/#2\uFFFD", "startTagDiv": "\uFFFD#3\uFFFD", @@ -2696,19 +2696,19 @@ describe('i18n support in the view compiler', () => { vars: 1, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18nStart(1, $I18N_0$); - $r3$.Δelement(2, "b"); - $r3$.ΔelementStart(3, "div"); - $r3$.ΔelementStyling($_c2$); - $r3$.Δelement(4, "i"); - $r3$.ΔelementEnd(); - $r3$.Δi18nEnd(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18nStart(1, $I18N_0$); + $r3$.ɵɵelement(2, "b"); + $r3$.ɵɵelementStart(3, "div"); + $r3$.ɵɵelementStyling($_c2$); + $r3$.ɵɵelement(4, "i"); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵi18nEnd(); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δi18nExp($r3$.Δbind(ctx.gender)); - $r3$.Δi18nApply(1); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.gender)); + $r3$.ɵɵi18nApply(1); } } `; @@ -2730,11 +2730,11 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_6879461626778511059$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, male {male of age: {$interpolation}} female {female} other {other}}", { + $I18N_0$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, male {male of age: {$interpolation}} female {female} other {other}}", { "interpolation": "\uFFFD1\uFFFD" }); } - $I18N_0$ = $r3$.Δi18nPostprocess($I18N_0$, { + $I18N_0$ = $r3$.ɵɵi18nPostprocess($I18N_0$, { "VAR_SELECT": "\uFFFD0\uFFFD" }); … @@ -2742,15 +2742,15 @@ describe('i18n support in the view compiler', () => { vars: 2, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18n(1, $I18N_0$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18n(1, $I18N_0$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(1); - $r3$.Δi18nExp($r3$.Δbind(ctx.gender)); - $r3$.Δi18nExp($r3$.Δbind(((ctx.ageA + ctx.ageB) + ctx.ageC))); - $r3$.Δi18nApply(1); + $r3$.ɵɵselect(1); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.gender)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(((ctx.ageA + ctx.ageB) + ctx.ageC))); + $r3$.ɵɵi18nApply(1); } } `; @@ -2773,9 +2773,9 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_EXTERNAL_7842238767399919809$$APP_SPEC_TS_1$; } else { - $I18N_1$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, male {male} female {female} other {other}}"); + $I18N_1$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, male {male} female {female} other {other}}"); } - $I18N_1$ = $r3$.Δi18nPostprocess($I18N_1$, { + $I18N_1$ = $r3$.ɵɵi18nPostprocess($I18N_1$, { "VAR_SELECT": "\uFFFD0\uFFFD" }); var $I18N_2$; @@ -2784,9 +2784,9 @@ describe('i18n support in the view compiler', () => { $I18N_2$ = $MSG_EXTERNAL_7068143081688428291$$APP_SPEC_TS_2$; } else { - $I18N_2$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, 10 {ten} 20 {twenty} 30 {thirty} other {other}}"); + $I18N_2$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, 10 {ten} 20 {twenty} 30 {thirty} other {other}}"); } - $I18N_2$ = $r3$.Δi18nPostprocess($I18N_2$, { + $I18N_2$ = $r3$.ɵɵi18nPostprocess($I18N_2$, { "VAR_SELECT": "\uFFFD1\uFFFD" }); var $I18N_0$; @@ -2798,7 +2798,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_2967249209167308918$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("{$icu}{$icu_1}", { + $I18N_0$ = $r3$.ɵɵi18nLocalize("{$icu}{$icu_1}", { "icu": $I18N_1$, "icu_1": $I18N_2$ }); @@ -2808,15 +2808,15 @@ describe('i18n support in the view compiler', () => { vars: 2, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18n(1, $I18N_0$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18n(1, $I18N_0$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(1); - $r3$.Δi18nExp($r3$.Δbind(ctx.gender)); - $r3$.Δi18nExp($r3$.Δbind(ctx.age)); - $r3$.Δi18nApply(1); + $r3$.ɵɵselect(1); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.gender)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.age)); + $r3$.ɵɵi18nApply(1); } } `; @@ -2844,9 +2844,9 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_APP_SPEC_TS_1$; } else { - $I18N_1$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, male {male} female {female} other {other}}"); + $I18N_1$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, male {male} female {female} other {other}}"); } - $I18N_1$ = $r3$.Δi18nPostprocess($I18N_1$, { + $I18N_1$ = $r3$.ɵɵi18nPostprocess($I18N_1$, { "VAR_SELECT": "\uFFFD0\uFFFD" }); var $I18N_2$; @@ -2855,9 +2855,9 @@ describe('i18n support in the view compiler', () => { $I18N_2$ = $MSG_APP_SPEC_TS_2$; } else { - $I18N_2$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, male {male} female {female} other {other}}"); + $I18N_2$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, male {male} female {female} other {other}}"); } - $I18N_2$ = $r3$.Δi18nPostprocess($I18N_2$, { + $I18N_2$ = $r3$.ɵɵi18nPostprocess($I18N_2$, { "VAR_SELECT": "\uFFFD1\uFFFD" }); const $_c3$ = [${AttributeMarker.Template}, "ngIf"]; @@ -2867,9 +2867,9 @@ describe('i18n support in the view compiler', () => { $I18N_4$ = $MSG_APP_SPEC_TS__4$; } else { - $I18N_4$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, male {male} female {female} other {other}}"); + $I18N_4$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, male {male} female {female} other {other}}"); } - $I18N_4$ = $r3$.Δi18nPostprocess($I18N_4$, { + $I18N_4$ = $r3$.ɵɵi18nPostprocess($I18N_4$, { "VAR_SELECT": "\uFFFD0:1\uFFFD" }); var $I18N_0$; @@ -2883,27 +2883,27 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("{$icu}{$startTagDiv}{$icu}{$closeTagDiv}{$startTagDiv_1}{$icu}{$closeTagDiv}", { + $I18N_0$ = $r3$.ɵɵi18nLocalize("{$icu}{$startTagDiv}{$icu}{$closeTagDiv}{$startTagDiv_1}{$icu}{$closeTagDiv}", { "startTagDiv": "\uFFFD#2\uFFFD", "closeTagDiv": "[\uFFFD/#2\uFFFD|\uFFFD/#1:1\uFFFD\uFFFD/*3:1\uFFFD]", "startTagDiv_1": "\uFFFD*3:1\uFFFD\uFFFD#1:1\uFFFD", "icu": "\uFFFDI18N_EXP_ICU\uFFFD" }); } - $I18N_0$ = $r3$.Δi18nPostprocess($I18N_0$, { + $I18N_0$ = $r3$.ɵɵi18nPostprocess($I18N_0$, { "ICU": [$I18N_1$, $I18N_2$, $I18N_4$] }); function MyComponent_div_3_Template(rf, ctx) { if (rf & 1) { - $r3$.Δi18nStart(0, $I18N_0$, 1); - $r3$.Δelement(1, "div"); - $r3$.Δi18nEnd(); + $r3$.ɵɵi18nStart(0, $I18N_0$, 1); + $r3$.ɵɵelement(1, "div"); + $r3$.ɵɵi18nEnd(); } if (rf & 2) { - const $ctx_r0$ = $r3$.ΔnextContext(); - $r3$.Δselect(0); - $r3$.Δi18nExp($r3$.Δbind($ctx_r0$.gender)); - $r3$.Δi18nApply(0); + const $ctx_r0$ = $r3$.ɵɵnextContext(); + $r3$.ɵɵselect(0); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($ctx_r0$.gender)); + $r3$.ɵɵi18nApply(0); } } … @@ -2911,19 +2911,19 @@ describe('i18n support in the view compiler', () => { vars: 3, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18nStart(1, $I18N_0$); - $r3$.Δelement(2, "div"); - $r3$.Δtemplate(3, MyComponent_div_3_Template, 2, 1, "div", $_c3$); - $r3$.Δi18nEnd(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18nStart(1, $I18N_0$); + $r3$.ɵɵelement(2, "div"); + $r3$.ɵɵtemplate(3, MyComponent_div_3_Template, 2, 1, "div", $_c3$); + $r3$.ɵɵi18nEnd(); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(3); - $r3$.ΔelementProperty(3, "ngIf", $r3$.Δbind(ctx.visible)); - $r3$.Δi18nExp($r3$.Δbind(ctx.gender)); - $r3$.Δi18nExp($r3$.Δbind(ctx.gender)); - $r3$.Δi18nApply(1); + $r3$.ɵɵselect(3); + $r3$.ɵɵelementProperty(3, "ngIf", $r3$.ɵɵbind(ctx.visible)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.gender)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.gender)); + $r3$.ɵɵi18nApply(1); } } `; @@ -2952,9 +2952,9 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_343563413083115114$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("{VAR_SELECT_1, select, male {male of age: {VAR_SELECT, select, 10 {ten} 20 {twenty} 30 {thirty} other {other}}} female {female} other {other}}"); + $I18N_0$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT_1, select, male {male of age: {VAR_SELECT, select, 10 {ten} 20 {twenty} 30 {thirty} other {other}}} female {female} other {other}}"); } - $I18N_0$ = $r3$.Δi18nPostprocess($I18N_0$, { + $I18N_0$ = $r3$.ɵɵi18nPostprocess($I18N_0$, { "VAR_SELECT": "\uFFFD0\uFFFD", "VAR_SELECT_1": "\uFFFD1\uFFFD" }); @@ -2963,15 +2963,15 @@ describe('i18n support in the view compiler', () => { vars: 2, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18n(1, $I18N_0$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18n(1, $I18N_0$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(1); - $r3$.Δi18nExp($r3$.Δbind(ctx.age)); - $r3$.Δi18nExp($r3$.Δbind(ctx.gender)); - $r3$.Δi18nApply(1); + $r3$.ɵɵselect(1); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.age)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.gender)); + $r3$.ɵɵi18nApply(1); } } `; @@ -2999,9 +2999,9 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_EXTERNAL_7842238767399919809$$APP_SPEC_TS_1$; } else { - $I18N_1$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, male {male} female {female} other {other}}"); + $I18N_1$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, male {male} female {female} other {other}}"); } - $I18N_1$ = $r3$.Δi18nPostprocess($I18N_1$, { + $I18N_1$ = $r3$.ɵɵi18nPostprocess($I18N_1$, { "VAR_SELECT": "\uFFFD0\uFFFD" }); const $_c2$ = [${AttributeMarker.Template}, "ngIf"]; @@ -3011,9 +3011,9 @@ describe('i18n support in the view compiler', () => { $I18N_3$ = $MSG_EXTERNAL_7068143081688428291$$APP_SPEC_TS__3$; } else { - $I18N_3$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, 10 {ten} 20 {twenty} 30 {thirty} other {other}}"); + $I18N_3$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, 10 {ten} 20 {twenty} 30 {thirty} other {other}}"); } - $I18N_3$ = $r3$.Δi18nPostprocess($I18N_3$, { + $I18N_3$ = $r3$.ɵɵi18nPostprocess($I18N_3$, { "VAR_SELECT": "\uFFFD0:1\uFFFD" }); var $I18N_0$; @@ -3027,7 +3027,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_1194472282609532229$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("{$icu}{$startTagSpan}{$icu_1}{$closeTagSpan}", { + $I18N_0$ = $r3$.ɵɵi18nLocalize("{$icu}{$startTagSpan}{$icu_1}{$closeTagSpan}", { "startTagSpan": "\uFFFD*2:1\uFFFD\uFFFD#1:1\uFFFD", "closeTagSpan": "\uFFFD/#1:1\uFFFD\uFFFD/*2:1\uFFFD", "icu": $I18N_1$, @@ -3036,15 +3036,15 @@ describe('i18n support in the view compiler', () => { } function MyComponent_span_2_Template(rf, ctx) { if (rf & 1) { - $r3$.Δi18nStart(0, $I18N_0$, 1); - $r3$.Δelement(1, "span"); - $r3$.Δi18nEnd(); + $r3$.ɵɵi18nStart(0, $I18N_0$, 1); + $r3$.ɵɵelement(1, "span"); + $r3$.ɵɵi18nEnd(); } if (rf & 2) { - const $ctx_r0$ = $r3$.ΔnextContext(); - $r3$.Δselect(0); - $r3$.Δi18nExp($r3$.Δbind($ctx_r0$.age)); - $r3$.Δi18nApply(0); + const $ctx_r0$ = $r3$.ɵɵnextContext(); + $r3$.ɵɵselect(0); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($ctx_r0$.age)); + $r3$.ɵɵi18nApply(0); } } … @@ -3052,17 +3052,17 @@ describe('i18n support in the view compiler', () => { vars: 2, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18nStart(1, $I18N_0$); - $r3$.Δtemplate(2, MyComponent_span_2_Template, 2, 1, "span", $_c2$); - $r3$.Δi18nEnd(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18nStart(1, $I18N_0$); + $r3$.ɵɵtemplate(2, MyComponent_span_2_Template, 2, 1, "span", $_c2$); + $r3$.ɵɵi18nEnd(); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(2); - $r3$.ΔelementProperty(2, "ngIf", $r3$.Δbind(ctx.ageVisible)); - $r3$.Δi18nExp($r3$.Δbind(ctx.gender)); - $r3$.Δi18nApply(1); + $r3$.ɵɵselect(2); + $r3$.ɵɵelementProperty(2, "ngIf", $r3$.ɵɵbind(ctx.ageVisible)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.gender)); + $r3$.ɵɵi18nApply(1); } } `; @@ -3090,12 +3090,12 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_EXTERNAL_7825031864601787094$$APP_SPEC_TS_1$; } else { - $I18N_1$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, male {male {$interpolation}} female {female {$interpolation_1}} other {other}}", { + $I18N_1$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, male {male {$interpolation}} female {female {$interpolation_1}} other {other}}", { "interpolation": "\uFFFD1\uFFFD", "interpolation_1": "\uFFFD2\uFFFD" }); } - $I18N_1$ = $r3$.Δi18nPostprocess($I18N_1$, { + $I18N_1$ = $r3$.ɵɵi18nPostprocess($I18N_1$, { "VAR_SELECT": "\uFFFD0\uFFFD" }); const $_c0$ = [${AttributeMarker.Template}, "ngIf"]; @@ -3107,11 +3107,11 @@ describe('i18n support in the view compiler', () => { $I18N_3$ = $MSG_EXTERNAL_2310343208266678305$$APP_SPEC_TS__3$; } else { - $I18N_3$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, 10 {ten} 20 {twenty} 30 {thirty} other {other: {$interpolation}}}", { + $I18N_3$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, 10 {ten} 20 {twenty} 30 {thirty} other {other: {$interpolation}}}", { "interpolation": "\uFFFD1:1\uFFFD" }); } - $I18N_3$ = $r3$.Δi18nPostprocess($I18N_3$, { + $I18N_3$ = $r3$.ɵɵi18nPostprocess($I18N_3$, { "VAR_SELECT": "\uFFFD0:1\uFFFD" }); var $I18N_0$; @@ -3125,7 +3125,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_7186042105600518133$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("{$icu}{$startTagSpan}{$icu_1}{$closeTagSpan}", { + $I18N_0$ = $r3$.ɵɵi18nLocalize("{$icu}{$startTagSpan}{$icu_1}{$closeTagSpan}", { "startTagSpan": "\uFFFD*2:1\uFFFD\uFFFD#1:1\uFFFD", "closeTagSpan": "\uFFFD/#1:1\uFFFD\uFFFD/*2:1\uFFFD", "icu": $I18N_1$, @@ -3134,16 +3134,16 @@ describe('i18n support in the view compiler', () => { } function MyComponent_span_2_Template(rf, ctx) { if (rf & 1) { - $r3$.Δi18nStart(0, $I18N_0$, 1); - $r3$.Δelement(1, "span"); - $r3$.Δi18nEnd(); + $r3$.ɵɵi18nStart(0, $I18N_0$, 1); + $r3$.ɵɵelement(1, "span"); + $r3$.ɵɵi18nEnd(); } if (rf & 2) { - const $ctx_r0$ = $r3$.ΔnextContext(); - $r3$.Δselect(0); - $r3$.Δi18nExp($r3$.Δbind($ctx_r0$.age)); - $r3$.Δi18nExp($r3$.Δbind($ctx_r0$.otherAge)); - $r3$.Δi18nApply(0); + const $ctx_r0$ = $r3$.ɵɵnextContext(); + $r3$.ɵɵselect(0); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($ctx_r0$.age)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind($ctx_r0$.otherAge)); + $r3$.ɵɵi18nApply(0); } } … @@ -3151,19 +3151,19 @@ describe('i18n support in the view compiler', () => { vars: 4, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18nStart(1, $I18N_0$); - $r3$.Δtemplate(2, MyComponent_span_2_Template, 2, 2, "span", $_c2$); - $r3$.Δi18nEnd(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18nStart(1, $I18N_0$); + $r3$.ɵɵtemplate(2, MyComponent_span_2_Template, 2, 2, "span", $_c2$); + $r3$.ɵɵi18nEnd(); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(2); - $r3$.ΔelementProperty(2, "ngIf", $r3$.Δbind(ctx.ageVisible)); - $r3$.Δi18nExp($r3$.Δbind(ctx.gender)); - $r3$.Δi18nExp($r3$.Δbind(ctx.weight)); - $r3$.Δi18nExp($r3$.Δbind(ctx.height)); - $r3$.Δi18nApply(1); + $r3$.ɵɵselect(2); + $r3$.ɵɵelementProperty(2, "ngIf", $r3$.ɵɵbind(ctx.ageVisible)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.gender)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.weight)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.height)); + $r3$.ɵɵi18nApply(1); } } `; @@ -3193,13 +3193,13 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_4853189513362404940$$APP_SPEC_TS_0$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("{VAR_SELECT, select, male {male {$phA}} female {female {$phB}} other {other {$phC}}}", { + $I18N_0$ = $r3$.ɵɵi18nLocalize("{VAR_SELECT, select, male {male {$phA}} female {female {$phB}} other {other {$phC}}}", { "phA": "\uFFFD1\uFFFD", "phB": "\uFFFD2\uFFFD", "phC": "\uFFFD3\uFFFD" }); } - $I18N_0$ = $r3$.Δi18nPostprocess($I18N_0$, { + $I18N_0$ = $r3$.ɵɵi18nPostprocess($I18N_0$, { "VAR_SELECT": "\uFFFD0\uFFFD" }); … @@ -3207,17 +3207,17 @@ describe('i18n support in the view compiler', () => { vars: 4, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18n(1, $I18N_0$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18n(1, $I18N_0$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(1); - $r3$.Δi18nExp($r3$.Δbind(ctx.gender)); - $r3$.Δi18nExp($r3$.Δbind(ctx.weight)); - $r3$.Δi18nExp($r3$.Δbind(ctx.height)); - $r3$.Δi18nExp($r3$.Δbind(ctx.age)); - $r3$.Δi18nApply(1); + $r3$.ɵɵselect(1); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.gender)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.weight)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.height)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.age)); + $r3$.ɵɵi18nApply(1); } } `; diff --git a/packages/compiler-cli/test/compliance/r3_view_compiler_input_outputs_spec.ts b/packages/compiler-cli/test/compliance/r3_view_compiler_input_outputs_spec.ts index 1baa56d05c..97dadc1562 100644 --- a/packages/compiler-cli/test/compliance/r3_view_compiler_input_outputs_spec.ts +++ b/packages/compiler-cli/test/compliance/r3_view_compiler_input_outputs_spec.ts @@ -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", diff --git a/packages/compiler-cli/test/compliance/r3_view_compiler_listener_spec.ts b/packages/compiler-cli/test/compliance/r3_view_compiler_listener_spec.ts index a5a6544408..520764a787 100644 --- a/packages/compiler-cli/test/compliance/r3_view_compiler_listener_spec.ts +++ b/packages/compiler-cli/test/compliance/r3_view_compiler_listener_spec.ts @@ -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 diff --git a/packages/compiler-cli/test/compliance/r3_view_compiler_providers_spec.ts b/packages/compiler-cli/test/compliance/r3_view_compiler_providers_spec.ts index 6198a03d02..0a0eaed14e 100644 --- a/packages/compiler-cli/test/compliance/r3_view_compiler_providers_spec.ts +++ b/packages/compiler-cli/test/compliance/r3_view_compiler_providers_spec.ts @@ -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', () => { diff --git a/packages/compiler-cli/test/compliance/r3_view_compiler_spec.ts b/packages/compiler-cli/test/compliance/r3_view_compiler_spec.ts index 80b486a847..37ca5e8d0e 100644 --- a/packages/compiler-cli/test/compliance/r3_view_compiler_spec.ts +++ b/packages/compiler-cli/test/compliance/r3_view_compiler_spec.ts @@ -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); diff --git a/packages/compiler-cli/test/compliance/r3_view_compiler_styling_spec.ts b/packages/compiler-cli/test/compliance/r3_view_compiler_styling_spec.ts index 3aa7149de4..abce0a642e 100644 --- a/packages/compiler-cli/test/compliance/r3_view_compiler_styling_spec.ts +++ b/packages/compiler-cli/test/compliance/r3_view_compiler_styling_spec.ts @@ -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(); } } `; diff --git a/packages/compiler-cli/test/compliance/r3_view_compiler_template_spec.ts b/packages/compiler-cli/test/compliance/r3_view_compiler_template_spec.ts index a3815aa4b0..e9eb9a4b3c 100644 --- a/packages/compiler-cli/test/compliance/r3_view_compiler_template_spec.ts +++ b/packages/compiler-cli/test/compliance/r3_view_compiler_template_spec.ts @@ -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))); } }`; diff --git a/packages/compiler-cli/test/ngc_spec.ts b/packages/compiler-cli/test/ngc_spec.ts index a378063cf4..f6b79f9e53 100644 --- a/packages/compiler-cli/test/ngc_spec.ts +++ b/packages/compiler-cli/test/ngc_spec.ts @@ -2075,7 +2075,7 @@ describe('ngc transformer command-line', () => { }) export class Service {} `); - expect(source).toMatch(/ngInjectableDef = .+\.ΔdefineInjectable\(/); + expect(source).toMatch(/ngInjectableDef = .+\.ɵɵdefineInjectable\(/); expect(source).toMatch(/ngInjectableDef.*token: Service/); expect(source).toMatch(/ngInjectableDef.*providedIn: .+\.Module/); }); @@ -2131,7 +2131,7 @@ describe('ngc transformer command-line', () => { }) export class Service {} `); - expect(source).toMatch(/ngInjectableDef.*return ..\.Δinject\(Existing\)/); + expect(source).toMatch(/ngInjectableDef.*return ..\.ɵɵinject\(Existing\)/); }); it('compiles a useFactory InjectableDef with optional dep', () => { @@ -2151,7 +2151,7 @@ describe('ngc transformer command-line', () => { constructor(e: Existing|null) {} } `); - expect(source).toMatch(/ngInjectableDef.*return ..\(..\.Δinject\(Existing, 8\)/); + expect(source).toMatch(/ngInjectableDef.*return ..\(..\.ɵɵinject\(Existing, 8\)/); }); it('compiles a useFactory InjectableDef with skip-self dep', () => { @@ -2171,7 +2171,7 @@ describe('ngc transformer command-line', () => { constructor(e: Existing) {} } `); - expect(source).toMatch(/ngInjectableDef.*return ..\(..\.Δinject\(Existing, 4\)/); + expect(source).toMatch(/ngInjectableDef.*return ..\(..\.ɵɵinject\(Existing, 4\)/); }); it('compiles a service that depends on a token', () => { @@ -2188,7 +2188,7 @@ describe('ngc transformer command-line', () => { constructor(@Inject(TOKEN) value: boolean) {} } `); - expect(source).toMatch(/ngInjectableDef = .+\.ΔdefineInjectable\(/); + expect(source).toMatch(/ngInjectableDef = .+\.ɵɵdefineInjectable\(/); expect(source).toMatch(/ngInjectableDef.*token: Service/); expect(source).toMatch(/ngInjectableDef.*providedIn: .+\.Module/); }); @@ -2215,7 +2215,7 @@ describe('ngc transformer command-line', () => { constructor(@Inject(TOKEN) token: any) {} } `); - expect(source).toMatch(/new Service\(i0\.Δinject\(exports\.TOKEN\)\);/); + expect(source).toMatch(/new Service\(i0\.ɵɵinject\(exports\.TOKEN\)\);/); }); }); diff --git a/packages/compiler-cli/test/ngtsc/fake_core/index.ts b/packages/compiler-cli/test/ngtsc/fake_core/index.ts index 3876e8256d..802d1889b3 100644 --- a/packages/compiler-cli/test/ngtsc/fake_core/index.ts +++ b/packages/compiler-cli/test/ngtsc/fake_core/index.ts @@ -62,8 +62,8 @@ export function forwardRef(fn: () => T): T { export interface SimpleChanges { [propName: string]: any; } -export type ΔNgModuleDefWithMeta = any; -export type ΔDirectiveDefWithMeta = any; +export type ɵɵNgModuleDefWithMeta = any; +export type ɵɵDirectiveDefWithMeta = any; export enum ViewEncapsulation { Emulated = 0, diff --git a/packages/compiler-cli/test/ngtsc/ngtsc_spec.ts b/packages/compiler-cli/test/ngtsc/ngtsc_spec.ts index 8d29a7f2dc..e4a4be0fdf 100644 --- a/packages/compiler-cli/test/ngtsc/ngtsc_spec.ts +++ b/packages/compiler-cli/test/ngtsc/ngtsc_spec.ts @@ -18,12 +18,12 @@ const varRegExp = (name: string): RegExp => new RegExp(`var \\w+ = \\[\"${name}\ const viewQueryRegExp = (descend: boolean, ref?: string): RegExp => { const maybeRef = ref ? `${ref}` : `null`; - return new RegExp(`i0\\.ΔviewQuery\\(\\w+, ${descend}, ${maybeRef}\\)`); + return new RegExp(`i0\\.ɵɵviewQuery\\(\\w+, ${descend}, ${maybeRef}\\)`); }; const contentQueryRegExp = (predicate: string, descend: boolean, ref?: string): RegExp => { const maybeRef = ref ? `${ref}` : `null`; - return new RegExp(`i0\\.ΔcontentQuery\\(dirIndex, ${predicate}, ${descend}, ${maybeRef}\\)`); + return new RegExp(`i0\\.ɵɵcontentQuery\\(dirIndex, ${predicate}, ${descend}, ${maybeRef}\\)`); }; const setClassMetadataRegExp = (expectedType: string): RegExp => @@ -56,8 +56,8 @@ describe('ngtsc behavioral tests', () => { expect(jsContents).toContain('Service.ngInjectableDef ='); expect(jsContents).not.toContain('__decorate'); const dtsContents = env.getContents('test.d.ts'); - expect(dtsContents).toContain('static ngInjectableDef: i0.ΔInjectableDef;'); - expect(dtsContents).toContain('static ngInjectableDef: i0.ΔInjectableDef;'); + expect(dtsContents).toContain('static ngInjectableDef: i0.ɵɵInjectableDef;'); + expect(dtsContents).toContain('static ngInjectableDef: i0.ɵɵInjectableDef;'); }); it('should compile Injectables with a generic service', () => { @@ -75,7 +75,7 @@ describe('ngtsc behavioral tests', () => { const jsContents = env.getContents('test.js'); expect(jsContents).toContain('Store.ngInjectableDef ='); const dtsContents = env.getContents('test.d.ts'); - expect(dtsContents).toContain('static ngInjectableDef: i0.ΔInjectableDef>;'); + expect(dtsContents).toContain('static ngInjectableDef: i0.ɵɵInjectableDef>;'); }); it('should compile Injectables with providedIn without errors', () => { @@ -99,11 +99,11 @@ describe('ngtsc behavioral tests', () => { expect(jsContents).toContain('Dep.ngInjectableDef ='); expect(jsContents).toContain('Service.ngInjectableDef ='); expect(jsContents) - .toContain('return new (t || Service)(i0.Δinject(Dep)); }, providedIn: \'root\' });'); + .toContain('return new (t || Service)(i0.ɵɵinject(Dep)); }, providedIn: \'root\' });'); expect(jsContents).not.toContain('__decorate'); const dtsContents = env.getContents('test.d.ts'); - expect(dtsContents).toContain('static ngInjectableDef: i0.ΔInjectableDef;'); - expect(dtsContents).toContain('static ngInjectableDef: i0.ΔInjectableDef;'); + expect(dtsContents).toContain('static ngInjectableDef: i0.ɵɵInjectableDef;'); + expect(dtsContents).toContain('static ngInjectableDef: i0.ɵɵInjectableDef;'); }); it('should compile Injectables with providedIn and factory without errors', () => { @@ -128,7 +128,7 @@ describe('ngtsc behavioral tests', () => { expect(jsContents).toContain('return r; }, providedIn: \'root\' });'); expect(jsContents).not.toContain('__decorate'); const dtsContents = env.getContents('test.d.ts'); - expect(dtsContents).toContain('static ngInjectableDef: i0.ΔInjectableDef;'); + expect(dtsContents).toContain('static ngInjectableDef: i0.ɵɵInjectableDef;'); }); it('should compile Injectables with providedIn and factory with deps without errors', () => { @@ -151,13 +151,13 @@ describe('ngtsc behavioral tests', () => { const jsContents = env.getContents('test.js'); expect(jsContents).toContain('Service.ngInjectableDef ='); expect(jsContents).toContain('factory: function Service_Factory(t) { var r = null; if (t) {'); - expect(jsContents).toContain('(r = new t(i0.Δinject(Dep)));'); + expect(jsContents).toContain('(r = new t(i0.ɵɵinject(Dep)));'); expect(jsContents) - .toContain('(r = (function (dep) { return new Service(dep); })(i0.Δinject(Dep)));'); + .toContain('(r = (function (dep) { return new Service(dep); })(i0.ɵɵinject(Dep)));'); expect(jsContents).toContain('return r; }, providedIn: \'root\' });'); expect(jsContents).not.toContain('__decorate'); const dtsContents = env.getContents('test.d.ts'); - expect(dtsContents).toContain('static ngInjectableDef: i0.ΔInjectableDef;'); + expect(dtsContents).toContain('static ngInjectableDef: i0.ɵɵInjectableDef;'); }); it('should compile @Injectable with an @Optional dependency', () => { @@ -193,13 +193,13 @@ describe('ngtsc behavioral tests', () => { env.driveMain(); const jsContents = env.getContents('test.js'); - expect(jsContents).toContain('TestCmp.ngComponentDef = i0.ΔdefineComponent'); + expect(jsContents).toContain('TestCmp.ngComponentDef = i0.ɵɵdefineComponent'); expect(jsContents).not.toContain('__decorate'); const dtsContents = env.getContents('test.d.ts'); expect(dtsContents) .toContain( - 'static ngComponentDef: i0.ΔComponentDefWithMeta'); + 'static ngComponentDef: i0.ɵɵComponentDefWithMeta'); }); it('should compile Components (dynamic inline template) without errors', () => { @@ -217,13 +217,13 @@ describe('ngtsc behavioral tests', () => { env.driveMain(); const jsContents = env.getContents('test.js'); - expect(jsContents).toContain('TestCmp.ngComponentDef = i0.ΔdefineComponent'); + expect(jsContents).toContain('TestCmp.ngComponentDef = i0.ɵɵdefineComponent'); expect(jsContents).not.toContain('__decorate'); const dtsContents = env.getContents('test.d.ts'); expect(dtsContents) .toContain( - 'static ngComponentDef: i0.ΔComponentDefWithMeta'); + 'static ngComponentDef: i0.ɵɵComponentDefWithMeta'); }); it('should compile Components (function call inline template) without errors', () => { @@ -244,13 +244,13 @@ describe('ngtsc behavioral tests', () => { env.driveMain(); const jsContents = env.getContents('test.js'); - expect(jsContents).toContain('TestCmp.ngComponentDef = i0.ΔdefineComponent'); + expect(jsContents).toContain('TestCmp.ngComponentDef = i0.ɵɵdefineComponent'); expect(jsContents).not.toContain('__decorate'); const dtsContents = env.getContents('test.d.ts'); expect(dtsContents) .toContain( - 'static ngComponentDef: i0.ΔComponentDefWithMeta'); + 'static ngComponentDef: i0.ɵɵComponentDefWithMeta'); }); it('should compile Components (external template) without errors', () => { @@ -351,13 +351,13 @@ describe('ngtsc behavioral tests', () => { env.driveMain(); const jsContents = env.getContents('test.js'); - expect(jsContents).toContain('TestBase.ngBaseDef = i0.ΔdefineBase'); - expect(jsContents).toContain('TestComponent.ngComponentDef = i0.ΔdefineComponent'); - expect(jsContents).toContain('TestDirective.ngDirectiveDef = i0.ΔdefineDirective'); - expect(jsContents).toContain('TestPipe.ngPipeDef = i0.ΔdefinePipe'); - expect(jsContents).toContain('TestInjectable.ngInjectableDef = i0.ΔdefineInjectable'); - expect(jsContents).toContain('MyModule.ngModuleDef = i0.ΔdefineNgModule'); - expect(jsContents).toContain('MyModule.ngInjectorDef = i0.ΔdefineInjector'); + expect(jsContents).toContain('TestBase.ngBaseDef = i0.ɵɵdefineBase'); + expect(jsContents).toContain('TestComponent.ngComponentDef = i0.ɵɵdefineComponent'); + expect(jsContents).toContain('TestDirective.ngDirectiveDef = i0.ɵɵdefineDirective'); + expect(jsContents).toContain('TestPipe.ngPipeDef = i0.ɵɵdefinePipe'); + expect(jsContents).toContain('TestInjectable.ngInjectableDef = i0.ɵɵdefineInjectable'); + expect(jsContents).toContain('MyModule.ngModuleDef = i0.ɵɵdefineNgModule'); + expect(jsContents).toContain('MyModule.ngInjectorDef = i0.ɵɵdefineInjector'); expect(jsContents).toContain('inputs: { input: "input" }'); expect(jsContents).toContain('outputs: { output: "output" }'); }); @@ -442,25 +442,26 @@ describe('ngtsc behavioral tests', () => { env.driveMain(); const jsContents = env.getContents('test.js'); - expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule, bootstrap: [TestCmp] });'); expect(jsContents) - .toContain('/*@__PURE__*/ i0.ΔsetNgModuleScope(TestModule, { declarations: [TestCmp] });'); + .toContain('i0.ɵɵdefineNgModule({ type: TestModule, bootstrap: [TestCmp] });'); + expect(jsContents) + .toContain('/*@__PURE__*/ i0.ɵɵsetNgModuleScope(TestModule, { declarations: [TestCmp] });'); expect(jsContents) .toContain( - 'i0.ΔdefineInjector({ factory: ' + + 'i0.ɵɵdefineInjector({ factory: ' + 'function TestModule_Factory(t) { return new (t || TestModule)(); } });'); const dtsContents = env.getContents('test.d.ts'); expect(dtsContents) .toContain( - 'static ngComponentDef: i0.ΔComponentDefWithMeta'); + 'static ngComponentDef: i0.ɵɵComponentDefWithMeta'); expect(dtsContents) .toContain( - 'static ngModuleDef: i0.ΔNgModuleDefWithMeta'); + 'static ngModuleDef: i0.ɵɵNgModuleDefWithMeta'); expect(dtsContents).not.toContain('__decorate'); }); - it('should not emit a ΔsetNgModuleScope call when no scope metadata is present', () => { + it('should not emit a ɵɵsetNgModuleScope call when no scope metadata is present', () => { env.tsconfig(); env.write('test.ts', ` import {NgModule} from '@angular/core'; @@ -472,8 +473,8 @@ describe('ngtsc behavioral tests', () => { env.driveMain(); const jsContents = env.getContents('test.js'); - expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule });'); - expect(jsContents).not.toContain('ΔsetNgModuleScope(TestModule,'); + expect(jsContents).toContain('i0.ɵɵdefineNgModule({ type: TestModule });'); + expect(jsContents).not.toContain('ɵɵsetNgModuleScope(TestModule,'); }); it('should filter out directives and pipes from module exports in the injector def', () => { @@ -514,15 +515,15 @@ describe('ngtsc behavioral tests', () => { export class Comp {} `); env.write('node_modules/@angular/router/index.d.ts', ` - import {ΔComponentDefWithMeta, ModuleWithProviders, ΔNgModuleDefWithMeta} from '@angular/core'; + import {ɵɵComponentDefWithMeta, ModuleWithProviders, ɵɵNgModuleDefWithMeta} from '@angular/core'; export declare class RouterComp { - static ngComponentDef: ΔComponentDefWithMeta + static ngComponentDef: ɵɵComponentDefWithMeta } declare class RouterModule { static forRoot(): ModuleWithProviders; - static ngModuleDef: ΔNgModuleDefWithMeta; + static ngModuleDef: ɵɵNgModuleDefWithMeta; } `); @@ -531,7 +532,7 @@ describe('ngtsc behavioral tests', () => { const jsContents = env.getContents('test.js'); expect(jsContents) .toContain( - 'i0.ΔdefineInjector({ factory: function TestModule_Factory(t) ' + + 'i0.ɵɵdefineInjector({ factory: function TestModule_Factory(t) ' + '{ return new (t || TestModule)(); }, imports: [[OtherModule, RouterModule.forRoot()],' + '\n OtherModule,\n RouterModule] });'); }); @@ -563,18 +564,18 @@ describe('ngtsc behavioral tests', () => { env.driveMain(); const jsContents = env.getContents('test.js'); - expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule });'); + expect(jsContents).toContain('i0.ɵɵdefineNgModule({ type: TestModule });'); expect(jsContents) .toContain( - `TestModule.ngInjectorDef = i0.ΔdefineInjector({ factory: ` + + `TestModule.ngInjectorDef = i0.ɵɵdefineInjector({ factory: ` + `function TestModule_Factory(t) { return new (t || TestModule)(); }, providers: [{ provide: ` + `Token, useValue: 'test' }], imports: [[OtherModule]] });`); const dtsContents = env.getContents('test.d.ts'); expect(dtsContents) .toContain( - 'static ngModuleDef: i0.ΔNgModuleDefWithMeta'); - expect(dtsContents).toContain('static ngInjectorDef: i0.ΔInjectorDef'); + 'static ngModuleDef: i0.ɵɵNgModuleDefWithMeta'); + expect(dtsContents).toContain('static ngInjectorDef: i0.ɵɵInjectorDef'); }); it('should compile NgModules with factory providers without errors', () => { @@ -604,18 +605,18 @@ describe('ngtsc behavioral tests', () => { env.driveMain(); const jsContents = env.getContents('test.js'); - expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule });'); + expect(jsContents).toContain('i0.ɵɵdefineNgModule({ type: TestModule });'); expect(jsContents) .toContain( - `TestModule.ngInjectorDef = i0.ΔdefineInjector({ factory: ` + + `TestModule.ngInjectorDef = i0.ɵɵdefineInjector({ factory: ` + `function TestModule_Factory(t) { return new (t || TestModule)(); }, providers: [{ provide: ` + `Token, useFactory: function () { return new Token(); } }], imports: [[OtherModule]] });`); const dtsContents = env.getContents('test.d.ts'); expect(dtsContents) .toContain( - 'static ngModuleDef: i0.ΔNgModuleDefWithMeta'); - expect(dtsContents).toContain('static ngInjectorDef: i0.ΔInjectorDef'); + 'static ngModuleDef: i0.ɵɵNgModuleDefWithMeta'); + expect(dtsContents).toContain('static ngInjectorDef: i0.ɵɵInjectorDef'); }); it('should compile NgModules with factory providers and deps without errors', () => { @@ -649,18 +650,18 @@ describe('ngtsc behavioral tests', () => { env.driveMain(); const jsContents = env.getContents('test.js'); - expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule });'); + expect(jsContents).toContain('i0.ɵɵdefineNgModule({ type: TestModule });'); expect(jsContents) .toContain( - `TestModule.ngInjectorDef = i0.ΔdefineInjector({ factory: ` + + `TestModule.ngInjectorDef = i0.ɵɵdefineInjector({ factory: ` + `function TestModule_Factory(t) { return new (t || TestModule)(); }, providers: [{ provide: ` + `Token, useFactory: function (dep) { return new Token(dep); }, deps: [Dep] }], imports: [[OtherModule]] });`); const dtsContents = env.getContents('test.d.ts'); expect(dtsContents) .toContain( - 'static ngModuleDef: i0.ΔNgModuleDefWithMeta'); - expect(dtsContents).toContain('static ngInjectorDef: i0.ΔInjectorDef'); + 'static ngModuleDef: i0.ɵɵNgModuleDefWithMeta'); + expect(dtsContents).toContain('static ngInjectorDef: i0.ɵɵInjectorDef'); }); it('should compile NgModules with references to local components', () => { @@ -821,9 +822,9 @@ describe('ngtsc behavioral tests', () => { expect(jsContents) .toContain( - 'TestPipe.ngPipeDef = i0.ΔdefinePipe({ name: "test-pipe", type: TestPipe, ' + + 'TestPipe.ngPipeDef = i0.ɵɵdefinePipe({ name: "test-pipe", type: TestPipe, ' + 'factory: function TestPipe_Factory(t) { return new (t || TestPipe)(); }, pure: false })'); - expect(dtsContents).toContain('static ngPipeDef: i0.ΔPipeDefWithMeta;'); + expect(dtsContents).toContain('static ngPipeDef: i0.ɵɵPipeDefWithMeta;'); }); it('should compile pure Pipes without errors', () => { @@ -844,9 +845,9 @@ describe('ngtsc behavioral tests', () => { expect(jsContents) .toContain( - 'TestPipe.ngPipeDef = i0.ΔdefinePipe({ name: "test-pipe", type: TestPipe, ' + + 'TestPipe.ngPipeDef = i0.ɵɵdefinePipe({ name: "test-pipe", type: TestPipe, ' + 'factory: function TestPipe_Factory(t) { return new (t || TestPipe)(); }, pure: true })'); - expect(dtsContents).toContain('static ngPipeDef: i0.ΔPipeDefWithMeta;'); + expect(dtsContents).toContain('static ngPipeDef: i0.ɵɵPipeDefWithMeta;'); }); it('should compile Pipes with dependencies', () => { @@ -868,7 +869,7 @@ describe('ngtsc behavioral tests', () => { env.driveMain(); const jsContents = env.getContents('test.js'); - expect(jsContents).toContain('return new (t || TestPipe)(i0.ΔdirectiveInject(Dep));'); + expect(jsContents).toContain('return new (t || TestPipe)(i0.ɵɵdirectiveInject(Dep));'); }); it('should compile Pipes with generic types', () => { @@ -888,7 +889,7 @@ describe('ngtsc behavioral tests', () => { expect(jsContents).toContain('TestPipe.ngPipeDef ='); const dtsContents = env.getContents('test.d.ts'); expect(dtsContents) - .toContain('static ngPipeDef: i0.ΔPipeDefWithMeta, "test-pipe">;'); + .toContain('static ngPipeDef: i0.ɵɵPipeDefWithMeta, "test-pipe">;'); }); it('should include @Pipes in @NgModule scopes', () => { @@ -914,7 +915,7 @@ describe('ngtsc behavioral tests', () => { const dtsContents = env.getContents('test.d.ts'); expect(dtsContents) .toContain( - 'i0.ΔNgModuleDefWithMeta'); + 'i0.ɵɵNgModuleDefWithMeta'); }); describe('empty and missing selectors', () => { @@ -1029,7 +1030,7 @@ describe('ngtsc behavioral tests', () => { expect(dtsContents).toContain('ComponentDefWithMeta { `); env.driveMain(); - expect(env.getContents('test.js')).toContain('i0.ΔpureFunction1'); + expect(env.getContents('test.js')).toContain('i0.ɵɵpureFunction1'); }); it('should compile array literals inside function arguments', () => { @@ -1276,7 +1277,7 @@ describe('ngtsc behavioral tests', () => { `); env.driveMain(); - expect(env.getContents('test.js')).toContain('i0.ΔpureFunction1'); + expect(env.getContents('test.js')).toContain('i0.ɵɵpureFunction1'); }); }); @@ -1292,11 +1293,11 @@ describe('ngtsc behavioral tests', () => { `); env.write('node_modules/router/index.d.ts', ` - import {ModuleWithProviders, ΔNgModuleDefWithMeta} from '@angular/core'; + import {ModuleWithProviders, ɵɵNgModuleDefWithMeta} from '@angular/core'; declare class RouterModule { static forRoot(): ModuleWithProviders; - static ngModuleDef: ΔNgModuleDefWithMeta; + static ngModuleDef: ɵɵNgModuleDefWithMeta; } `); @@ -1308,7 +1309,8 @@ describe('ngtsc behavioral tests', () => { const dtsContents = env.getContents('test.d.ts'); expect(dtsContents).toContain(`import * as i1 from "router";`); expect(dtsContents) - .toContain('i0.ΔNgModuleDefWithMeta'); + .toContain( + 'i0.ɵɵNgModuleDefWithMeta'); }); it('should extract the generic type if it is provided as qualified type name', () => { @@ -1333,9 +1335,9 @@ describe('ngtsc behavioral tests', () => { `); env.write('node_modules/router/internal.d.ts', ` - import {ΔNgModuleDefWithMeta} from '@angular/core'; + import {ɵɵNgModuleDefWithMeta} from '@angular/core'; export declare class InternalRouterModule { - static ngModuleDef: ΔNgModuleDefWithMeta; + static ngModuleDef: ɵɵNgModuleDefWithMeta; } `); @@ -1348,18 +1350,18 @@ describe('ngtsc behavioral tests', () => { expect(dtsContents).toContain(`import * as i1 from "router";`); expect(dtsContents) .toContain( - 'i0.ΔNgModuleDefWithMeta'); + 'i0.ɵɵNgModuleDefWithMeta'); }); it('should not reference a constant with a ModuleWithProviders value in ngModuleDef imports', () => { env.tsconfig(); env.write('dep.d.ts', ` - import {ModuleWithProviders, ΔNgModuleDefWithMeta as ΔNgModuleDefWithMeta} from '@angular/core'; + import {ModuleWithProviders, ɵɵNgModuleDefWithMeta as ɵɵNgModuleDefWithMeta} from '@angular/core'; export declare class DepModule { static forRoot(arg1: any, arg2: any): ModuleWithProviders; - static ngModuleDef: ΔNgModuleDefWithMeta; + static ngModuleDef: ɵɵNgModuleDefWithMeta; } `); env.write('test.ts', ` @@ -1394,13 +1396,13 @@ describe('ngtsc behavioral tests', () => { `); env.write('node_modules/router/index.d.ts', ` - import {ModuleWithProviders, ΔNgModuleDefWithMeta} from '@angular/core'; + import {ModuleWithProviders, ɵɵNgModuleDefWithMeta} from '@angular/core'; export interface MyType extends ModuleWithProviders {} declare class RouterModule { static forRoot(): (MyType)&{ngModule:RouterModule}; - static ngModuleDef: ΔNgModuleDefWithMeta; + static ngModuleDef: ɵɵNgModuleDefWithMeta; } `); @@ -1413,7 +1415,7 @@ describe('ngtsc behavioral tests', () => { expect(dtsContents).toContain(`import * as i1 from "router";`); expect(dtsContents) .toContain( - 'i0.ΔNgModuleDefWithMeta'); + 'i0.ɵɵNgModuleDefWithMeta'); }); it('should unwrap a namespace imported ModuleWithProviders function if a generic type is provided for it', @@ -1433,7 +1435,7 @@ describe('ngtsc behavioral tests', () => { declare class RouterModule { static forRoot(): core.ModuleWithProviders; - static ngModuleDef: ΔNgModuleDefWithMeta; + static ngModuleDef: ɵɵNgModuleDefWithMeta; } `); @@ -1446,7 +1448,7 @@ describe('ngtsc behavioral tests', () => { expect(dtsContents).toContain(`import * as i1 from "router";`); expect(dtsContents) .toContain( - 'i0.ΔNgModuleDefWithMeta'); + 'i0.ɵɵNgModuleDefWithMeta'); }); it('should inject special types according to the metadata', () => { @@ -1484,7 +1486,7 @@ describe('ngtsc behavioral tests', () => { const jsContents = env.getContents('test.js'); expect(jsContents) .toContain( - `factory: function FooCmp_Factory(t) { return new (t || FooCmp)(i0.ΔinjectAttribute("test"), i0.ΔdirectiveInject(i0.ChangeDetectorRef), i0.ΔdirectiveInject(i0.ElementRef), i0.ΔdirectiveInject(i0.Injector), i0.ΔdirectiveInject(i0.Renderer2), i0.ΔdirectiveInject(i0.TemplateRef), i0.ΔdirectiveInject(i0.ViewContainerRef)); }`); + `factory: function FooCmp_Factory(t) { return new (t || FooCmp)(i0.ɵɵinjectAttribute("test"), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.TemplateRef), i0.ɵɵdirectiveInject(i0.ViewContainerRef)); }`); }); it('should generate queries for components', () => { @@ -1514,9 +1516,9 @@ describe('ngtsc behavioral tests', () => { expect(jsContents).toMatch(varRegExp('test1')); expect(jsContents).toMatch(varRegExp('test2')); expect(jsContents).toMatch(varRegExp('accessor')); - // match `i0.ΔcontentQuery(dirIndex, _c1, true, TemplateRef)` + // match `i0.ɵɵcontentQuery(dirIndex, _c1, true, TemplateRef)` expect(jsContents).toMatch(contentQueryRegExp('\\w+', true, 'TemplateRef')); - // match `i0.ΔviewQuery(_c2, true, null)` + // match `i0.ɵɵviewQuery(_c2, true, null)` expect(jsContents).toMatch(viewQueryRegExp(true)); }); @@ -1546,10 +1548,10 @@ describe('ngtsc behavioral tests', () => { expect(jsContents).toMatch(varRegExp('test1')); expect(jsContents).toMatch(varRegExp('test2')); expect(jsContents).toMatch(varRegExp('accessor')); - // match `i0.ΔcontentQuery(dirIndex, _c1, true, TemplateRef)` + // match `i0.ɵɵcontentQuery(dirIndex, _c1, true, TemplateRef)` expect(jsContents).toMatch(contentQueryRegExp('\\w+', true, 'TemplateRef')); - // match `i0.ΔviewQuery(_c2, true, null)` + // match `i0.ɵɵviewQuery(_c2, true, null)` // Note that while ViewQuery doesn't necessarily make sense on a directive, because it doesn't // have a view, we still need to handle it because a component could extend the directive. expect(jsContents).toMatch(viewQueryRegExp(true)); @@ -1573,9 +1575,9 @@ describe('ngtsc behavioral tests', () => { env.driveMain(); const jsContents = env.getContents('test.js'); - // match `i0.ΔcontentQuery(dirIndex, TemplateRef, true, null)` + // match `i0.ɵɵcontentQuery(dirIndex, TemplateRef, true, null)` expect(jsContents).toMatch(contentQueryRegExp('TemplateRef', true)); - // match `i0.ΔcontentQuery(dirIndex, ViewContainerRef, true, null)` + // match `i0.ɵɵcontentQuery(dirIndex, ViewContainerRef, true, null)` expect(jsContents).toMatch(contentQueryRegExp('ViewContainerRef', true)); }); @@ -1624,9 +1626,9 @@ describe('ngtsc behavioral tests', () => { const hostBindingsFn = ` hostBindings: function FooCmp_HostBindings(rf, ctx, elIndex) { if (rf & 1) { - i0.Δlistener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onClick(); }); - i0.Δlistener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onDocumentClick($event.target); }, false, i0.ΔresolveDocument); - i0.Δlistener("scroll", function FooCmp_scroll_HostBindingHandler($event) { return ctx.onWindowScroll(); }, false, i0.ΔresolveWindow); + i0.ɵɵlistener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onClick(); }); + i0.ɵɵlistener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onDocumentClick($event.target); }, false, i0.ɵɵresolveDocument); + i0.ɵɵlistener("scroll", function FooCmp_scroll_HostBindingHandler($event) { return ctx.onWindowScroll(); }, false, i0.ɵɵresolveWindow); } } `; @@ -1722,17 +1724,17 @@ describe('ngtsc behavioral tests', () => { const hostBindingsFn = ` hostBindings: function FooCmp_HostBindings(rf, ctx, elIndex) { if (rf & 1) { - i0.ΔallocHostVars(2); - i0.Δlistener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onClick($event); }); - i0.Δlistener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onBodyClick($event); }, false, i0.ΔresolveBody); - i0.Δlistener("change", function FooCmp_change_HostBindingHandler($event) { return ctx.onChange(ctx.arg1, ctx.arg2, ctx.arg3); }); - i0.ΔelementHostStyling(_c0); + i0.ɵɵallocHostVars(2); + i0.ɵɵlistener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onClick($event); }); + i0.ɵɵlistener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onBodyClick($event); }, false, i0.ɵɵresolveBody); + i0.ɵɵlistener("change", function FooCmp_change_HostBindingHandler($event) { return ctx.onChange(ctx.arg1, ctx.arg2, ctx.arg3); }); + i0.ɵɵelementHostStyling(_c0); } if (rf & 2) { - i0.ΔelementAttribute(elIndex, "hello", i0.Δbind(ctx.foo)); - i0.ΔelementProperty(elIndex, "prop", i0.Δbind(ctx.bar), null, true); - i0.ΔelementHostClassProp(0, ctx.someClass); - i0.ΔelementHostStylingApply(); + i0.ɵɵelementAttribute(elIndex, "hello", i0.ɵɵbind(ctx.foo)); + i0.ɵɵelementProperty(elIndex, "prop", i0.ɵɵbind(ctx.bar), null, true); + i0.ɵɵelementHostClassProp(0, ctx.someClass); + i0.ɵɵelementHostStylingApply(); } } `; @@ -1761,7 +1763,7 @@ describe('ngtsc behavioral tests', () => { `); env.driveMain(); const jsContents = env.getContents('test.js'); - expect(jsContents).toContain('i0.ΔelementHostAttrs(["test", test])'); + expect(jsContents).toContain('i0.ɵɵelementHostAttrs(["test", test])'); }); it('should accept enum values as host bindings', () => { @@ -1786,7 +1788,7 @@ describe('ngtsc behavioral tests', () => { `); env.driveMain(); - expect(env.getContents('test.js')).toContain('"hello", i0.Δbind(ctx.foo)'); + expect(env.getContents('test.js')).toContain('"hello", i0.ɵɵbind(ctx.foo)'); }); it('should generate host listeners for directives within hostBindings section', () => { @@ -1808,7 +1810,7 @@ describe('ngtsc behavioral tests', () => { const hostBindingsFn = ` hostBindings: function Dir_HostBindings(rf, ctx, elIndex) { if (rf & 1) { - i0.Δlistener("change", function Dir_change_HostBindingHandler($event) { return ctx.onChange(ctx.arg); }); + i0.ɵɵlistener("change", function Dir_change_HostBindingHandler($event) { return ctx.onChange(ctx.arg); }); } } `; @@ -2003,7 +2005,7 @@ describe('ngtsc behavioral tests', () => { `); env.driveMain(); const jsContents = env.getContents('test.js'); - expect(jsContents).not.toContain('i0.ΔelementProperty'); + expect(jsContents).not.toContain('i0.ɵɵelementProperty'); }); it('should correctly recognize local symbols', () => { @@ -2258,8 +2260,8 @@ describe('ngtsc behavioral tests', () => { const jsContents = env.getContents('test.js'); expect(jsContents) - .toContain('function Base_Factory(t) { return new (t || Base)(i0.Δinject(Dep)); }'); - expect(jsContents).toContain('var ɵChild_BaseFactory = i0.ΔgetInheritedFactory(Child)'); + .toContain('function Base_Factory(t) { return new (t || Base)(i0.ɵɵinject(Dep)); }'); + expect(jsContents).toContain('var ɵChild_BaseFactory = i0.ɵɵgetInheritedFactory(Child)'); expect(jsContents) .toContain('function Child_Factory(t) { return ɵChild_BaseFactory((t || Child)); }'); expect(jsContents) @@ -2284,7 +2286,7 @@ describe('ngtsc behavioral tests', () => { env.driveMain(); const jsContents = env.getContents('test.js'); - expect(jsContents).toContain('var ɵDir_BaseFactory = i0.ΔgetInheritedFactory(Dir)'); + expect(jsContents).toContain('var ɵDir_BaseFactory = i0.ɵɵgetInheritedFactory(Dir)'); }); it('should wrap "directives" in component metadata in a closure when forward references are present', @@ -2425,8 +2427,8 @@ describe('ngtsc behavioral tests', () => { const jsContents = trim(env.getContents('test.js')); expect(jsContents).toContain(`import Default from './types';`); expect(jsContents).toContain(`import * as i1 from "./types";`); - expect(jsContents).toContain('i0.ΔdirectiveInject(Default)'); - expect(jsContents).toContain('i0.ΔdirectiveInject(i1.Other)'); + expect(jsContents).toContain('i0.ɵɵdirectiveInject(Default)'); + expect(jsContents).toContain('i0.ɵɵdirectiveInject(i1.Other)'); expect(jsContents).toMatch(setClassMetadataRegExp('type: Default')); expect(jsContents).toMatch(setClassMetadataRegExp('type: i1.Other')); }); @@ -2537,8 +2539,8 @@ describe('ngtsc behavioral tests', () => { const jsContents = env.getContents('test.js'); expect(jsContents) .toMatch( - /i\d\.ΔsetComponentScope\(NormalComponent,\s+\[NormalComponent,\s+CyclicComponent\],\s+\[\]\)/); - expect(jsContents).not.toContain('/*__PURE__*/ i0.ΔsetComponentScope'); + /i\d\.ɵɵsetComponentScope\(NormalComponent,\s+\[NormalComponent,\s+CyclicComponent\],\s+\[\]\)/); + expect(jsContents).not.toContain('/*__PURE__*/ i0.ɵɵsetComponentScope'); }); it('should detect a cycle added entirely during compilation', () => { @@ -2729,14 +2731,14 @@ describe('ngtsc behavioral tests', () => { it('should not emit multiple references to the same directive', () => { env.tsconfig(); env.write('node_modules/external/index.d.ts', ` - import {ΔDirectiveDefWithMeta, ΔNgModuleDefWithMeta} from '@angular/core'; + import {ɵɵDirectiveDefWithMeta, ɵɵNgModuleDefWithMeta} from '@angular/core'; export declare class ExternalDir { - static ngDirectiveDef: ΔDirectiveDefWithMeta; + static ngDirectiveDef: ɵɵDirectiveDefWithMeta; } export declare class ExternalModule { - static ngModuleDef: ΔNgModuleDefWithMeta; + static ngModuleDef: ɵɵNgModuleDefWithMeta; } `); env.write('test.ts', ` @@ -2765,19 +2767,19 @@ describe('ngtsc behavioral tests', () => { it('should import directives by their external name', () => { env.tsconfig(); env.write('node_modules/external/index.d.ts', ` - import {ΔDirectiveDefWithMeta, ΔNgModuleDefWithMeta} from '@angular/core'; + import {ɵɵDirectiveDefWithMeta, ɵɵNgModuleDefWithMeta} from '@angular/core'; import {InternalDir} from './internal'; export {InternalDir as ExternalDir} from './internal'; export declare class ExternalModule { - static ngModuleDef: ΔNgModuleDefWithMeta; + static ngModuleDef: ɵɵNgModuleDefWithMeta; } `); env.write('node_modules/external/internal.d.ts', ` export declare class InternalDir { - static ngDirectiveDef: ΔDirectiveDefWithMeta; + static ngDirectiveDef: ɵɵDirectiveDefWithMeta; } `); env.write('test.ts', ` @@ -2986,14 +2988,14 @@ describe('ngtsc behavioral tests', () => { export class Module {} `); env.write('node_modules/external/index.d.ts', ` - import {ΔDirectiveDefWithMeta, ΔNgModuleDefWithMeta} from '@angular/core'; + import {ɵɵDirectiveDefWithMeta, ɵɵNgModuleDefWithMeta} from '@angular/core'; export declare class ExternalDir { - static ngDirectiveDef: ΔDirectiveDefWithMeta; + static ngDirectiveDef: ɵɵDirectiveDefWithMeta; } export declare class ExternalModule { - static ngModuleDef: ΔNgModuleDefWithMeta; + static ngModuleDef: ɵɵNgModuleDefWithMeta; } `); @@ -3173,15 +3175,15 @@ describe('ngtsc behavioral tests', () => { const hostBindingsFn = ` hostBindings: function UnsafeAttrsDirective_HostBindings(rf, ctx, elIndex) { if (rf & 1) { - i0.ΔallocHostVars(6); + i0.ɵɵallocHostVars(6); } if (rf & 2) { - i0.ΔelementAttribute(elIndex, "href", i0.Δbind(ctx.attrHref), i0.ΔsanitizeUrlOrResourceUrl); - i0.ΔelementAttribute(elIndex, "src", i0.Δbind(ctx.attrSrc), i0.ΔsanitizeUrlOrResourceUrl); - i0.ΔelementAttribute(elIndex, "action", i0.Δbind(ctx.attrAction), i0.ΔsanitizeUrl); - i0.ΔelementAttribute(elIndex, "profile", i0.Δbind(ctx.attrProfile), i0.ΔsanitizeResourceUrl); - i0.ΔelementAttribute(elIndex, "innerHTML", i0.Δbind(ctx.attrInnerHTML), i0.ΔsanitizeHtml); - i0.ΔelementAttribute(elIndex, "title", i0.Δbind(ctx.attrSafeTitle)); + i0.ɵɵelementAttribute(elIndex, "href", i0.ɵɵbind(ctx.attrHref), i0.ɵɵsanitizeUrlOrResourceUrl); + i0.ɵɵelementAttribute(elIndex, "src", i0.ɵɵbind(ctx.attrSrc), i0.ɵɵsanitizeUrlOrResourceUrl); + i0.ɵɵelementAttribute(elIndex, "action", i0.ɵɵbind(ctx.attrAction), i0.ɵɵsanitizeUrl); + i0.ɵɵelementAttribute(elIndex, "profile", i0.ɵɵbind(ctx.attrProfile), i0.ɵɵsanitizeResourceUrl); + i0.ɵɵelementAttribute(elIndex, "innerHTML", i0.ɵɵbind(ctx.attrInnerHTML), i0.ɵɵsanitizeHtml); + i0.ɵɵelementAttribute(elIndex, "title", i0.ɵɵbind(ctx.attrSafeTitle)); } } `; @@ -3228,15 +3230,15 @@ describe('ngtsc behavioral tests', () => { const hostBindingsFn = ` hostBindings: function UnsafePropsDirective_HostBindings(rf, ctx, elIndex) { if (rf & 1) { - i0.ΔallocHostVars(6); + i0.ɵɵallocHostVars(6); } if (rf & 2) { - i0.ΔelementProperty(elIndex, "href", i0.Δbind(ctx.propHref), i0.ΔsanitizeUrlOrResourceUrl, true); - i0.ΔelementProperty(elIndex, "src", i0.Δbind(ctx.propSrc), i0.ΔsanitizeUrlOrResourceUrl, true); - i0.ΔelementProperty(elIndex, "action", i0.Δbind(ctx.propAction), i0.ΔsanitizeUrl, true); - i0.ΔelementProperty(elIndex, "profile", i0.Δbind(ctx.propProfile), i0.ΔsanitizeResourceUrl, true); - i0.ΔelementProperty(elIndex, "innerHTML", i0.Δbind(ctx.propInnerHTML), i0.ΔsanitizeHtml, true); - i0.ΔelementProperty(elIndex, "title", i0.Δbind(ctx.propSafeTitle), null, true); + i0.ɵɵelementProperty(elIndex, "href", i0.ɵɵbind(ctx.propHref), i0.ɵɵsanitizeUrlOrResourceUrl, true); + i0.ɵɵelementProperty(elIndex, "src", i0.ɵɵbind(ctx.propSrc), i0.ɵɵsanitizeUrlOrResourceUrl, true); + i0.ɵɵelementProperty(elIndex, "action", i0.ɵɵbind(ctx.propAction), i0.ɵɵsanitizeUrl, true); + i0.ɵɵelementProperty(elIndex, "profile", i0.ɵɵbind(ctx.propProfile), i0.ɵɵsanitizeResourceUrl, true); + i0.ɵɵelementProperty(elIndex, "innerHTML", i0.ɵɵbind(ctx.propInnerHTML), i0.ɵɵsanitizeHtml, true); + i0.ɵɵelementProperty(elIndex, "title", i0.ɵɵbind(ctx.propSafeTitle), null, true); } } `; @@ -3268,15 +3270,15 @@ describe('ngtsc behavioral tests', () => { const hostBindingsFn = ` hostBindings: function FooCmp_HostBindings(rf, ctx, elIndex) { if (rf & 1) { - i0.ΔallocHostVars(6); + i0.ɵɵallocHostVars(6); } if (rf & 2) { - i0.ΔelementProperty(elIndex, "src", i0.Δbind(ctx.srcProp), null, true); - i0.ΔelementProperty(elIndex, "href", i0.Δbind(ctx.hrefProp), null, true); - i0.ΔelementProperty(elIndex, "title", i0.Δbind(ctx.titleProp), null, true); - i0.ΔelementAttribute(elIndex, "src", i0.Δbind(ctx.srcAttr)); - i0.ΔelementAttribute(elIndex, "href", i0.Δbind(ctx.hrefAttr)); - i0.ΔelementAttribute(elIndex, "title", i0.Δbind(ctx.titleAttr)); + i0.ɵɵelementProperty(elIndex, "src", i0.ɵɵbind(ctx.srcProp), null, true); + i0.ɵɵelementProperty(elIndex, "href", i0.ɵɵbind(ctx.hrefProp), null, true); + i0.ɵɵelementProperty(elIndex, "title", i0.ɵɵbind(ctx.titleProp), null, true); + i0.ɵɵelementAttribute(elIndex, "src", i0.ɵɵbind(ctx.srcAttr)); + i0.ɵɵelementAttribute(elIndex, "href", i0.ɵɵbind(ctx.hrefAttr)); + i0.ɵɵelementAttribute(elIndex, "title", i0.ɵɵbind(ctx.titleAttr)); } } `; @@ -3306,13 +3308,13 @@ describe('ngtsc behavioral tests', () => { beforeEach(() => { env.tsconfig(); env.write('node_modules/@angular/router/index.d.ts', ` - import {ModuleWithProviders, ΔNgModuleDefWithMeta as ΔNgModuleDefWithMeta} from '@angular/core'; + import {ModuleWithProviders, ɵɵNgModuleDefWithMeta as ɵɵNgModuleDefWithMeta} from '@angular/core'; export declare var ROUTES; export declare class RouterModule { static forRoot(arg1: any, arg2: any): ModuleWithProviders; static forChild(arg1: any): ModuleWithProviders; - static ngModuleDef: ΔNgModuleDefWithMeta; + static ngModuleDef: ɵɵNgModuleDefWithMeta; } `); }); @@ -3942,24 +3944,24 @@ export const Foo = Foo__PRE_R3__; // 'alpha' declares the directive which will ultimately be imported. env.write('alpha.d.ts', ` - import {ΔDirectiveDefWithMeta, ΔNgModuleDefWithMeta} from '@angular/core'; + import {ɵɵDirectiveDefWithMeta, ɵɵNgModuleDefWithMeta} from '@angular/core'; export declare class ExternalDir { - static ngDirectiveDef: ΔDirectiveDefWithMeta; + static ngDirectiveDef: ɵɵDirectiveDefWithMeta; } export declare class AlphaModule { - static ngModuleDef: ΔNgModuleDefWithMeta; + static ngModuleDef: ɵɵNgModuleDefWithMeta; } `); // 'beta' re-exports AlphaModule from alpha. env.write('beta.d.ts', ` - import {ΔNgModuleDefWithMeta} from '@angular/core'; + import {ɵɵNgModuleDefWithMeta} from '@angular/core'; import {AlphaModule} from './alpha'; export declare class BetaModule { - static ngModuleDef: ΔNgModuleDefWithMeta; + static ngModuleDef: ɵɵNgModuleDefWithMeta; } `); @@ -3991,26 +3993,26 @@ export const Foo = Foo__PRE_R3__; it('should write alias ES2015 exports for NgModule exported directives', () => { env.tsconfig({'_useHostForImportGeneration': true}); env.write('external.d.ts', ` - import {ΔDirectiveDefWithMeta, ΔNgModuleDefWithMeta} from '@angular/core'; + import {ɵɵDirectiveDefWithMeta, ɵɵNgModuleDefWithMeta} from '@angular/core'; import {LibModule} from './lib'; export declare class ExternalDir { - static ngDirectiveDef: ΔDirectiveDefWithMeta; + static ngDirectiveDef: ɵɵDirectiveDefWithMeta; } export declare class ExternalModule { - static ngModuleDef: ΔNgModuleDefWithMeta; + static ngModuleDef: ɵɵNgModuleDefWithMeta; } `); env.write('lib.d.ts', ` - import {ΔDirectiveDefWithMeta, ΔNgModuleDefWithMeta} from '@angular/core'; + import {ɵɵDirectiveDefWithMeta, ɵɵNgModuleDefWithMeta} from '@angular/core'; export declare class LibDir { - static ngDirectiveDef: ΔDirectiveDefWithMeta; + static ngDirectiveDef: ɵɵDirectiveDefWithMeta; } export declare class LibModule { - static ngModuleDef: ΔNgModuleDefWithMeta; + static ngModuleDef: ɵɵNgModuleDefWithMeta; } `); env.write('foo.ts', ` diff --git a/packages/compiler-cli/test/ngtsc/scope_spec.ts b/packages/compiler-cli/test/ngtsc/scope_spec.ts index 5ea177671f..10127f9947 100644 --- a/packages/compiler-cli/test/ngtsc/scope_spec.ts +++ b/packages/compiler-cli/test/ngtsc/scope_spec.ts @@ -36,15 +36,15 @@ describe('ngtsc module scopes', () => { env.driveMain(); const jsContents = env.getContents('test.js'); - expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule });'); + expect(jsContents).toContain('i0.ɵɵdefineNgModule({ type: TestModule });'); expect(jsContents) .toContain( - '/*@__PURE__*/ i0.ΔsetNgModuleScope(TestModule, { imports: [OtherModule] });'); + '/*@__PURE__*/ i0.ɵɵsetNgModuleScope(TestModule, { imports: [OtherModule] });'); const dtsContents = env.getContents('test.d.ts'); expect(dtsContents) .toContain( - 'static ngModuleDef: i0.ΔNgModuleDefWithMeta'); + 'static ngModuleDef: i0.ɵɵNgModuleDefWithMeta'); }); it('should produce an error when an invalid class is imported', () => { @@ -98,15 +98,15 @@ describe('ngtsc module scopes', () => { env.driveMain(); const jsContents = env.getContents('test.js'); - expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule });'); + expect(jsContents).toContain('i0.ɵɵdefineNgModule({ type: TestModule });'); expect(jsContents) .toContain( - '/*@__PURE__*/ i0.ΔsetNgModuleScope(TestModule, { exports: [OtherModule] });'); + '/*@__PURE__*/ i0.ɵɵsetNgModuleScope(TestModule, { exports: [OtherModule] });'); const dtsContents = env.getContents('test.d.ts'); expect(dtsContents) .toContain( - 'static ngModuleDef: i0.ΔNgModuleDefWithMeta'); + 'static ngModuleDef: i0.ɵɵNgModuleDefWithMeta'); }); it('should produce an error when a non-NgModule class is exported', () => { diff --git a/packages/compiler-cli/test/ngtsc/template_mapping_spec.ts b/packages/compiler-cli/test/ngtsc/template_mapping_spec.ts index 603f9fd0d9..f72c191f98 100644 --- a/packages/compiler-cli/test/ngtsc/template_mapping_spec.ts +++ b/packages/compiler-cli/test/ngtsc/template_mapping_spec.ts @@ -23,17 +23,17 @@ describe('template source-mapping', () => { it('should map simple element with content', () => { const mappings = compileAndMap('

Heading 1

'); expect(mappings).toContain( - {source: '

', generated: 'i0.ΔelementStart(0, "h1")', sourceUrl: '../test.ts'}); + {source: '

', generated: 'i0.ɵɵelementStart(0, "h1")', sourceUrl: '../test.ts'}); expect(mappings).toContain( - {source: 'Heading 1', generated: 'i0.Δtext(1, "Heading 1")', sourceUrl: '../test.ts'}); + {source: 'Heading 1', generated: 'i0.ɵɵtext(1, "Heading 1")', sourceUrl: '../test.ts'}); expect(mappings).toContain( - {source: '

', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'}); + {source: '', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'}); }); it('should map void element', () => { const mappings = compileAndMap('
'); expect(mappings).toContain( - {source: '
', generated: 'i0.Δelement(0, "hr")', sourceUrl: '../test.ts'}); + {source: '
', generated: 'i0.ɵɵelement(0, "hr")', sourceUrl: '../test.ts'}); }); }); @@ -41,40 +41,40 @@ describe('template source-mapping', () => { it('should map a mix of interpolated and static content', () => { const mappings = compileAndMap('

Hello {{ name }}

'); expect(mappings).toContain( - {source: '

', generated: 'i0.ΔelementStart(0, "h3")', sourceUrl: '../test.ts'}); + {source: '

', generated: 'i0.ɵɵelementStart(0, "h3")', sourceUrl: '../test.ts'}); expect(mappings).toContain({ source: 'Hello {{ name }}', - generated: 'i0.ΔtextBinding(1, i0.Δinterpolation1("Hello ", ctx.name, ""))', + generated: 'i0.ɵɵtextBinding(1, i0.ɵɵinterpolation1("Hello ", ctx.name, ""))', sourceUrl: '../test.ts' }); expect(mappings).toContain( - {source: '

', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'}); + {source: '', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'}); }); it('should map a complex interpolated expression', () => { const mappings = compileAndMap('

{{ greeting + " " + name }}

'); expect(mappings).toContain( - {source: '

', generated: 'i0.ΔelementStart(0, "h2")', sourceUrl: '../test.ts'}); + {source: '

', generated: 'i0.ɵɵelementStart(0, "h2")', sourceUrl: '../test.ts'}); expect(mappings).toContain({ source: '{{ greeting + " " + name }}', generated: - 'i0.ΔtextBinding(1, i0.Δinterpolation1("", ((ctx.greeting + " ") + ctx.name), ""))', + 'i0.ɵɵtextBinding(1, i0.ɵɵinterpolation1("", ((ctx.greeting + " ") + ctx.name), ""))', sourceUrl: '../test.ts' }); expect(mappings).toContain( - {source: '

', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'}); + {source: '', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'}); }); it('should map interpolated properties', () => { const mappings = compileAndMap('
'); expect(mappings).toContain({ source: '
', - generated: 'i0.Δelement(0, "div", _c0)', + generated: 'i0.ɵɵelement(0, "div", _c0)', sourceUrl: '../test.ts' }); expect(mappings).toContain({ source: 'id="{{name}}"', - generated: 'i0.ΔelementProperty(0, "id", i0.Δinterpolation1("", ctx.name, ""))', + generated: 'i0.ɵɵelementProperty(0, "id", i0.ɵɵinterpolation1("", ctx.name, ""))', sourceUrl: '../test.ts' }); }); @@ -82,15 +82,15 @@ describe('template source-mapping', () => { it('should map interpolation with pipe', () => { const mappings = compileAndMap('
{{200.3 | percent : 2 }}
'); expect(mappings).toContain( - {source: '
', generated: 'i0.ΔelementStart(0, "div")', sourceUrl: '../test.ts'}); + {source: '
', generated: 'i0.ɵɵelementStart(0, "div")', sourceUrl: '../test.ts'}); expect(mappings).toContain({ source: '{{200.3 | percent : 2 }}', generated: - 'i0.ΔtextBinding(1, i0.Δinterpolation1("", i0.ΔpipeBind2(2, 1, 200.3, 2), ""))', + 'i0.ɵɵtextBinding(1, i0.ɵɵinterpolation1("", i0.ɵɵpipeBind2(2, 1, 200.3, 2), ""))', sourceUrl: '../test.ts' }); expect(mappings).toContain( - {source: '
', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'}); + {source: '
', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'}); }); }); @@ -99,12 +99,12 @@ describe('template source-mapping', () => { const mappings = compileAndMap('
'); expect(mappings).toContain({ source: '
', - generated: 'i0.Δelement(0, "div", _c0)', + generated: 'i0.ɵɵelement(0, "div", _c0)', sourceUrl: '../test.ts' }); expect(mappings).toContain({ source: '[attr]="name"', - generated: 'i0.ΔelementProperty(0, "attr", i0.Δbind(ctx.name))', + generated: 'i0.ɵɵelementProperty(0, "attr", i0.ɵɵbind(ctx.name))', sourceUrl: '../test.ts' }); }); @@ -113,12 +113,12 @@ describe('template source-mapping', () => { const mappings = compileAndMap('
'); expect(mappings).toContain({ source: '
', - generated: 'i0.Δelement(0, "div", _c0)', + generated: 'i0.ɵɵelement(0, "div", _c0)', sourceUrl: '../test.ts' }); expect(mappings).toContain({ source: '[attr]="greeting + name"', - generated: 'i0.ΔelementProperty(0, "attr", i0.Δbind((ctx.greeting + ctx.name)))', + generated: 'i0.ɵɵelementProperty(0, "attr", i0.ɵɵbind((ctx.greeting + ctx.name)))', sourceUrl: '../test.ts' }); }); @@ -127,12 +127,12 @@ describe('template source-mapping', () => { const mappings = compileAndMap('
'); expect(mappings).toContain({ source: '
', - generated: 'i0.Δelement(0, "div", _c0)', + generated: 'i0.ɵɵelement(0, "div", _c0)', sourceUrl: '../test.ts' }); expect(mappings).toContain({ source: 'bind-attr="name"', - generated: 'i0.ΔelementProperty(0, "attr", i0.Δbind(ctx.name))', + generated: 'i0.ɵɵelementProperty(0, "attr", i0.ɵɵbind(ctx.name))', sourceUrl: '../test.ts' }); }); @@ -141,15 +141,15 @@ describe('template source-mapping', () => { const mappings = compileAndMap(''); expect(mappings).toContain({ source: '', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'}); + {source: '', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'}); }); it('should map a complex output binding expression', () => { @@ -157,11 +157,11 @@ describe('template source-mapping', () => { compileAndMap(``); expect(mappings).toContain({ source: `', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'}); + {source: '', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'}); }); it('should map a longhand output binding expression', () => { const mappings = compileAndMap(''); expect(mappings).toContain({ source: '', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'}); + {source: '', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'}); }); it('should map a two-way binding expression', () => { const mappings = compileAndMap('Name: '); expect(mappings).toContain({ source: '', - generated: 'i0.ΔelementStart(1, "input", _c0)', + generated: 'i0.ɵɵelementStart(1, "input", _c0)', sourceUrl: '../test.ts' }); // TODO: improve mappings here expect(mappings).toContain({ source: '[(ngModel)]="name"', generated: - 'i0.Δlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) { return ctx.name = $event; })', + 'i0.ɵɵlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) { return ctx.name = $event; })', sourceUrl: '../test.ts' }); expect(mappings).toContain({ source: '', - generated: 'i0.ΔelementEnd()', + generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts' }); }); @@ -215,19 +215,19 @@ describe('template source-mapping', () => { const mappings = compileAndMap('Name: '); expect(mappings).toContain({ source: '', - generated: 'i0.ΔelementStart(1, "input", _c0)', + generated: 'i0.ɵɵelementStart(1, "input", _c0)', sourceUrl: '../test.ts' }); // TODO: improve mappings here expect(mappings).toContain({ source: 'bindon-ngModel="name"', generated: - 'i0.Δlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) { return ctx.name = $event; })', + 'i0.ɵɵlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) { return ctx.name = $event; })', sourceUrl: '../test.ts' }); expect(mappings).toContain({ source: '', - generated: 'i0.ΔelementEnd()', + generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts' }); }); @@ -236,17 +236,17 @@ describe('template source-mapping', () => { const mappings = compileAndMap('
Message
'); expect(mappings).toContain({ source: '
', - generated: 'i0.ΔelementStart(0, "div")', + generated: 'i0.ɵɵelementStart(0, "div")', sourceUrl: '../test.ts' }); // TODO: Add better mappings for binding expect(mappings).toContain( - {source: 'Message', generated: 'i0.Δtext(1, "Message")', sourceUrl: '../test.ts'}); + {source: 'Message', generated: 'i0.ɵɵtext(1, "Message")', sourceUrl: '../test.ts'}); expect(mappings).toContain( - {source: '
', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'}); + {source: '', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'}); }); }); @@ -256,20 +256,20 @@ describe('template source-mapping', () => { expect(mappings).toContain({ source: '
', - generated: 'i0.ΔelementStart(0, "div")', + generated: 'i0.ɵɵelementStart(0, "div")', sourceUrl: '../test.ts' }); // TODO - map the bindings better expect(mappings).toContain( - {source: '
', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'}); + {source: '', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'}); // TODO: the `ctx_r...` appears to be dependent upon previous tests!!! // expect(mappings).toContain({ // source: '{{ name }}', - // generated: 'i0.ΔtextBinding(1, i0.Δinterpolation1("", ctx_r0.name, ""))', + // generated: 'i0.ɵɵtextBinding(1, i0.ɵɵinterpolation1("", ctx_r0.name, ""))', // sourceUrl: '../test.ts' // }); }); @@ -282,18 +282,18 @@ describe('template source-mapping', () => { ``); expect(mappings).toContain( - {source: '
', generated: 'i0.ΔelementStart(0, "div")', sourceUrl: '../test.ts'}); + {source: '
', generated: 'i0.ɵɵelementStart(0, "div")', sourceUrl: '../test.ts'}); // TODO - map the bindings better expect(mappings).toContain( - {source: '
', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'}); + {source: '
', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'}); // TODO: the `ctx_r...` appears to be dependent upon previous tests!!! // expect(mappings).toContain({ // source: '{{ name }}', - // generated: 'i0.ΔtextBinding(1, i0.Δinterpolation1("", ctx_r0.name, ""))', + // generated: 'i0.ɵɵtextBinding(1, i0.ɵɵinterpolation1("", ctx_r0.name, ""))', // sourceUrl: '../test.ts' // }); }); @@ -304,14 +304,14 @@ describe('template source-mapping', () => { expect(mappings).toContain({ source: '
', - generated: 'i0.ΔelementStart(0, "div")', + generated: 'i0.ɵɵelementStart(0, "div")', sourceUrl: '../test.ts' }); // TODO - map the bindings better expect(mappings).toContain( - {source: '
', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'}); + {source: '', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'}); }); @@ -330,20 +330,20 @@ describe('template source-mapping', () => { `
`); expect(mappings).toContain( - {source: '

', generated: 'i0.ΔelementStart(0, "h3")', sourceUrl: '../test.ts'}); + {source: '

', generated: 'i0.ɵɵelementStart(0, "h3")', sourceUrl: '../test.ts'}); expect(mappings).toContain({ source: '', - generated: 'i0.Δprojection(1, 1)', + generated: 'i0.ɵɵprojection(1, 1)', sourceUrl: '../test.ts' }); expect(mappings).toContain( - {source: '

', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'}); + {source: '', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'}); expect(mappings).toContain( - {source: '
', generated: 'i0.ΔelementStart(2, "div")', sourceUrl: '../test.ts'}); + {source: '
', generated: 'i0.ɵɵelementStart(2, "div")', sourceUrl: '../test.ts'}); expect(mappings).toContain( - {source: '', generated: 'i0.Δprojection(3)', sourceUrl: '../test.ts'}); + {source: '', generated: 'i0.ɵɵprojection(3)', sourceUrl: '../test.ts'}); expect(mappings).toContain( - {source: '
', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'}); + {source: '
', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'}); }); }); @@ -352,24 +352,24 @@ describe('template source-mapping', () => { // Creation mode expect(mappings).toContain( - {generated: 'i0.ΔelementStart(0, "div")', source: '
', sourceUrl: '../test.ts'}); + {generated: 'i0.ɵɵelementStart(0, "div")', source: '
', sourceUrl: '../test.ts'}); expect(mappings).toContain({ - generated: 'i0.Δtext(1, "this is a test")', + generated: 'i0.ɵɵtext(1, "this is a test")', source: 'this is a test', sourceUrl: '../test.ts' }); expect(mappings).toContain( - {generated: 'i0.ΔelementEnd()', source: '
', sourceUrl: '../test.ts'}); + {generated: 'i0.ɵɵelementEnd()', source: '
', sourceUrl: '../test.ts'}); expect(mappings).toContain( - {generated: 'i0.ΔelementStart(2, "div")', source: '
', sourceUrl: '../test.ts'}); + {generated: 'i0.ɵɵelementStart(2, "div")', source: '
', sourceUrl: '../test.ts'}); expect(mappings).toContain( - {generated: 'i0.Δtext(3)', source: '{{ 1 + 2 }}', sourceUrl: '../test.ts'}); + {generated: 'i0.ɵɵtext(3)', source: '{{ 1 + 2 }}', sourceUrl: '../test.ts'}); expect(mappings).toContain( - {generated: 'i0.ΔelementEnd()', source: '
', sourceUrl: '../test.ts'}); + {generated: 'i0.ɵɵelementEnd()', source: '
', sourceUrl: '../test.ts'}); // Update mode expect(mappings).toContain({ - generated: 'i0.ΔtextBinding(3, i0.Δinterpolation1("", (1 + 2), ""))', + generated: 'i0.ɵɵtextBinding(3, i0.ɵɵinterpolation1("", (1 + 2), ""))', source: '{{ 1 + 2 }}', sourceUrl: '../test.ts' }); @@ -380,24 +380,24 @@ describe('template source-mapping', () => { // Creation mode expect(mappings).toContain( - {generated: 'i0.ΔelementStart(0, "div")', source: '
', sourceUrl: '../test.ts'}); + {generated: 'i0.ɵɵelementStart(0, "div")', source: '
', sourceUrl: '../test.ts'}); expect(mappings).toContain({ - generated: 'i0.Δtext(1, "this is a test")', + generated: 'i0.ɵɵtext(1, "this is a test")', source: 'this is a test', sourceUrl: '../test.ts' }); expect(mappings).toContain( - {generated: 'i0.ΔelementEnd()', source: '
', sourceUrl: '../test.ts'}); + {generated: 'i0.ɵɵelementEnd()', source: '
', sourceUrl: '../test.ts'}); expect(mappings).toContain( - {generated: 'i0.ΔelementStart(2, "div")', source: '
', sourceUrl: '../test.ts'}); + {generated: 'i0.ɵɵelementStart(2, "div")', source: '
', sourceUrl: '../test.ts'}); expect(mappings).toContain( - {generated: 'i0.Δtext(3)', source: '{{ 1 + 2 }}', sourceUrl: '../test.ts'}); + {generated: 'i0.ɵɵtext(3)', source: '{{ 1 + 2 }}', sourceUrl: '../test.ts'}); expect(mappings).toContain( - {generated: 'i0.ΔelementEnd()', source: '
', sourceUrl: '../test.ts'}); + {generated: 'i0.ɵɵelementEnd()', source: '
', sourceUrl: '../test.ts'}); // Update mode expect(mappings).toContain({ - generated: 'i0.ΔtextBinding(3, i0.Δinterpolation1("", (1 + 2), ""))', + generated: 'i0.ɵɵtextBinding(3, i0.ɵɵinterpolation1("", (1 + 2), ""))', source: '{{ 1 + 2 }}', sourceUrl: '../test.ts' }); @@ -409,7 +409,7 @@ describe('template source-mapping', () => { const mappings = compileAndMap('
this is a test
'); expect(mappings).toContain({ - generated: 'i0.ΔelementStart(0, "div", _c0)', + generated: 'i0.ɵɵelementStart(0, "div", _c0)', source: '
', sourceUrl: '../test.ts' }); @@ -428,30 +428,30 @@ describe('template source-mapping', () => { // Creation mode expect(mappings).toContain({ - generated: 'i0.ΔelementStart(0, "div")', + generated: 'i0.ɵɵelementStart(0, "div")', source: '
', sourceUrl: '../dir/test.html' }); expect(mappings).toContain({ - generated: 'i0.Δtext(1, "this is a test")', + generated: 'i0.ɵɵtext(1, "this is a test")', source: 'this is a test', sourceUrl: '../dir/test.html' }); expect(mappings).toContain( - {generated: 'i0.ΔelementEnd()', source: '
', sourceUrl: '../dir/test.html'}); + {generated: 'i0.ɵɵelementEnd()', source: '
', sourceUrl: '../dir/test.html'}); expect(mappings).toContain({ - generated: 'i0.ΔelementStart(2, "div")', + generated: 'i0.ɵɵelementStart(2, "div")', source: '
', sourceUrl: '../dir/test.html' }); expect(mappings).toContain( - {generated: 'i0.Δtext(3)', source: '{{ 1 + 2 }}', sourceUrl: '../dir/test.html'}); + {generated: 'i0.ɵɵtext(3)', source: '{{ 1 + 2 }}', sourceUrl: '../dir/test.html'}); expect(mappings).toContain( - {generated: 'i0.ΔelementEnd()', source: '
', sourceUrl: '../dir/test.html'}); + {generated: 'i0.ɵɵelementEnd()', source: '', sourceUrl: '../dir/test.html'}); // Update mode expect(mappings).toContain({ - generated: 'i0.ΔtextBinding(3, i0.Δinterpolation1("", (1 + 2), ""))', + generated: 'i0.ɵɵtextBinding(3, i0.ɵɵinterpolation1("", (1 + 2), ""))', source: '{{ 1 + 2 }}', sourceUrl: '../dir/test.html' }); @@ -463,39 +463,39 @@ describe('template source-mapping', () => { // Creation mode expect(mappings).toContain({ - generated: 'i0.ΔelementStart(0, "div")', + generated: 'i0.ɵɵelementStart(0, "div")', source: '
', sourceUrl: '../extraRootDir/test.html' }); expect(mappings).toContain({ - generated: 'i0.Δtext(1, "this is a test")', + generated: 'i0.ɵɵtext(1, "this is a test")', source: 'this is a test', sourceUrl: '../extraRootDir/test.html' }); expect(mappings).toContain({ - generated: 'i0.ΔelementEnd()', + generated: 'i0.ɵɵelementEnd()', source: '
', sourceUrl: '../extraRootDir/test.html' }); expect(mappings).toContain({ - generated: 'i0.ΔelementStart(2, "div")', + generated: 'i0.ɵɵelementStart(2, "div")', source: '
', sourceUrl: '../extraRootDir/test.html' }); expect(mappings).toContain({ - generated: 'i0.Δtext(3)', + generated: 'i0.ɵɵtext(3)', source: '{{ 1 + 2 }}', sourceUrl: '../extraRootDir/test.html' }); expect(mappings).toContain({ - generated: 'i0.ΔelementEnd()', + generated: 'i0.ɵɵelementEnd()', source: '
', sourceUrl: '../extraRootDir/test.html' }); // Update mode expect(mappings).toContain({ - generated: 'i0.ΔtextBinding(3, i0.Δinterpolation1("", (1 + 2), ""))', + generated: 'i0.ɵɵtextBinding(3, i0.ɵɵinterpolation1("", (1 + 2), ""))', source: '{{ 1 + 2 }}', sourceUrl: '../extraRootDir/test.html' }); diff --git a/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts b/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts index fb7fb40cf3..711db438c0 100644 --- a/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts +++ b/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts @@ -26,17 +26,17 @@ export declare class NgForOfContext { export declare class NgForOf { ngForOf: T[]; static ngTemplateContextGuard(dir: NgForOf, ctx: any): ctx is NgForOfContext; - static ngDirectiveDef: i0.ΔDirectiveDefWithMeta, '[ngFor][ngForOf]', never, {'ngForOf': 'ngForOf'}, {}, never>; + static ngDirectiveDef: i0.ɵɵDirectiveDefWithMeta, '[ngFor][ngForOf]', never, {'ngForOf': 'ngForOf'}, {}, never>; } export declare class NgIf { ngIf: any; static ngTemplateGuard_ngIf(dir: NgIf, expr: E): expr is NonNullable - static ngDirectiveDef: i0.ΔDirectiveDefWithMeta, '[ngIf]', never, {'ngIf': 'ngIf'}, {}, never>; + static ngDirectiveDef: i0.ɵɵDirectiveDefWithMeta, '[ngIf]', never, {'ngIf': 'ngIf'}, {}, never>; } export declare class CommonModule { - static ngModuleDef: i0.ΔNgModuleDefWithMeta; + static ngModuleDef: i0.ɵɵNgModuleDefWithMeta; } `); } diff --git a/packages/compiler/design/architecture.md b/packages/compiler/design/architecture.md index 6076110fde..81591efb9b 100644 --- a/packages/compiler/design/architecture.md +++ b/packages/compiler/design/architecture.md @@ -81,18 +81,18 @@ In `ngtsc` this is instead emitted as, ```js const i0 = require("@angular/core"); class GreetComponent {} -GreetComponent.ngComponentDef = i0.ΔdefineComponent({ +GreetComponent.ngComponentDef = i0.ɵɵdefineComponent({ type: GreetComponent, tag: 'greet', factory: () => new GreetComponent(), template: function (rf, ctx) { if (rf & RenderFlags.Create) { - i0.ΔelementStart(0, 'div'); - i0.Δtext(1); - i0.ΔelementEnd(); + i0.ɵɵelementStart(0, 'div'); + i0.ɵɵtext(1); + i0.ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - i0.ΔtextBinding(1, i0.Δinterpolation1('Hello ', ctx.name, '!')); + i0.ɵɵtextBinding(1, i0.ɵɵinterpolation1('Hello ', ctx.name, '!')); } } }); diff --git a/packages/compiler/design/separate_compilation.md b/packages/compiler/design/separate_compilation.md index 899d7a0ecc..49fe89efcc 100644 --- a/packages/compiler/design/separate_compilation.md +++ b/packages/compiler/design/separate_compilation.md @@ -161,7 +161,7 @@ export class MyComponent { ```js export class MyComponent { name: string; - static ngComponentDef = ΔdefineComponent({...}); + static ngComponentDef = ɵɵdefineComponent({...}); } ``` @@ -213,7 +213,7 @@ export class MyDirective { constructor() { this.dirId = 'some id'; } - static ngDirectiveDef = ΔdefineDirective({...}); + static ngDirectiveDef = ɵɵdefineDirective({...}); } ``` @@ -256,7 +256,7 @@ export class MyPipe implements PipeTransform { ```js export class MyPipe { transform(...) ... - static ngPipeDef = ΔdefinePipe({...}); + static ngPipeDef = ɵɵdefinePipe({...}); } ``` @@ -329,7 +329,7 @@ export class MyModule {} *my.module.js* ```js export class MyModule { - static ngInjectorDef = ΔdefineInjector(...); + static ngInjectorDef = ɵɵdefineInjector(...); } ``` @@ -389,7 +389,7 @@ manually written as: ```ts export class MyModule { - static ngInjectorDef = ΔdefineInjector({ + static ngInjectorDef = ɵɵdefineInjector({ providers: [{ provide: Service, useClass: ServiceImpl }], @@ -411,7 +411,7 @@ export class MyModule { } ``` -except for the call to `ΔdefineInjector` would generate a `{ __symbolic: 'error' }` +except for the call to `ɵɵdefineInjector` would generate a `{ __symbolic: 'error' }` value which is ignored by the ivy compiler. This allows the system to ignore the difference between manually and mechanically created module definitions. @@ -440,7 +440,7 @@ properties by including a `// @__BUILD_OPTIMIZER_REMOVE_` comment: ```ts export class MyModule { - static ngInjectorDef = ΔdefineInjector({ + static ngInjectorDef = ɵɵdefineInjector({ providers: [{ provide: Service, useClass: ServiceImpl }], diff --git a/packages/compiler/src/identifiers.ts b/packages/compiler/src/identifiers.ts index 46971af875..ab4c3f2a32 100644 --- a/packages/compiler/src/identifiers.ts +++ b/packages/compiler/src/identifiers.ts @@ -62,11 +62,11 @@ export class Identifiers { moduleName: CORE, }; - static inject: o.ExternalReference = {name: 'Δinject', moduleName: CORE}; + static inject: o.ExternalReference = {name: 'ɵɵinject', moduleName: CORE}; static INJECTOR: o.ExternalReference = {name: 'INJECTOR', moduleName: CORE}; static Injector: o.ExternalReference = {name: 'Injector', moduleName: CORE}; - static ΔdefineInjectable: o.ExternalReference = {name: 'ΔdefineInjectable', moduleName: CORE}; - static InjectableDef: o.ExternalReference = {name: 'ΔInjectableDef', moduleName: CORE}; + static ɵɵdefineInjectable: o.ExternalReference = {name: 'ɵɵdefineInjectable', moduleName: CORE}; + static InjectableDef: o.ExternalReference = {name: 'ɵɵInjectableDef', moduleName: CORE}; static ViewEncapsulation: o.ExternalReference = { name: 'ViewEncapsulation', moduleName: CORE, @@ -92,7 +92,7 @@ export class Identifiers { name: 'ɵinlineInterpolate', moduleName: CORE, }; - static interpolate: o.ExternalReference = {name: 'Δinterpolate', moduleName: CORE}; + static interpolate: o.ExternalReference = {name: 'ɵɵinterpolate', moduleName: CORE}; static EMPTY_ARRAY: o.ExternalReference = {name: 'ɵEMPTY_ARRAY', moduleName: CORE}; static EMPTY_MAP: o.ExternalReference = {name: 'ɵEMPTY_MAP', moduleName: CORE}; static Renderer: o.ExternalReference = {name: 'Renderer', moduleName: CORE}; diff --git a/packages/compiler/src/injectable_compiler.ts b/packages/compiler/src/injectable_compiler.ts index 4e1291369e..d915800852 100644 --- a/packages/compiler/src/injectable_compiler.ts +++ b/packages/compiler/src/injectable_compiler.ts @@ -116,7 +116,7 @@ export class InjectableCompiler { mapEntry('token', ctx.importExpr(injectable.type.reference)), mapEntry('providedIn', providedIn), ]; - return o.importExpr(Identifiers.ΔdefineInjectable).callFn([o.literalMap(def)]); + return o.importExpr(Identifiers.ɵɵdefineInjectable).callFn([o.literalMap(def)]); } compile(injectable: CompileInjectableMetadata, ctx: OutputContext): void { diff --git a/packages/compiler/src/injectable_compiler_2.ts b/packages/compiler/src/injectable_compiler_2.ts index 6158b92a91..068697f00a 100644 --- a/packages/compiler/src/injectable_compiler_2.ts +++ b/packages/compiler/src/injectable_compiler_2.ts @@ -100,7 +100,7 @@ export function compileInjectable(meta: R3InjectableMetadata): InjectableDef { const token = meta.type; const providedIn = meta.providedIn; - const expression = o.importExpr(Identifiers.ΔdefineInjectable).callFn([mapToMapExpression( + const expression = o.importExpr(Identifiers.ɵɵdefineInjectable).callFn([mapToMapExpression( {token, factory: result.factory, providedIn})]); const type = new o.ExpressionType(o.importExpr( Identifiers.InjectableDef, [typeWithParameters(meta.type, meta.typeArgumentCount)])); diff --git a/packages/compiler/src/render3/r3_identifiers.ts b/packages/compiler/src/render3/r3_identifiers.ts index f5710111b6..7b04d69ecc 100644 --- a/packages/compiler/src/render3/r3_identifiers.ts +++ b/packages/compiler/src/render3/r3_identifiers.ts @@ -17,227 +17,227 @@ export class Identifiers { static PATCH_DEPS = 'patchedDeps'; /* Instructions */ - static namespaceHTML: o.ExternalReference = {name: 'ΔnamespaceHTML', moduleName: CORE}; + static namespaceHTML: o.ExternalReference = {name: 'ɵɵnamespaceHTML', moduleName: CORE}; - static namespaceMathML: o.ExternalReference = {name: 'ΔnamespaceMathML', moduleName: CORE}; + static namespaceMathML: o.ExternalReference = {name: 'ɵɵnamespaceMathML', moduleName: CORE}; - static namespaceSVG: o.ExternalReference = {name: 'ΔnamespaceSVG', moduleName: CORE}; + static namespaceSVG: o.ExternalReference = {name: 'ɵɵnamespaceSVG', moduleName: CORE}; - static element: o.ExternalReference = {name: 'Δelement', moduleName: CORE}; + static element: o.ExternalReference = {name: 'ɵɵelement', moduleName: CORE}; - static elementStart: o.ExternalReference = {name: 'ΔelementStart', moduleName: CORE}; + static elementStart: o.ExternalReference = {name: 'ɵɵelementStart', moduleName: CORE}; - static elementEnd: o.ExternalReference = {name: 'ΔelementEnd', moduleName: CORE}; + static elementEnd: o.ExternalReference = {name: 'ɵɵelementEnd', moduleName: CORE}; - static elementProperty: o.ExternalReference = {name: 'ΔelementProperty', moduleName: CORE}; + static elementProperty: o.ExternalReference = {name: 'ɵɵelementProperty', moduleName: CORE}; - static select: o.ExternalReference = {name: 'Δselect', moduleName: CORE}; + static select: o.ExternalReference = {name: 'ɵɵselect', moduleName: CORE}; static componentHostSyntheticProperty: - o.ExternalReference = {name: 'ΔcomponentHostSyntheticProperty', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵcomponentHostSyntheticProperty', moduleName: CORE}; static componentHostSyntheticListener: - o.ExternalReference = {name: 'ΔcomponentHostSyntheticListener', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵcomponentHostSyntheticListener', moduleName: CORE}; - static elementAttribute: o.ExternalReference = {name: 'ΔelementAttribute', moduleName: CORE}; + static elementAttribute: o.ExternalReference = {name: 'ɵɵelementAttribute', moduleName: CORE}; - static elementClassProp: o.ExternalReference = {name: 'ΔelementClassProp', moduleName: CORE}; + static elementClassProp: o.ExternalReference = {name: 'ɵɵelementClassProp', moduleName: CORE}; static elementContainerStart: - o.ExternalReference = {name: 'ΔelementContainerStart', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵelementContainerStart', moduleName: CORE}; static elementContainerEnd: - o.ExternalReference = {name: 'ΔelementContainerEnd', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵelementContainerEnd', moduleName: CORE}; - static elementStyling: o.ExternalReference = {name: 'ΔelementStyling', moduleName: CORE}; + static elementStyling: o.ExternalReference = {name: 'ɵɵelementStyling', moduleName: CORE}; - static elementStylingMap: o.ExternalReference = {name: 'ΔelementStylingMap', moduleName: CORE}; + static elementStylingMap: o.ExternalReference = {name: 'ɵɵelementStylingMap', moduleName: CORE}; - static elementStyleProp: o.ExternalReference = {name: 'ΔelementStyleProp', moduleName: CORE}; + static elementStyleProp: o.ExternalReference = {name: 'ɵɵelementStyleProp', moduleName: CORE}; static elementStylingApply: - o.ExternalReference = {name: 'ΔelementStylingApply', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵelementStylingApply', moduleName: CORE}; - static elementHostAttrs: o.ExternalReference = {name: 'ΔelementHostAttrs', moduleName: CORE}; + static elementHostAttrs: o.ExternalReference = {name: 'ɵɵelementHostAttrs', moduleName: CORE}; - static elementHostStyling: o.ExternalReference = {name: 'ΔelementHostStyling', moduleName: CORE}; + static elementHostStyling: o.ExternalReference = {name: 'ɵɵelementHostStyling', moduleName: CORE}; static elementHostStylingMap: - o.ExternalReference = {name: 'ΔelementHostStylingMap', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵelementHostStylingMap', moduleName: CORE}; static elementHostStyleProp: - o.ExternalReference = {name: 'ΔelementHostStyleProp', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵelementHostStyleProp', moduleName: CORE}; static elementHostClassProp: - o.ExternalReference = {name: 'ΔelementHostClassProp', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵelementHostClassProp', moduleName: CORE}; static elementHostStylingApply: - o.ExternalReference = {name: 'ΔelementHostStylingApply', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵelementHostStylingApply', moduleName: CORE}; - static containerCreate: o.ExternalReference = {name: 'Δcontainer', moduleName: CORE}; + static containerCreate: o.ExternalReference = {name: 'ɵɵcontainer', moduleName: CORE}; - static nextContext: o.ExternalReference = {name: 'ΔnextContext', moduleName: CORE}; + static nextContext: o.ExternalReference = {name: 'ɵɵnextContext', moduleName: CORE}; - static templateCreate: o.ExternalReference = {name: 'Δtemplate', moduleName: CORE}; + static templateCreate: o.ExternalReference = {name: 'ɵɵtemplate', moduleName: CORE}; - static text: o.ExternalReference = {name: 'Δtext', moduleName: CORE}; + static text: o.ExternalReference = {name: 'ɵɵtext', moduleName: CORE}; - static textBinding: o.ExternalReference = {name: 'ΔtextBinding', moduleName: CORE}; + static textBinding: o.ExternalReference = {name: 'ɵɵtextBinding', moduleName: CORE}; - static bind: o.ExternalReference = {name: 'Δbind', moduleName: CORE}; + static bind: o.ExternalReference = {name: 'ɵɵbind', moduleName: CORE}; - static enableBindings: o.ExternalReference = {name: 'ΔenableBindings', moduleName: CORE}; + static enableBindings: o.ExternalReference = {name: 'ɵɵenableBindings', moduleName: CORE}; - static disableBindings: o.ExternalReference = {name: 'ΔdisableBindings', moduleName: CORE}; + static disableBindings: o.ExternalReference = {name: 'ɵɵdisableBindings', moduleName: CORE}; - static allocHostVars: o.ExternalReference = {name: 'ΔallocHostVars', moduleName: CORE}; + static allocHostVars: o.ExternalReference = {name: 'ɵɵallocHostVars', moduleName: CORE}; - static getCurrentView: o.ExternalReference = {name: 'ΔgetCurrentView', moduleName: CORE}; + static getCurrentView: o.ExternalReference = {name: 'ɵɵgetCurrentView', moduleName: CORE}; - static restoreView: o.ExternalReference = {name: 'ΔrestoreView', moduleName: CORE}; + static restoreView: o.ExternalReference = {name: 'ɵɵrestoreView', moduleName: CORE}; - static interpolation1: o.ExternalReference = {name: 'Δinterpolation1', moduleName: CORE}; - static interpolation2: o.ExternalReference = {name: 'Δinterpolation2', moduleName: CORE}; - static interpolation3: o.ExternalReference = {name: 'Δinterpolation3', moduleName: CORE}; - static interpolation4: o.ExternalReference = {name: 'Δinterpolation4', moduleName: CORE}; - static interpolation5: o.ExternalReference = {name: 'Δinterpolation5', moduleName: CORE}; - static interpolation6: o.ExternalReference = {name: 'Δinterpolation6', moduleName: CORE}; - static interpolation7: o.ExternalReference = {name: 'Δinterpolation7', moduleName: CORE}; - static interpolation8: o.ExternalReference = {name: 'Δinterpolation8', moduleName: CORE}; - static interpolationV: o.ExternalReference = {name: 'ΔinterpolationV', moduleName: CORE}; + static interpolation1: o.ExternalReference = {name: 'ɵɵinterpolation1', moduleName: CORE}; + static interpolation2: o.ExternalReference = {name: 'ɵɵinterpolation2', moduleName: CORE}; + static interpolation3: o.ExternalReference = {name: 'ɵɵinterpolation3', moduleName: CORE}; + static interpolation4: o.ExternalReference = {name: 'ɵɵinterpolation4', moduleName: CORE}; + static interpolation5: o.ExternalReference = {name: 'ɵɵinterpolation5', moduleName: CORE}; + static interpolation6: o.ExternalReference = {name: 'ɵɵinterpolation6', moduleName: CORE}; + static interpolation7: o.ExternalReference = {name: 'ɵɵinterpolation7', moduleName: CORE}; + static interpolation8: o.ExternalReference = {name: 'ɵɵinterpolation8', moduleName: CORE}; + static interpolationV: o.ExternalReference = {name: 'ɵɵinterpolationV', moduleName: CORE}; - static pureFunction0: o.ExternalReference = {name: 'ΔpureFunction0', moduleName: CORE}; - static pureFunction1: o.ExternalReference = {name: 'ΔpureFunction1', moduleName: CORE}; - static pureFunction2: o.ExternalReference = {name: 'ΔpureFunction2', moduleName: CORE}; - static pureFunction3: o.ExternalReference = {name: 'ΔpureFunction3', moduleName: CORE}; - static pureFunction4: o.ExternalReference = {name: 'ΔpureFunction4', moduleName: CORE}; - static pureFunction5: o.ExternalReference = {name: 'ΔpureFunction5', moduleName: CORE}; - static pureFunction6: o.ExternalReference = {name: 'ΔpureFunction6', moduleName: CORE}; - static pureFunction7: o.ExternalReference = {name: 'ΔpureFunction7', moduleName: CORE}; - static pureFunction8: o.ExternalReference = {name: 'ΔpureFunction8', moduleName: CORE}; - static pureFunctionV: o.ExternalReference = {name: 'ΔpureFunctionV', moduleName: CORE}; + static pureFunction0: o.ExternalReference = {name: 'ɵɵpureFunction0', moduleName: CORE}; + static pureFunction1: o.ExternalReference = {name: 'ɵɵpureFunction1', moduleName: CORE}; + static pureFunction2: o.ExternalReference = {name: 'ɵɵpureFunction2', moduleName: CORE}; + static pureFunction3: o.ExternalReference = {name: 'ɵɵpureFunction3', moduleName: CORE}; + static pureFunction4: o.ExternalReference = {name: 'ɵɵpureFunction4', moduleName: CORE}; + static pureFunction5: o.ExternalReference = {name: 'ɵɵpureFunction5', moduleName: CORE}; + static pureFunction6: o.ExternalReference = {name: 'ɵɵpureFunction6', moduleName: CORE}; + static pureFunction7: o.ExternalReference = {name: 'ɵɵpureFunction7', moduleName: CORE}; + static pureFunction8: o.ExternalReference = {name: 'ɵɵpureFunction8', moduleName: CORE}; + static pureFunctionV: o.ExternalReference = {name: 'ɵɵpureFunctionV', moduleName: CORE}; - static pipeBind1: o.ExternalReference = {name: 'ΔpipeBind1', moduleName: CORE}; - static pipeBind2: o.ExternalReference = {name: 'ΔpipeBind2', moduleName: CORE}; - static pipeBind3: o.ExternalReference = {name: 'ΔpipeBind3', moduleName: CORE}; - static pipeBind4: o.ExternalReference = {name: 'ΔpipeBind4', moduleName: CORE}; - static pipeBindV: o.ExternalReference = {name: 'ΔpipeBindV', moduleName: CORE}; + static pipeBind1: o.ExternalReference = {name: 'ɵɵpipeBind1', moduleName: CORE}; + static pipeBind2: o.ExternalReference = {name: 'ɵɵpipeBind2', moduleName: CORE}; + static pipeBind3: o.ExternalReference = {name: 'ɵɵpipeBind3', moduleName: CORE}; + static pipeBind4: o.ExternalReference = {name: 'ɵɵpipeBind4', moduleName: CORE}; + static pipeBindV: o.ExternalReference = {name: 'ɵɵpipeBindV', moduleName: CORE}; - static i18n: o.ExternalReference = {name: 'Δi18n', moduleName: CORE}; - static i18nAttributes: o.ExternalReference = {name: 'Δi18nAttributes', moduleName: CORE}; - static i18nExp: o.ExternalReference = {name: 'Δi18nExp', moduleName: CORE}; - static i18nStart: o.ExternalReference = {name: 'Δi18nStart', moduleName: CORE}; - static i18nEnd: o.ExternalReference = {name: 'Δi18nEnd', moduleName: CORE}; - static i18nApply: o.ExternalReference = {name: 'Δi18nApply', moduleName: CORE}; - static i18nPostprocess: o.ExternalReference = {name: 'Δi18nPostprocess', moduleName: CORE}; - static i18nLocalize: o.ExternalReference = {name: 'Δi18nLocalize', moduleName: CORE}; + static i18n: o.ExternalReference = {name: 'ɵɵi18n', moduleName: CORE}; + static i18nAttributes: o.ExternalReference = {name: 'ɵɵi18nAttributes', moduleName: CORE}; + static i18nExp: o.ExternalReference = {name: 'ɵɵi18nExp', moduleName: CORE}; + static i18nStart: o.ExternalReference = {name: 'ɵɵi18nStart', moduleName: CORE}; + static i18nEnd: o.ExternalReference = {name: 'ɵɵi18nEnd', moduleName: CORE}; + static i18nApply: o.ExternalReference = {name: 'ɵɵi18nApply', moduleName: CORE}; + static i18nPostprocess: o.ExternalReference = {name: 'ɵɵi18nPostprocess', moduleName: CORE}; + static i18nLocalize: o.ExternalReference = {name: 'ɵɵi18nLocalize', moduleName: CORE}; - static load: o.ExternalReference = {name: 'Δload', moduleName: CORE}; + static load: o.ExternalReference = {name: 'ɵɵload', moduleName: CORE}; - static pipe: o.ExternalReference = {name: 'Δpipe', moduleName: CORE}; + static pipe: o.ExternalReference = {name: 'ɵɵpipe', moduleName: CORE}; - static projection: o.ExternalReference = {name: 'Δprojection', moduleName: CORE}; - static projectionDef: o.ExternalReference = {name: 'ΔprojectionDef', moduleName: CORE}; + static projection: o.ExternalReference = {name: 'ɵɵprojection', moduleName: CORE}; + static projectionDef: o.ExternalReference = {name: 'ɵɵprojectionDef', moduleName: CORE}; - static reference: o.ExternalReference = {name: 'Δreference', 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}; - static injectAttribute: o.ExternalReference = {name: 'ΔinjectAttribute', moduleName: CORE}; + static injectAttribute: o.ExternalReference = {name: 'ɵɵinjectAttribute', moduleName: CORE}; - static directiveInject: o.ExternalReference = {name: 'ΔdirectiveInject', moduleName: CORE}; + static directiveInject: o.ExternalReference = {name: 'ɵɵdirectiveInject', moduleName: CORE}; static templateRefExtractor: - o.ExternalReference = {name: 'ΔtemplateRefExtractor', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵtemplateRefExtractor', moduleName: CORE}; - static resolveWindow: o.ExternalReference = {name: 'ΔresolveWindow', moduleName: CORE}; - static resolveDocument: o.ExternalReference = {name: 'ΔresolveDocument', moduleName: CORE}; - static resolveBody: o.ExternalReference = {name: 'ΔresolveBody', moduleName: CORE}; + static resolveWindow: o.ExternalReference = {name: 'ɵɵresolveWindow', moduleName: CORE}; + static resolveDocument: o.ExternalReference = {name: 'ɵɵresolveDocument', moduleName: CORE}; + static resolveBody: o.ExternalReference = {name: 'ɵɵresolveBody', moduleName: CORE}; - static defineBase: o.ExternalReference = {name: 'ΔdefineBase', moduleName: CORE}; + static defineBase: o.ExternalReference = {name: 'ɵɵdefineBase', moduleName: CORE}; static BaseDef: o.ExternalReference = { - name: 'ΔBaseDef', + name: 'ɵɵBaseDef', moduleName: CORE, }; - static defineComponent: o.ExternalReference = {name: 'ΔdefineComponent', moduleName: CORE}; + static defineComponent: o.ExternalReference = {name: 'ɵɵdefineComponent', moduleName: CORE}; - static setComponentScope: o.ExternalReference = {name: 'ΔsetComponentScope', moduleName: CORE}; + static setComponentScope: o.ExternalReference = {name: 'ɵɵsetComponentScope', moduleName: CORE}; static ComponentDefWithMeta: o.ExternalReference = { - name: 'ΔComponentDefWithMeta', + name: 'ɵɵComponentDefWithMeta', moduleName: CORE, }; static defineDirective: o.ExternalReference = { - name: 'ΔdefineDirective', + name: 'ɵɵdefineDirective', moduleName: CORE, }; static DirectiveDefWithMeta: o.ExternalReference = { - name: 'ΔDirectiveDefWithMeta', + name: 'ɵɵDirectiveDefWithMeta', moduleName: CORE, }; static InjectorDef: o.ExternalReference = { - name: 'ΔInjectorDef', + name: 'ɵɵInjectorDef', moduleName: CORE, }; static defineInjector: o.ExternalReference = { - name: 'ΔdefineInjector', + name: 'ɵɵdefineInjector', moduleName: CORE, }; static NgModuleDefWithMeta: o.ExternalReference = { - name: 'ΔNgModuleDefWithMeta', + name: 'ɵɵNgModuleDefWithMeta', moduleName: CORE, }; - static defineNgModule: o.ExternalReference = {name: 'ΔdefineNgModule', moduleName: CORE}; - static setNgModuleScope: o.ExternalReference = {name: 'ΔsetNgModuleScope', moduleName: CORE}; + static defineNgModule: o.ExternalReference = {name: 'ɵɵdefineNgModule', moduleName: CORE}; + static setNgModuleScope: o.ExternalReference = {name: 'ɵɵsetNgModuleScope', moduleName: CORE}; - static PipeDefWithMeta: o.ExternalReference = {name: 'ΔPipeDefWithMeta', moduleName: CORE}; + static PipeDefWithMeta: o.ExternalReference = {name: 'ɵɵPipeDefWithMeta', moduleName: CORE}; - static definePipe: o.ExternalReference = {name: 'ΔdefinePipe', moduleName: CORE}; + static definePipe: o.ExternalReference = {name: 'ɵɵdefinePipe', moduleName: CORE}; - static queryRefresh: o.ExternalReference = {name: 'ΔqueryRefresh', moduleName: CORE}; - static viewQuery: o.ExternalReference = {name: 'ΔviewQuery', moduleName: CORE}; - static staticViewQuery: o.ExternalReference = {name: 'ΔstaticViewQuery', moduleName: CORE}; - static staticContentQuery: o.ExternalReference = {name: 'ΔstaticContentQuery', moduleName: CORE}; - static loadViewQuery: o.ExternalReference = {name: 'ΔloadViewQuery', moduleName: CORE}; - static contentQuery: o.ExternalReference = {name: 'ΔcontentQuery', moduleName: CORE}; - static loadContentQuery: o.ExternalReference = {name: 'ΔloadContentQuery', moduleName: CORE}; + static queryRefresh: o.ExternalReference = {name: 'ɵɵqueryRefresh', moduleName: CORE}; + static viewQuery: o.ExternalReference = {name: 'ɵɵviewQuery', moduleName: CORE}; + static staticViewQuery: o.ExternalReference = {name: 'ɵɵstaticViewQuery', moduleName: CORE}; + static staticContentQuery: o.ExternalReference = {name: 'ɵɵstaticContentQuery', moduleName: CORE}; + static loadViewQuery: o.ExternalReference = {name: 'ɵɵloadViewQuery', moduleName: CORE}; + static contentQuery: o.ExternalReference = {name: 'ɵɵcontentQuery', moduleName: CORE}; + static loadContentQuery: o.ExternalReference = {name: 'ɵɵloadContentQuery', moduleName: CORE}; - static NgOnChangesFeature: o.ExternalReference = {name: 'ΔNgOnChangesFeature', moduleName: CORE}; + static NgOnChangesFeature: o.ExternalReference = {name: 'ɵɵNgOnChangesFeature', moduleName: CORE}; static InheritDefinitionFeature: - o.ExternalReference = {name: 'ΔInheritDefinitionFeature', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵInheritDefinitionFeature', moduleName: CORE}; - static ProvidersFeature: o.ExternalReference = {name: 'ΔProvidersFeature', moduleName: CORE}; + static ProvidersFeature: o.ExternalReference = {name: 'ɵɵProvidersFeature', moduleName: CORE}; - static listener: o.ExternalReference = {name: 'Δlistener', moduleName: CORE}; + static listener: o.ExternalReference = {name: 'ɵɵlistener', moduleName: CORE}; static getFactoryOf: o.ExternalReference = { - name: 'ΔgetFactoryOf', + name: 'ɵɵgetFactoryOf', moduleName: CORE, }; static getInheritedFactory: o.ExternalReference = { - name: 'ΔgetInheritedFactory', + name: 'ɵɵgetInheritedFactory', moduleName: CORE, }; // sanitization-related functions - static sanitizeHtml: o.ExternalReference = {name: 'ΔsanitizeHtml', moduleName: CORE}; - static sanitizeStyle: o.ExternalReference = {name: 'ΔsanitizeStyle', moduleName: CORE}; + static sanitizeHtml: o.ExternalReference = {name: 'ɵɵsanitizeHtml', moduleName: CORE}; + static sanitizeStyle: o.ExternalReference = {name: 'ɵɵsanitizeStyle', moduleName: CORE}; static defaultStyleSanitizer: - o.ExternalReference = {name: 'ΔdefaultStyleSanitizer', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵdefaultStyleSanitizer', moduleName: CORE}; static sanitizeResourceUrl: - o.ExternalReference = {name: 'ΔsanitizeResourceUrl', moduleName: CORE}; - static sanitizeScript: o.ExternalReference = {name: 'ΔsanitizeScript', moduleName: CORE}; - static sanitizeUrl: o.ExternalReference = {name: 'ΔsanitizeUrl', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵsanitizeResourceUrl', moduleName: CORE}; + static sanitizeScript: o.ExternalReference = {name: 'ɵɵsanitizeScript', moduleName: CORE}; + static sanitizeUrl: o.ExternalReference = {name: 'ɵɵsanitizeUrl', moduleName: CORE}; static sanitizeUrlOrResourceUrl: - o.ExternalReference = {name: 'ΔsanitizeUrlOrResourceUrl', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵsanitizeUrlOrResourceUrl', moduleName: CORE}; } diff --git a/packages/compiler/src/render3/r3_module_compiler.ts b/packages/compiler/src/render3/r3_module_compiler.ts index a2913566a4..213e762c5f 100644 --- a/packages/compiler/src/render3/r3_module_compiler.ts +++ b/packages/compiler/src/render3/r3_module_compiler.ts @@ -102,7 +102,7 @@ export function compileNgModule(meta: R3NgModuleMetadata): R3NgModuleDef { } // If requested to emit scope information inline, pass the declarations, imports and exports to - // the `ΔdefineNgModule` call. The JIT compilation uses this. + // the `ɵɵdefineNgModule` call. The JIT compilation uses this. if (emitInline) { if (declarations.length) { definitionMap.declarations = refsToArray(declarations, containsForwardDecls); @@ -117,7 +117,7 @@ export function compileNgModule(meta: R3NgModuleMetadata): R3NgModuleDef { } } - // If not emitting inline, the scope information is not passed into `ΔdefineNgModule` as it would + // If not emitting inline, the scope information is not passed into `ɵɵdefineNgModule` as it would // prevent tree-shaking of the declarations, imports and exports references. else { const setNgModuleScopeCall = generateSetNgModuleScopeCall(meta); @@ -141,7 +141,7 @@ export function compileNgModule(meta: R3NgModuleMetadata): R3NgModuleDef { } /** - * Generates a function call to `ΔsetNgModuleScope` with all necessary information so that the + * Generates a function call to `ɵɵsetNgModuleScope` with all necessary information so that the * transitive module scope can be computed during runtime in JIT mode. This call is marked pure * such that the references to declarations, imports and exports may be elided causing these * symbols to become tree-shakeable. diff --git a/packages/compiler/src/render3/view/template.ts b/packages/compiler/src/render3/view/template.ts index 29ae26e732..3fe0584dcc 100644 --- a/packages/compiler/src/render3/view/template.ts +++ b/packages/compiler/src/render3/view/template.ts @@ -848,7 +848,7 @@ export class TemplateDefinitionBuilder implements t.Visitor, LocalResolver return trimTrailingNulls(parameters); }); - // handle property bindings e.g. ΔelementProperty(1, 'ngForOf', Δbind(ctx.items)); + // handle property bindings e.g. ɵɵelementProperty(1, 'ngForOf', ɵɵbind(ctx.items)); const context = o.variable(CONTEXT_NAME); this.templatePropertyBindings(template, templateIndex, context, template.templateAttrs); diff --git a/packages/core/src/change_detection/differs/iterable_differs.ts b/packages/core/src/change_detection/differs/iterable_differs.ts index f8727adb5e..2d08ea8b5a 100644 --- a/packages/core/src/change_detection/differs/iterable_differs.ts +++ b/packages/core/src/change_detection/differs/iterable_differs.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {ΔdefineInjectable} from '../../di/interface/defs'; +import {ɵɵdefineInjectable} from '../../di/interface/defs'; import {StaticProvider} from '../../di/interface/provider'; import {Optional, SkipSelf} from '../../di/metadata'; import {DefaultIterableDifferFactory} from '../differs/default_iterable_differ'; @@ -143,7 +143,7 @@ export interface IterableDifferFactory { */ export class IterableDiffers { /** @nocollapse */ - static ngInjectableDef = ΔdefineInjectable({ + static ngInjectableDef = ɵɵdefineInjectable({ providedIn: 'root', factory: () => new IterableDiffers([new DefaultIterableDifferFactory()]) }); diff --git a/packages/core/src/change_detection/differs/keyvalue_differs.ts b/packages/core/src/change_detection/differs/keyvalue_differs.ts index d511134b72..5c9571ef05 100644 --- a/packages/core/src/change_detection/differs/keyvalue_differs.ts +++ b/packages/core/src/change_detection/differs/keyvalue_differs.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {Optional, SkipSelf, StaticProvider, ΔdefineInjectable} from '../../di'; +import {Optional, SkipSelf, StaticProvider, ɵɵdefineInjectable} from '../../di'; import {DefaultKeyValueDifferFactory} from './default_keyvalue_differ'; @@ -118,7 +118,7 @@ export interface KeyValueDifferFactory { */ export class KeyValueDiffers { /** @nocollapse */ - static ngInjectableDef = ΔdefineInjectable({ + static ngInjectableDef = ɵɵdefineInjectable({ providedIn: 'root', factory: () => new KeyValueDiffers([new DefaultKeyValueDifferFactory()]) }); diff --git a/packages/core/src/core_private_export.ts b/packages/core/src/core_private_export.ts index 98595d9b27..1a446cbee5 100644 --- a/packages/core/src/core_private_export.ts +++ b/packages/core/src/core_private_export.ts @@ -13,8 +13,8 @@ export {devModeEqual as ɵdevModeEqual} from './change_detection/change_detectio export {isListLikeIterable as ɵisListLikeIterable} from './change_detection/change_detection_util'; export {ChangeDetectorStatus as ɵChangeDetectorStatus, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy} from './change_detection/constants'; export {Console as ɵConsole} from './console'; -export {inject, setCurrentInjector as ɵsetCurrentInjector, Δinject} from './di/injector_compatibility'; -export {getInjectableDef as ɵgetInjectableDef, ΔInjectableDef as ΔInjectableDef, ΔInjectorDef} from './di/interface/defs'; +export {inject, setCurrentInjector as ɵsetCurrentInjector, ɵɵinject} from './di/injector_compatibility'; +export {getInjectableDef as ɵgetInjectableDef, ɵɵInjectableDef as ɵɵInjectableDef, ɵɵInjectorDef} from './di/interface/defs'; export {APP_ROOT as ɵAPP_ROOT} from './di/scope'; export {ivyEnabled as ɵivyEnabled} from './ivy_switch'; export {ComponentFactory as ɵComponentFactory} from './linker/component_factory'; diff --git a/packages/core/src/core_render3_private_export.ts b/packages/core/src/core_render3_private_export.ts index e3474e53ad..179735a15e 100644 --- a/packages/core/src/core_render3_private_export.ts +++ b/packages/core/src/core_render3_private_export.ts @@ -8,11 +8,11 @@ // clang-format off export { - ΔdefineBase, - ΔdefineComponent, - ΔdefineDirective, - ΔdefinePipe, - ΔdefineNgModule, + ɵɵdefineBase, + ɵɵdefineComponent, + ɵɵdefineDirective, + ɵɵdefinePipe, + ɵɵdefineNgModule, detectChanges as ɵdetectChanges, renderComponent as ɵrenderComponent, AttributeMarker as ɵAttributeMarker, @@ -21,16 +21,16 @@ export { ComponentRef as ɵRender3ComponentRef, DirectiveType as ɵDirectiveType, RenderFlags as ɵRenderFlags, - ΔdirectiveInject, - ΔinjectAttribute, - ΔgetFactoryOf, - ΔgetInheritedFactory, - ΔsetComponentScope, - ΔsetNgModuleScope, - ΔtemplateRefExtractor, - ΔProvidersFeature, - ΔInheritDefinitionFeature, - ΔNgOnChangesFeature, + ɵɵdirectiveInject, + ɵɵinjectAttribute, + ɵɵgetFactoryOf, + ɵɵgetInheritedFactory, + ɵɵsetComponentScope, + ɵɵsetNgModuleScope, + ɵɵtemplateRefExtractor, + ɵɵProvidersFeature, + ɵɵInheritDefinitionFeature, + ɵɵNgOnChangesFeature, LifecycleHooksFeature as ɵLifecycleHooksFeature, NgModuleType as ɵNgModuleType, NgModuleRef as ɵRender3NgModuleRef, @@ -38,108 +38,108 @@ export { markDirty as ɵmarkDirty, NgModuleFactory as ɵNgModuleFactory, NO_CHANGE as ɵNO_CHANGE, - Δcontainer, - ΔnextContext, - ΔelementStart, - ΔnamespaceHTML, - ΔnamespaceMathML, - ΔnamespaceSVG, - Δelement, - Δlistener, - Δtext, - ΔembeddedViewStart, - Δprojection, - Δbind, - Δinterpolation1, - Δinterpolation2, - Δinterpolation3, - Δinterpolation4, - Δinterpolation5, - Δinterpolation6, - Δinterpolation7, - Δinterpolation8, - ΔinterpolationV, - ΔpipeBind1, - ΔpipeBind2, - ΔpipeBind3, - ΔpipeBind4, - ΔpipeBindV, - ΔpureFunction0, - ΔpureFunction1, - ΔpureFunction2, - ΔpureFunction3, - ΔpureFunction4, - ΔpureFunction5, - ΔpureFunction6, - ΔpureFunction7, - ΔpureFunction8, - ΔpureFunctionV, - ΔgetCurrentView, + ɵɵcontainer, + ɵɵnextContext, + ɵɵelementStart, + ɵɵnamespaceHTML, + ɵɵnamespaceMathML, + ɵɵnamespaceSVG, + ɵɵelement, + ɵɵlistener, + ɵɵtext, + ɵɵembeddedViewStart, + ɵɵprojection, + ɵɵbind, + ɵɵinterpolation1, + ɵɵinterpolation2, + ɵɵinterpolation3, + ɵɵinterpolation4, + ɵɵinterpolation5, + ɵɵinterpolation6, + ɵɵinterpolation7, + ɵɵinterpolation8, + ɵɵinterpolationV, + ɵɵpipeBind1, + ɵɵpipeBind2, + ɵɵpipeBind3, + ɵɵpipeBind4, + ɵɵpipeBindV, + ɵɵpureFunction0, + ɵɵpureFunction1, + ɵɵpureFunction2, + ɵɵpureFunction3, + ɵɵpureFunction4, + ɵɵpureFunction5, + ɵɵpureFunction6, + ɵɵpureFunction7, + ɵɵpureFunction8, + ɵɵpureFunctionV, + ɵɵgetCurrentView, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, - ΔrestoreView, - ΔcontainerRefreshStart, - ΔcontainerRefreshEnd, - ΔqueryRefresh, - ΔviewQuery, - ΔstaticViewQuery, - ΔstaticContentQuery, - ΔloadViewQuery, - ΔcontentQuery, - ΔloadContentQuery, - ΔelementEnd, - ΔelementProperty, - ΔcomponentHostSyntheticProperty, - ΔcomponentHostSyntheticListener, - ΔprojectionDef, - Δreference, - ΔenableBindings, - ΔdisableBindings, - ΔallocHostVars, - ΔelementAttribute, - ΔelementContainerStart, - ΔelementContainerEnd, - ΔelementStyling, - ΔelementStylingMap, - ΔelementStyleProp, - ΔelementStylingApply, - ΔelementClassProp, + ɵɵrestoreView, + ɵɵcontainerRefreshStart, + ɵɵcontainerRefreshEnd, + ɵɵqueryRefresh, + ɵɵviewQuery, + ɵɵstaticViewQuery, + ɵɵstaticContentQuery, + ɵɵloadViewQuery, + ɵɵcontentQuery, + ɵɵloadContentQuery, + ɵɵelementEnd, + ɵɵelementProperty, + ɵɵcomponentHostSyntheticProperty, + ɵɵcomponentHostSyntheticListener, + ɵɵprojectionDef, + ɵɵreference, + ɵɵenableBindings, + ɵɵdisableBindings, + ɵɵallocHostVars, + ɵɵelementAttribute, + ɵɵelementContainerStart, + ɵɵelementContainerEnd, + ɵɵelementStyling, + ɵɵelementStylingMap, + ɵɵelementStyleProp, + ɵɵelementStylingApply, + ɵɵelementClassProp, - ΔelementHostAttrs, - ΔelementHostStyling, - ΔelementHostStylingMap, - ΔelementHostStyleProp, - ΔelementHostClassProp, - ΔelementHostStylingApply, + ɵɵelementHostAttrs, + ɵɵelementHostStyling, + ɵɵelementHostStylingMap, + ɵɵelementHostStyleProp, + ɵɵelementHostClassProp, + ɵɵelementHostStylingApply, - Δselect, - ΔtextBinding, - Δtemplate, - ΔembeddedViewEnd, + ɵɵselect, + ɵɵtextBinding, + ɵɵtemplate, + ɵɵembeddedViewEnd, store as ɵstore, - Δload, - Δpipe, - ΔBaseDef, + ɵɵload, + ɵɵpipe, + ɵɵBaseDef, ComponentDef as ɵComponentDef, - ΔComponentDefWithMeta, + ɵɵComponentDefWithMeta, DirectiveDef as ɵDirectiveDef, - ΔDirectiveDefWithMeta, + ɵɵDirectiveDefWithMeta, PipeDef as ɵPipeDef, - ΔPipeDefWithMeta, + ɵɵPipeDefWithMeta, whenRendered as ɵwhenRendered, - Δi18n, - Δi18nAttributes, - Δi18nExp, - Δi18nStart, - Δi18nEnd, - Δi18nApply, - Δi18nPostprocess, + ɵɵi18n, + ɵɵi18nAttributes, + ɵɵi18nExp, + ɵɵi18nStart, + ɵɵi18nEnd, + ɵɵi18nApply, + ɵɵi18nPostprocess, i18nConfigureLocalize as ɵi18nConfigureLocalize, - Δi18nLocalize, + ɵɵi18nLocalize, setClassMetadata as ɵsetClassMetadata, - ΔresolveWindow, - ΔresolveDocument, - ΔresolveBody, + ɵɵresolveWindow, + ɵɵresolveDocument, + ɵɵresolveBody, } from './render3/index'; @@ -161,18 +161,18 @@ export { export { NgModuleDef as ɵNgModuleDef, - ΔNgModuleDefWithMeta, + ɵɵNgModuleDefWithMeta, NgModuleTransitiveScopes as ɵNgModuleTransitiveScopes, } from './metadata/ng_module'; export { - ΔsanitizeHtml, - ΔsanitizeStyle, - ΔdefaultStyleSanitizer, - ΔsanitizeScript, - ΔsanitizeUrl, - ΔsanitizeResourceUrl, - ΔsanitizeUrlOrResourceUrl, + ɵɵsanitizeHtml, + ɵɵsanitizeStyle, + ɵɵdefaultStyleSanitizer, + ɵɵsanitizeScript, + ɵɵsanitizeUrl, + ɵɵsanitizeResourceUrl, + ɵɵsanitizeUrlOrResourceUrl, } from './sanitization/sanitization'; export { diff --git a/packages/core/src/di/index.ts b/packages/core/src/di/index.ts index 3dabe54bd2..3c098f3306 100644 --- a/packages/core/src/di/index.ts +++ b/packages/core/src/di/index.ts @@ -14,11 +14,11 @@ export * from './metadata'; export {InjectFlags} from './interface/injector'; -export {ΔdefineInjectable, defineInjectable, ΔdefineInjector, InjectableType, InjectorType} from './interface/defs'; +export {ɵɵdefineInjectable, defineInjectable, ɵɵdefineInjector, InjectableType, InjectorType} from './interface/defs'; export {forwardRef, resolveForwardRef, ForwardRefFn} from './forward_ref'; export {Injectable, InjectableDecorator, InjectableProvider} from './injectable'; export {INJECTOR, Injector} from './injector'; -export {Δinject, inject} from './injector_compatibility'; +export {ɵɵinject, inject} from './injector_compatibility'; export {ReflectiveInjector} from './reflective_injector'; export {StaticProvider, ValueProvider, ConstructorSansProvider, ExistingProvider, FactoryProvider, Provider, TypeProvider, ClassProvider} from './interface/provider'; export {ResolvedReflectiveFactory, ResolvedReflectiveProvider} from './reflective_provider'; diff --git a/packages/core/src/di/injectable.ts b/packages/core/src/di/injectable.ts index 784c9b72a8..19767f6f4b 100644 --- a/packages/core/src/di/injectable.ts +++ b/packages/core/src/di/injectable.ts @@ -9,7 +9,7 @@ import {Type} from '../interface/type'; import {TypeDecorator, makeDecorator} from '../util/decorators'; -import {InjectableType, getInjectableDef, ΔInjectableDef, ΔdefineInjectable} from './interface/defs'; +import {InjectableType, getInjectableDef, ɵɵInjectableDef, ɵɵdefineInjectable} from './interface/defs'; import {ClassSansProvider, ConstructorSansProvider, ExistingSansProvider, FactorySansProvider, StaticClassSansProvider, ValueSansProvider} from './interface/provider'; import {compileInjectable as render3CompileInjectable} from './jit/injectable'; import {convertInjectableProviderToFactory} from './util'; @@ -80,7 +80,7 @@ export const Injectable: InjectableDecorator = makeDecorator( * * @publicApi */ -export interface InjectableType extends Type { ngInjectableDef: ΔInjectableDef; } +export interface InjectableType extends Type { ngInjectableDef: ɵɵInjectableDef; } /** * Supports @Injectable() in JIT mode for Render2. @@ -89,7 +89,7 @@ function render2CompileInjectable( injectableType: InjectableType, options: {providedIn?: Type| 'root' | null} & InjectableProvider): void { if (options && options.providedIn !== undefined && !getInjectableDef(injectableType)) { - injectableType.ngInjectableDef = ΔdefineInjectable({ + injectableType.ngInjectableDef = ɵɵdefineInjectable({ providedIn: options.providedIn, factory: convertInjectableProviderToFactory(injectableType, options), }); diff --git a/packages/core/src/di/injection_token.ts b/packages/core/src/di/injection_token.ts index 496d6bb765..ac16ca838a 100644 --- a/packages/core/src/di/injection_token.ts +++ b/packages/core/src/di/injection_token.ts @@ -8,7 +8,7 @@ import {Type} from '../interface/type'; -import {ΔdefineInjectable} from './interface/defs'; +import {ɵɵdefineInjectable} from './interface/defs'; /** * Creates a token that can be used in a DI Provider. @@ -67,7 +67,7 @@ export class InjectionToken { // We are using it to assign `-1` which is used to identify `Injector`. (this as any).__NG_ELEMENT_ID__ = options; } else if (options !== undefined) { - this.ngInjectableDef = ΔdefineInjectable({ + this.ngInjectableDef = ɵɵdefineInjectable({ providedIn: options.providedIn || 'root', factory: options.factory, }); diff --git a/packages/core/src/di/injector.ts b/packages/core/src/di/injector.ts index f7265262a0..bc7ab65bde 100644 --- a/packages/core/src/di/injector.ts +++ b/packages/core/src/di/injector.ts @@ -11,8 +11,8 @@ import {getClosureSafeProperty} from '../util/property'; import {stringify} from '../util/stringify'; import {resolveForwardRef} from './forward_ref'; import {InjectionToken} from './injection_token'; -import {Δinject} from './injector_compatibility'; -import {ΔdefineInjectable} from './interface/defs'; +import {ɵɵinject} from './injector_compatibility'; +import {ɵɵdefineInjectable} from './interface/defs'; import {InjectFlags} from './interface/injector'; import {ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, StaticProvider, ValueProvider} from './interface/provider'; import {Inject, Optional, Self, SkipSelf} from './metadata'; @@ -107,9 +107,9 @@ export abstract class Injector { } /** @nocollapse */ - static ngInjectableDef = ΔdefineInjectable({ + static ngInjectableDef = ɵɵdefineInjectable({ providedIn: 'any' as any, - factory: () => Δinject(INJECTOR), + factory: () => ɵɵinject(INJECTOR), }); /** diff --git a/packages/core/src/di/injector_compatibility.ts b/packages/core/src/di/injector_compatibility.ts index cc6a257215..2cb99694a4 100644 --- a/packages/core/src/di/injector_compatibility.ts +++ b/packages/core/src/di/injector_compatibility.ts @@ -11,7 +11,7 @@ import {stringify} from '../util/stringify'; import {InjectionToken} from './injection_token'; import {Injector} from './injector'; -import {getInjectableDef, ΔInjectableDef} from './interface/defs'; +import {getInjectableDef, ɵɵInjectableDef} from './interface/defs'; import {InjectFlags} from './interface/injector'; import {Inject, Optional, Self, SkipSelf} from './metadata'; @@ -97,17 +97,18 @@ export function injectInjectorOnly( * * @publicApi */ -export function Δinject(token: Type| InjectionToken): T; -export function Δinject(token: Type| InjectionToken, flags?: InjectFlags): T|null; -export function Δinject(token: Type| InjectionToken, flags = InjectFlags.Default): T|null { +export function ɵɵinject(token: Type| InjectionToken): T; +export function ɵɵinject(token: Type| InjectionToken, flags?: InjectFlags): T|null; +export function ɵɵinject(token: Type| InjectionToken, flags = InjectFlags.Default): T| + null { return (_injectImplementation || injectInjectorOnly)(token, flags); } /** * @deprecated in v8, delete after v10. This API should be used only be generated code, and that - * code should now use Δinject instead. + * code should now use ɵɵinject instead. * @publicApi */ -export const inject = Δinject; +export const inject = ɵɵinject; /** * Injects `root` tokens in limp mode. @@ -118,7 +119,7 @@ export const inject = Δinject; */ export function injectRootLimpMode( token: Type| InjectionToken, notFoundValue: T | undefined, flags: InjectFlags): T|null { - const injectableDef: ΔInjectableDef|null = getInjectableDef(token); + const injectableDef: ɵɵInjectableDef|null = getInjectableDef(token); if (injectableDef && injectableDef.providedIn == 'root') { return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() : injectableDef.value; @@ -154,9 +155,9 @@ export function injectArgs(types: (Type| InjectionToken| any[])[]): an } } - args.push(Δinject(type !, flags)); + args.push(ɵɵinject(type !, flags)); } else { - args.push(Δinject(arg)); + args.push(ɵɵinject(arg)); } } return args; diff --git a/packages/core/src/di/interface/defs.ts b/packages/core/src/di/interface/defs.ts index 593e16a06b..dd00972be8 100644 --- a/packages/core/src/di/interface/defs.ts +++ b/packages/core/src/di/interface/defs.ts @@ -26,7 +26,7 @@ import {ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider, S * * @publicApi */ -export interface ΔInjectableDef { +export interface ɵɵInjectableDef { /** * Specifies that the given type belongs to a particular injector: * - `InjectorType` such as `NgModule`, @@ -60,7 +60,7 @@ export interface ΔInjectableDef { * * @publicApi */ -export interface ΔInjectorDef { +export interface ɵɵInjectorDef { factory: () => T; // TODO(alxhub): Narrow down the type here once decorators properly change the return type of the @@ -131,21 +131,21 @@ export interface InjectorTypeWithProviders { * * @publicApi */ -export function ΔdefineInjectable(opts: { +export function ɵɵdefineInjectable(opts: { providedIn?: Type| 'root' | 'any' | null, factory: () => T, }): never { return ({ providedIn: opts.providedIn as any || null, factory: opts.factory, value: undefined, - } as ΔInjectableDef) as never; + } as ɵɵInjectableDef) as never; } /** * @deprecated in v8, delete after v10. This API should be used only be generated code, and that - * code should now use ΔdefineInjectable instead. + * code should now use ɵɵdefineInjectable instead. * @publicApi */ -export const defineInjectable = ΔdefineInjectable; +export const defineInjectable = ɵɵdefineInjectable; /** * Construct an `InjectorDef` which configures an injector. @@ -167,11 +167,11 @@ export const defineInjectable = ΔdefineInjectable; * * @publicApi */ -export function ΔdefineInjector(options: {factory: () => any, providers?: any[], imports?: any[]}): +export function ɵɵdefineInjector(options: {factory: () => any, providers?: any[], imports?: any[]}): never { return ({ factory: options.factory, providers: options.providers || [], imports: options.imports || [], - } as ΔInjectorDef) as never; + } as ɵɵInjectorDef) as never; } /** @@ -179,7 +179,7 @@ export function ΔdefineInjector(options: {factory: () => any, providers?: any[] * * @param type type which may have `ngInjectableDef` */ -export function getInjectableDef(type: any): ΔInjectableDef|null { +export function getInjectableDef(type: any): ɵɵInjectableDef|null { return type && type.hasOwnProperty(NG_INJECTABLE_DEF) ? (type as any)[NG_INJECTABLE_DEF] : null; } @@ -188,7 +188,7 @@ export function getInjectableDef(type: any): ΔInjectableDef|null { * * @param type type which may have `ngInjectorDef` */ -export function getInjectorDef(type: any): ΔInjectorDef|null { +export function getInjectorDef(type: any): ɵɵInjectorDef|null { return type && type.hasOwnProperty(NG_INJECTOR_DEF) ? (type as any)[NG_INJECTOR_DEF] : null; } diff --git a/packages/core/src/di/jit/environment.ts b/packages/core/src/di/jit/environment.ts index a702bb6943..9bd8141b10 100644 --- a/packages/core/src/di/jit/environment.ts +++ b/packages/core/src/di/jit/environment.ts @@ -7,8 +7,8 @@ */ import {Type} from '../../interface/type'; -import {Δinject} from '../injector_compatibility'; -import {getInjectableDef, getInjectorDef, ΔdefineInjectable, ΔdefineInjector} from '../interface/defs'; +import {ɵɵinject} from '../injector_compatibility'; +import {getInjectableDef, getInjectorDef, ɵɵdefineInjectable, ɵɵdefineInjector} from '../interface/defs'; @@ -18,10 +18,10 @@ import {getInjectableDef, getInjectorDef, ΔdefineInjectable, ΔdefineInjector} * This should be kept up to date with the public exports of @angular/core. */ export const angularCoreDiEnv: {[name: string]: Function} = { - 'ΔdefineInjectable': ΔdefineInjectable, - 'ΔdefineInjector': ΔdefineInjector, - 'Δinject': Δinject, - 'ΔgetFactoryOf': getFactoryOf, + 'ɵɵdefineInjectable': ɵɵdefineInjectable, + 'ɵɵdefineInjector': ɵɵdefineInjector, + 'ɵɵinject': ɵɵinject, + 'ɵɵgetFactoryOf': getFactoryOf, }; function getFactoryOf(type: Type): ((type: Type| null) => T)|null { diff --git a/packages/core/src/di/r3_injector.ts b/packages/core/src/di/r3_injector.ts index aecdcc0ad8..9532e23741 100644 --- a/packages/core/src/di/r3_injector.ts +++ b/packages/core/src/di/r3_injector.ts @@ -13,8 +13,8 @@ import {stringify} from '../util/stringify'; import {resolveForwardRef} from './forward_ref'; import {InjectionToken} from './injection_token'; import {INJECTOR, Injector, NG_TEMP_TOKEN_PATH, NullInjector, USE_VALUE, catchInjectorError} from './injector'; -import {injectArgs, setCurrentInjector, Δinject} from './injector_compatibility'; -import {InjectableType, InjectorType, InjectorTypeWithProviders, getInjectableDef, getInjectorDef, ΔInjectableDef} from './interface/defs'; +import {injectArgs, setCurrentInjector, ɵɵinject} from './injector_compatibility'; +import {InjectableType, InjectorType, InjectorTypeWithProviders, getInjectableDef, getInjectorDef, ɵɵInjectableDef} from './interface/defs'; import {InjectFlags} from './interface/injector'; import {ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, StaticProvider, TypeProvider, ValueProvider} from './interface/provider'; import {APP_ROOT} from './scope'; @@ -356,7 +356,7 @@ export class R3Injector { return record.value as T; } - private injectableDefInScope(def: ΔInjectableDef): boolean { + private injectableDefInScope(def: ɵɵInjectableDef): boolean { if (!def.providedIn) { return false; } else if (typeof def.providedIn === 'string') { @@ -413,7 +413,7 @@ export function providerToFactory( if (isValueProvider(provider)) { factory = () => resolveForwardRef(provider.useValue); } else if (isExistingProvider(provider)) { - factory = () => Δinject(resolveForwardRef(provider.useExisting)); + factory = () => ɵɵinject(resolveForwardRef(provider.useExisting)); } else if (isFactoryProvider(provider)) { factory = () => provider.useFactory(...injectArgs(provider.deps || [])); } else { diff --git a/packages/core/src/di/util.ts b/packages/core/src/di/util.ts index d5e5830ad2..ccc78def56 100644 --- a/packages/core/src/di/util.ts +++ b/packages/core/src/di/util.ts @@ -10,7 +10,7 @@ import {Type} from '../interface/type'; import {ReflectionCapabilities} from '../reflection/reflection_capabilities'; import {getClosureSafeProperty} from '../util/property'; -import {injectArgs, Δinject} from './injector_compatibility'; +import {injectArgs, ɵɵinject} from './injector_compatibility'; import {ClassSansProvider, ConstructorSansProvider, ExistingSansProvider, FactorySansProvider, StaticClassSansProvider, ValueProvider, ValueSansProvider} from './interface/provider'; const USE_VALUE = @@ -32,7 +32,7 @@ export function convertInjectableProviderToFactory( return () => valueProvider.useValue; } else if ((provider as ExistingSansProvider).useExisting) { const existingProvider = (provider as ExistingSansProvider); - return () => Δinject(existingProvider.useExisting); + return () => ɵɵinject(existingProvider.useExisting); } else if ((provider as FactorySansProvider).useFactory) { const factoryProvider = (provider as FactorySansProvider); return () => factoryProvider.useFactory(...injectArgs(factoryProvider.deps || EMPTY_ARRAY)); diff --git a/packages/core/src/metadata/ng_module.ts b/packages/core/src/metadata/ng_module.ts index 5a64f53021..36201f1726 100644 --- a/packages/core/src/metadata/ng_module.ts +++ b/packages/core/src/metadata/ng_module.ts @@ -7,7 +7,7 @@ */ import {ApplicationRef} from '../application_ref'; -import {InjectorType, ΔdefineInjector} from '../di/interface/defs'; +import {InjectorType, ɵɵdefineInjector} from '../di/interface/defs'; import {Provider} from '../di/interface/provider'; import {convertInjectableProviderToFactory} from '../di/util'; import {Type} from '../interface/type'; @@ -35,7 +35,7 @@ export interface NgModuleTransitiveScopes { /** * @publicApi */ -export type ΔNgModuleDefWithMeta = NgModuleDef; +export type ɵɵNgModuleDefWithMeta = NgModuleDef; /** * Runtime link information for NgModules. @@ -43,7 +43,7 @@ export type ΔNgModuleDefWithMeta = NgModuleD * This is the internal data structure used by the runtime to assemble components, directives, * pipes, and injectors. * - * NOTE: Always use `ΔdefineNgModule` function to create this object, + * NOTE: Always use `ɵɵdefineNgModule` function to create this object, * never create the object directly since the shape of this object * can change between versions. */ @@ -347,7 +347,7 @@ function preR3NgModuleCompile(moduleType: InjectorType, metadata: NgModule) imports = [...imports, metadata.exports]; } - moduleType.ngInjectorDef = ΔdefineInjector({ + moduleType.ngInjectorDef = ɵɵdefineInjector({ factory: convertInjectableProviderToFactory(moduleType, {useClass: moduleType}), providers: metadata && metadata.providers, imports: imports, diff --git a/packages/core/src/r3_symbols.ts b/packages/core/src/r3_symbols.ts index 073cf4f9a5..6f8a80bbdb 100644 --- a/packages/core/src/r3_symbols.ts +++ b/packages/core/src/r3_symbols.ts @@ -21,10 +21,10 @@ * The below symbols are used for @Injectable and @NgModule compilation. */ -export {Δinject} from './di/injector_compatibility'; -export {ΔInjectableDef, ΔInjectorDef, ΔdefineInjectable, ΔdefineInjector} from './di/interface/defs'; -export {NgModuleDef, ΔNgModuleDefWithMeta} from './metadata/ng_module'; -export {ΔdefineNgModule} from './render3/definition'; +export {ɵɵinject} from './di/injector_compatibility'; +export {ɵɵInjectableDef, ɵɵInjectorDef, ɵɵdefineInjectable, ɵɵdefineInjector} from './di/interface/defs'; +export {NgModuleDef, ɵɵNgModuleDefWithMeta} from './metadata/ng_module'; +export {ɵɵdefineNgModule} from './render3/definition'; export {setClassMetadata} from './render3/metadata'; export {NgModuleFactory} from './render3/ng_module_ref'; diff --git a/packages/core/src/render3/CODE_GEN_API.md b/packages/core/src/render3/CODE_GEN_API.md new file mode 100644 index 0000000000..359ae0937f --- /dev/null +++ b/packages/core/src/render3/CODE_GEN_API.md @@ -0,0 +1,11 @@ +# Code Gen API + +### Prefix ɵɵ + +Ivy exports a number of functions prefixed with `ɵɵ`, for example `ɵɵelementStart`, or `ɵɵinject`, et al. These functions are part of API required for code generation by the Angular compiler. These functions are called by generated code, and they must be publicly exposed in order to be consumed by this generated code. **They are not meant for developer consumption**. The reason they are prefixed with `ɵɵ` is not only to identify them as different from other functions, but also to make them not show up at the top of IDE code completion in environments such as Visual Studio code. + + +### Guidance + +- Do not use `ɵɵ` functions directly. They are meant to be used in generated code. +- Do not create new `ɵɵ` functions, it's not a convention that Angular consumes, and it is liable to confuse other developers into thinking consuming Angular's `ɵɵ` functions is a good pattern to follow. diff --git a/packages/core/src/render3/DELTA_INSTRUCTIONS.md b/packages/core/src/render3/DELTA_INSTRUCTIONS.md deleted file mode 100644 index 0f631e7deb..0000000000 --- a/packages/core/src/render3/DELTA_INSTRUCTIONS.md +++ /dev/null @@ -1,9 +0,0 @@ -# Delta Instructions - -Ivy exports a number of functions prefixed with `Δ`, for example `ΔelementStart`, or `Δinject`, et al. These functions are referred to an "instructions" or "delta" instructions. They are functions that are called by code generated by the Ivy compiler that must be publicly exposed in order to be consumed by this generated code. **They are not meant for developer consumption**. The reason they are prefixed with `Δ` is not only to identify them as different from other functions, but also to make them not show up at the top of IDE code completion in environments such as Visual Studio code. - - -### Guidance - -- Do not use `Δ` functions directly. They are meant to be used in generated code. -- Do not create new `Δ` functions, it's not a convention that Angular consumes, and it is liable to confuse other developers into thinking consuming Angular's `Δ` functions is a good pattern to follow. diff --git a/packages/core/src/render3/STATUS.md b/packages/core/src/render3/STATUS.md index c26cece2d1..c2648c11c5 100644 --- a/packages/core/src/render3/STATUS.md +++ b/packages/core/src/render3/STATUS.md @@ -10,8 +10,8 @@ We currently expect Ivy to remain behind the flag until it's feature complete an The work can be divided into three categories: - `@angular/compiler-cli`: TypeScript transformer pipeline which includes two command line tools: - - `ngtsc`: (Angular TypeScript Compiler) Angular compiler which strips out `@Component` (and friends) and replaces it with `ΔdefineComponent` (and friends). - - `ngcc`: (Angular Compatibility Compiler) NPM upgrade compiler which reads the `STORING_METADATA_IN_D.TS.json` files and `.js` files and adds `ΔdefineComponent` (and friends) into the `node_module`. This in effect converts a pre-ivy module into ivy module. + - `ngtsc`: (Angular TypeScript Compiler) Angular compiler which strips out `@Component` (and friends) and replaces it with `ɵɵdefineComponent` (and friends). + - `ngcc`: (Angular Compatibility Compiler) NPM upgrade compiler which reads the `STORING_METADATA_IN_D.TS.json` files and `.js` files and adds `ɵɵdefineComponent` (and friends) into the `node_module`. This in effect converts a pre-ivy module into ivy module. - `@angular/compiler`: Ivy Compiler which converts decorator into ivy - `@angular/core`: Decorators which can be patched with `@angular/compiler`. @@ -20,7 +20,7 @@ The work can be divided into three categories: ### `ngtsc` TSC compiler transformer TSC transformer which removes and converts `@Pipe`, `@Component`, `@Directive` and `@NgModule` -to the corresponding `ΔdefinePipe`, `ΔdefineComponent`, `ΔdefineDirective` and `ΔdefineInjector`. +to the corresponding `ɵɵdefinePipe`, `ɵɵdefineComponent`, `ɵɵdefineDirective` and `ɵɵdefineInjector`. - ✅ Basic setup of the transformer into `tsc` - ✅ Can read STORING_METADATA_IN_D.TS from `.d.ts` (see: [STORING_METADATA_IN_D.TS.md](./STORING_METADATA_IN_D.TS.md)) @@ -40,19 +40,19 @@ A tool which "upgrades" `node_module` compiled with non-ivy `ngc` into ivy compl ## `@angular/compiler` changes -- ✅ Component compilation: Translates `@Component` => `ΔdefineComponent` +- ✅ Component compilation: Translates `@Component` => `ɵɵdefineComponent` - ✅ `TemplateCompiler` (current known as `ViewCompiler`) - ✅ `StyleCompiler` -- ✅ `PipeCompiler`: Translates `@Pipe` => `ΔdefinePipe` -- ✅ `DirectiveCompiler`: Translates `@Directive` => `ΔdefineDirective` -- ✅ `InjectableCompiler`: Translates `@Injectable` => `ΔdefineInjectable` -- ✅ `NgModuleCompiler`: Translates `@NgModule` => `ΔdefineInjector` (and `ΔdefineNgModule` only in jit) +- ✅ `PipeCompiler`: Translates `@Pipe` => `ɵɵdefinePipe` +- ✅ `DirectiveCompiler`: Translates `@Directive` => `ɵɵdefineDirective` +- ✅ `InjectableCompiler`: Translates `@Injectable` => `ɵɵdefineInjectable` +- ✅ `NgModuleCompiler`: Translates `@NgModule` => `ɵɵdefineInjector` (and `ɵɵdefineNgModule` only in jit) - ❌ Documentation ## `@angular/core` changes -The goal is for the `@Component` (and friends) to be the compiler of template. Since decorators are functions which execute during parsing of the `.js` file, the decorator can compile the template into Ivy. The AoT compiler's job is to remove the `@Component` and replace it with call to `ΔdefineComponent`. +The goal is for the `@Component` (and friends) to be the compiler of template. Since decorators are functions which execute during parsing of the `.js` file, the decorator can compile the template into Ivy. The AoT compiler's job is to remove the `@Component` and replace it with call to `ɵɵdefineComponent`. - ✅ `@angular/compiler` can patch itself onto: - ✅ `@Injectable` @@ -70,13 +70,13 @@ The goal is for the `@Component` (and friends) to be the compiler of template. S ## Decorators | Annotation | `defineXXX()` | Run time | Spec | Compiler | | -------------------- | ------------------------------ | ------- | -------- | -------- | -| `@Component` | ✅ `ΔdefineComponent()` | ✅ | ✅ | ✅ | -| `@Directive` | ✅ `ΔdefineDirective()` | ✅ | ✅ | ✅ | -| `@Directive` | ✅ `ΔdefineBase()` | ✅ | ✅ | ✅ | -| `@Pipe` | ✅ `ΔdefinePipe()` | ✅ | ✅ | ✅ | -| `@Injectable` | ✅ `ΔdefineInjectable()` | ✅ | ✅ | ✅ | -| `@NgModule` | ✅ `ΔdefineInjector()` | ✅ | ✅ | ✅ | -| `@ConfigureInjector` | ✅ `ΔdefineInjector()` | ❌ | ❌ | ❌ | +| `@Component` | ✅ `ɵɵdefineComponent()` | ✅ | ✅ | ✅ | +| `@Directive` | ✅ `ɵɵdefineDirective()` | ✅ | ✅ | ✅ | +| `@Directive` | ✅ `ɵɵdefineBase()` | ✅ | ✅ | ✅ | +| `@Pipe` | ✅ `ɵɵdefinePipe()` | ✅ | ✅ | ✅ | +| `@Injectable` | ✅ `ɵɵdefineInjectable()` | ✅ | ✅ | ✅ | +| `@NgModule` | ✅ `ɵɵdefineInjector()` | ✅ | ✅ | ✅ | +| `@ConfigureInjector` | ✅ `ɵɵdefineInjector()` | ❌ | ❌ | ❌ | diff --git a/packages/core/src/render3/STORING_METADATA_IN_D.TS.md b/packages/core/src/render3/STORING_METADATA_IN_D.TS.md index 82690386b2..9b2f9b7517 100644 --- a/packages/core/src/render3/STORING_METADATA_IN_D.TS.md +++ b/packages/core/src/render3/STORING_METADATA_IN_D.TS.md @@ -13,7 +13,7 @@ Here is an abbreviated example of breakage of tree-shake-ability. }) export class TooltipDirective { // ngtsc generates this: - static ngDirectiveDef = ΔdefineDirective(...); + static ngDirectiveDef = ɵɵdefineDirective(...); } @Component({ @@ -22,7 +22,7 @@ export class TooltipDirective { }) class MyAppComponent { // ngtsc generates this: - static ngDirectiveDef = ΔdefineComponent({ + static ngDirectiveDef = ɵɵdefineComponent({ ... directives: [ // BREAKS TREE-SHAKING!!! @@ -41,7 +41,7 @@ class MyAppComponent { }) class MyAppModule { // ngtsc generates this: - static ngDirectiveDef = ΔdefineNgModule(...); + static ngDirectiveDef = ɵɵdefineNgModule(...); } ``` diff --git a/packages/core/src/render3/VIEW_DATA.md b/packages/core/src/render3/VIEW_DATA.md index 607b6b48c8..4cab860b01 100644 --- a/packages/core/src/render3/VIEW_DATA.md +++ b/packages/core/src/render3/VIEW_DATA.md @@ -36,18 +36,18 @@ The size of the `CONSTS` section is declared in the property `consts` of the com }) class MyApp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ ..., consts: 5, template: function(rf: RenderFlags, ctx: MyApp) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - Δtext(1, 'Hello '); - ΔelementStart(2, 'b'); - Δtext(3, 'World'); - ΔelementEnd(); - Δtext(4, '!'); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵtext(1, 'Hello '); + ɵɵelementStart(2, 'b'); + ɵɵtext(3, 'World'); + ɵɵelementEnd(); + ɵɵtext(4, '!'); + ɵɵelementEnd(); } ... } @@ -87,19 +87,19 @@ The size of the `VARS `section is declared in the property `vars` of the compone class MyApp { name = 'World'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ ..., consts: 2, // Two DOM Elements. vars: 2, // Two bindings. template: function(rf: RenderFlags, ctx: MyApp) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - Δtext(1); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵtext(1); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'title', Δbind(ctx.name)); - ΔtextBinding(1, Δinterpolation1('Hello ', ctx.name, '!')); + ɵɵelementProperty(0, 'title', ɵɵbind(ctx.name)); + ɵɵtextBinding(1, ɵɵinterpolation1('Hello ', ctx.name, '!')); } ... } @@ -139,12 +139,12 @@ Examples include: }) class MyApp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ ..., consts: 1, template: function(rf: RenderFlags, ctx: MyApp) { if (rf & RenderFlags.Create) { - Δelement(0, 'child', ['tooltip', null]); + ɵɵelement(0, 'child', ['tooltip', null]); } ... }, @@ -159,7 +159,7 @@ class MyApp { }) class Child { @HostBinding('tooltip') hostTitle = 'Hello World!'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ ... hostVars: 1 }); @@ -171,7 +171,7 @@ class Child { }) class Tooltip { @HostBinding('title') hostTitle = 'greeting'; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ ... hostVars: 1 }); @@ -273,12 +273,12 @@ Injection tokens are sorted into three sections: }) class MyApp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ ..., consts: 1, template: function(rf: RenderFlags, ctx: MyApp) { if (rf & RenderFlags.Create) { - Δelement(0, 'child'); + ɵɵelement(0, 'child'); } ... }, @@ -301,7 +301,7 @@ class MyApp { }) class Child { construction(injector: Injector) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ ... features: [ ProvidesFeature( diff --git a/packages/core/src/render3/component_ref.ts b/packages/core/src/render3/component_ref.ts index cdc90aaf92..34d2d57e81 100644 --- a/packages/core/src/render3/component_ref.ts +++ b/packages/core/src/render3/component_ref.ts @@ -9,7 +9,7 @@ import {ChangeDetectorRef as ViewEngine_ChangeDetectorRef} from '../change_detection/change_detector_ref'; import {InjectionToken} from '../di/injection_token'; import {Injector} from '../di/injector'; -import {Δinject} from '../di/injector_compatibility'; +import {ɵɵinject} from '../di/injector_compatibility'; import {InjectFlags} from '../di/interface/injector'; import {Type} from '../interface/type'; import {ComponentFactory as viewEngine_ComponentFactory, ComponentRef as viewEngine_ComponentRef} from '../linker/component_factory'; @@ -66,7 +66,7 @@ function toRefArray(map: {[key: string]: string}): {propName: string; templateNa */ export const ROOT_CONTEXT = new InjectionToken( 'ROOT_CONTEXT_TOKEN', - {providedIn: 'root', factory: () => createRootContext(Δinject(SCHEDULER))}); + {providedIn: 'root', factory: () => createRootContext(ɵɵinject(SCHEDULER))}); /** * A change detection scheduler token for {@link RootContext}. This token is the default value used diff --git a/packages/core/src/render3/definition.ts b/packages/core/src/render3/definition.ts index 6cd7d1b06b..5c1fe79af0 100644 --- a/packages/core/src/render3/definition.ts +++ b/packages/core/src/render3/definition.ts @@ -18,7 +18,7 @@ import {stringify} from '../util/stringify'; import {EMPTY_ARRAY, EMPTY_OBJ} from './empty'; import {NG_COMPONENT_DEF, NG_DIRECTIVE_DEF, NG_MODULE_DEF, NG_PIPE_DEF} from './fields'; -import {ComponentDef, ComponentDefFeature, ComponentTemplate, ComponentType, ContentQueriesFunction, DirectiveDef, DirectiveDefFeature, DirectiveType, DirectiveTypesOrFactory, FactoryFn, HostBindingsFunction, PipeDef, PipeType, PipeTypesOrFactory, ViewQueriesFunction, ΔBaseDef} from './interfaces/definition'; +import {ComponentDef, ComponentDefFeature, ComponentTemplate, ComponentType, ContentQueriesFunction, DirectiveDef, DirectiveDefFeature, DirectiveType, DirectiveTypesOrFactory, FactoryFn, HostBindingsFunction, PipeDef, PipeType, PipeTypesOrFactory, ViewQueriesFunction, ɵɵBaseDef} from './interfaces/definition'; // while SelectorFlags is unused here, it's required so that types don't get resolved lazily // see: https://github.com/Microsoft/web-build-tools/issues/1050 import {CssSelectorList, SelectorFlags} from './interfaces/projection'; @@ -41,7 +41,7 @@ let _renderCompCount = 0; * ``` * @codeGenApi */ -export function ΔdefineComponent(componentDefinition: { +export function ɵɵdefineComponent(componentDefinition: { /** * Directive type, needed to configure the injector. */ @@ -307,7 +307,7 @@ export function ΔdefineComponent(componentDefinition: { /** * @codeGenApi */ -export function ΔsetComponentScope( +export function ɵɵsetComponentScope( type: ComponentType, directives: Type[], pipes: Type[]): void { const def = (type.ngComponentDef as ComponentDef); def.directiveDefs = () => directives.map(extractDirectiveDef); @@ -334,7 +334,7 @@ export function extractPipeDef(type: PipeType): PipeDef { /** * @codeGenApi */ -export function ΔdefineNgModule(def: { +export function ɵɵdefineNgModule(def: { /** Token representing the module. Used by DI. */ type: T; @@ -378,7 +378,7 @@ export function ΔdefineNgModule(def: { * * @codeGenApi */ -export function ΔsetNgModuleScope(type: any, scope: { +export function ɵɵsetNgModuleScope(type: any, scope: { /** List of components, directives, and pipes declared by this module. */ declarations?: Type[] | (() => Type[]); @@ -480,7 +480,7 @@ function invertObject( * # Example * ```ts * class ShouldBeInherited { - * static ngBaseDef = ΔdefineBase({ + * static ngBaseDef = ɵɵdefineBase({ * ... * }) * } @@ -490,7 +490,7 @@ function invertObject( * * @codeGenApi */ -export function ΔdefineBase(baseDefinition: { +export function ɵɵdefineBase(baseDefinition: { /** * A map of input names. * @@ -547,7 +547,7 @@ export function ΔdefineBase(baseDefinition: { * of properties. */ outputs?: {[P in keyof T]?: string}; -}): ΔBaseDef { +}): ɵɵBaseDef { const declaredInputs: {[P in keyof T]: string} = {} as any; return { inputs: invertObject(baseDefinition.inputs as any, declaredInputs), @@ -564,7 +564,7 @@ export function ΔdefineBase(baseDefinition: { * class MyDirective { * // Generated by Angular Template Compiler * // [Symbol] syntax will not be supported by TypeScript until v2.7 - * static ngDirectiveDef = ΔdefineDirective({ + * static ngDirectiveDef = ɵɵdefineDirective({ * ... * }); * } @@ -572,7 +572,7 @@ export function ΔdefineBase(baseDefinition: { * * @codeGenApi */ -export const ΔdefineDirective = ΔdefineComponent as any as(directiveDefinition: { +export const ɵɵdefineDirective = ɵɵdefineComponent as any as(directiveDefinition: { /** * Directive type, needed to configure the injector. */ @@ -690,7 +690,7 @@ export const ΔdefineDirective = ΔdefineComponent as any as(directiveDefinit * * @codeGenApi */ -export function ΔdefinePipe(pipeDef: { +export function ɵɵdefinePipe(pipeDef: { /** Name of the pipe. Used for matching pipes in template to pipe defs. */ name: string, diff --git a/packages/core/src/render3/di.ts b/packages/core/src/render3/di.ts index 903fb65ee5..e8779e98b5 100644 --- a/packages/core/src/render3/di.ts +++ b/packages/core/src/render3/di.ts @@ -637,7 +637,7 @@ export class NodeInjector implements Injector { /** * @codeGenApi */ -export function ΔgetFactoryOf(type: Type): ((type: Type| null) => T)|null { +export function ɵɵgetFactoryOf(type: Type): ((type: Type| null) => T)|null { const typeAny = type as any; const def = getComponentDef(typeAny) || getDirectiveDef(typeAny) || getPipeDef(typeAny) || getInjectableDef(typeAny) || getInjectorDef(typeAny); @@ -650,9 +650,9 @@ export function ΔgetFactoryOf(type: Type): ((type: Type| null) => T) /** * @codeGenApi */ -export function ΔgetInheritedFactory(type: Type): (type: Type) => T { +export function ɵɵgetInheritedFactory(type: Type): (type: Type) => T { const proto = Object.getPrototypeOf(type.prototype).constructor as Type; - const factory = ΔgetFactoryOf(proto); + const factory = ɵɵgetFactoryOf(proto); if (factory !== null) { return factory; } else { diff --git a/packages/core/src/render3/di_setup.ts b/packages/core/src/render3/di_setup.ts index 9d177153d4..3dfb9bbb70 100644 --- a/packages/core/src/render3/di_setup.ts +++ b/packages/core/src/render3/di_setup.ts @@ -12,7 +12,7 @@ import {ClassProvider, Provider} from '../di/interface/provider'; import {isClassProvider, isTypeProvider, providerToFactory} from '../di/r3_injector'; import {diPublicInInjector, getNodeInjectable, getOrCreateNodeInjectorForNode} from './di'; -import {ΔdirectiveInject} from './instructions/all'; +import {ɵɵdirectiveInject} from './instructions/all'; import {DirectiveDef} from './interfaces/definition'; import {NodeInjectorFactory} from './interfaces/injector'; import {TContainerNode, TElementContainerNode, TElementNode, TNodeProviderIndexes} from './interfaces/node'; @@ -93,7 +93,7 @@ function resolveProvider( if (isTypeProvider(provider) || !provider.multi) { // Single provider case: the factory is created and pushed immediately - const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ΔdirectiveInject); + const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject); const existingFactoryIndex = indexOf( token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount, endIndex); @@ -255,7 +255,7 @@ function multiFactory( this: NodeInjectorFactory, _: null, tData: TData, lData: LView, tNode: TElementNode) => any, index: number, isViewProvider: boolean, isComponent: boolean, f: () => any): NodeInjectorFactory { - const factory = new NodeInjectorFactory(factoryFn, isViewProvider, ΔdirectiveInject); + const factory = new NodeInjectorFactory(factoryFn, isViewProvider, ɵɵdirectiveInject); factory.multi = []; factory.index = index; factory.componentProviders = 0; diff --git a/packages/core/src/render3/features/inherit_definition_feature.ts b/packages/core/src/render3/features/inherit_definition_feature.ts index 23cb66ec7a..db6686dda1 100644 --- a/packages/core/src/render3/features/inherit_definition_feature.ts +++ b/packages/core/src/render3/features/inherit_definition_feature.ts @@ -13,7 +13,7 @@ import {ComponentDef, DirectiveDef, DirectiveDefFeature, RenderFlags} from '../i import {adjustActiveDirectiveSuperClassDepthPosition} from '../state'; import {isComponentDef} from '../util/view_utils'; -import {ΔNgOnChangesFeature} from './ng_onchanges_feature'; +import {ɵɵNgOnChangesFeature} from './ng_onchanges_feature'; function getSuperType(type: Type): Type& {ngComponentDef?: ComponentDef, ngDirectiveDef?: DirectiveDef} { @@ -26,7 +26,7 @@ function getSuperType(type: Type): Type& * * @codeGenApi */ -export function ΔInheritDefinitionFeature(definition: DirectiveDef| ComponentDef): void { +export function ɵɵInheritDefinitionFeature(definition: DirectiveDef| ComponentDef): void { let superType = getSuperType(definition.type); while (superType) { @@ -161,7 +161,7 @@ export function ΔInheritDefinitionFeature(definition: DirectiveDef| Compon definition.onInit = definition.onInit || superPrototype.ngOnInit; if (superPrototype.ngOnChanges) { - ΔNgOnChangesFeature()(definition); + ɵɵNgOnChangesFeature()(definition); } } } diff --git a/packages/core/src/render3/features/ng_onchanges_feature.ts b/packages/core/src/render3/features/ng_onchanges_feature.ts index a237afe9ea..1b37fc752c 100644 --- a/packages/core/src/render3/features/ng_onchanges_feature.ts +++ b/packages/core/src/render3/features/ng_onchanges_feature.ts @@ -41,7 +41,7 @@ type OnChangesExpando = OnChanges & { * * @codeGenApi */ -export function ΔNgOnChangesFeature(): DirectiveDefFeature { +export function ɵɵNgOnChangesFeature(): DirectiveDefFeature { // This option ensures that the ngOnChanges lifecycle hook will be inherited // from superclasses (in InheritDefinitionFeature). (NgOnChangesFeatureImpl as DirectiveDefFeature).ngInherit = true; diff --git a/packages/core/src/render3/features/providers_feature.ts b/packages/core/src/render3/features/providers_feature.ts index df6223dcf2..9c67cf0e87 100644 --- a/packages/core/src/render3/features/providers_feature.ts +++ b/packages/core/src/render3/features/providers_feature.ts @@ -39,7 +39,7 @@ import {DirectiveDef} from '../interfaces/definition'; * * @codeGenApi */ -export function ΔProvidersFeature(providers: Provider[], viewProviders: Provider[] = []) { +export function ɵɵProvidersFeature(providers: Provider[], viewProviders: Provider[] = []) { return (definition: DirectiveDef) => { definition.providersResolver = (def: DirectiveDef, processProvidersFn?: ProcessProvidersFunction) => { diff --git a/packages/core/src/render3/i18n.ts b/packages/core/src/render3/i18n.ts index 7951220236..26e7eae042 100644 --- a/packages/core/src/render3/i18n.ts +++ b/packages/core/src/render3/i18n.ts @@ -16,7 +16,7 @@ import {assertDefined, assertEqual, assertGreaterThan} from '../util/assert'; import {attachPatchData} from './context_discovery'; import {attachI18nOpCodesDebug} from './debug'; -import {ΔelementAttribute, Δload, ΔtextBinding} from './instructions/all'; +import {ɵɵelementAttribute, ɵɵload, ɵɵtextBinding} from './instructions/all'; import {allocExpando, createNodeAtIndex} from './instructions/shared'; import {LContainer, NATIVE} from './interfaces/container'; import {COMMENT_MARKER, ELEMENT_MARKER, I18nMutateOpCode, I18nMutateOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, IcuType, TI18n, TIcu} from './interfaces/i18n'; @@ -351,7 +351,7 @@ const parentIndexStack: number[] = []; * * @codeGenApi */ -export function Δi18nStart(index: number, message: string, subTemplateIndex?: number): void { +export function ɵɵi18nStart(index: number, message: string, subTemplateIndex?: number): void { const tView = getLView()[TVIEW]; ngDevMode && assertDefined(tView, `tView should be defined`); i18nIndexStack[++i18nIndexStackPointer] = index; @@ -538,7 +538,7 @@ function appendI18nNode(tNode: TNode, parentTNode: TNode, previousTNode: TNode | * * @codeGenApi */ -export function Δi18nPostprocess( +export function ɵɵi18nPostprocess( message: string, replacements: {[key: string]: (string | string[])} = {}): string { /** * Step 1: resolve all multi-value placeholders like [�#5�|�*1:1��#2:1�|�#4:1�] @@ -634,7 +634,7 @@ export function Δi18nPostprocess( * * @codeGenApi */ -export function Δi18nEnd(): void { +export function ɵɵi18nEnd(): void { const tView = getLView()[TVIEW]; ngDevMode && assertDefined(tView, `tView should be defined`); i18nEndFirstPass(tView); @@ -742,7 +742,7 @@ function readCreateOpCodes( const elementNodeIndex = opCode >>> I18nMutateOpCode.SHIFT_REF; const attrName = createOpCodes[++i] as string; const attrValue = createOpCodes[++i] as string; - ΔelementAttribute(elementNodeIndex, attrName, attrValue); + ɵɵelementAttribute(elementNodeIndex, attrName, attrValue); break; default: throw new Error(`Unable to determine the type of mutate operation for "${opCode}"`); @@ -819,10 +819,10 @@ function readUpdateOpCodes( case I18nUpdateOpCode.Attr: const attrName = updateOpCodes[++j] as string; const sanitizeFn = updateOpCodes[++j] as SanitizerFn | null; - ΔelementAttribute(nodeIndex, attrName, value, sanitizeFn); + ɵɵelementAttribute(nodeIndex, attrName, value, sanitizeFn); break; case I18nUpdateOpCode.Text: - ΔtextBinding(nodeIndex, value); + ɵɵtextBinding(nodeIndex, value); break; case I18nUpdateOpCode.IcuSwitch: tIcuIndex = updateOpCodes[++j] as number; @@ -886,7 +886,7 @@ function removeNode(index: number, viewData: LView) { nativeRemoveNode(viewData[RENDERER], removedPhRNode); } - const slotValue = Δload(index) as RElement | RComment | LContainer | StylingContext; + const slotValue = ɵɵload(index) as RElement | RComment | LContainer | StylingContext; if (isLContainer(slotValue)) { const lContainer = slotValue as LContainer; if (removedPhTNode.type !== TNodeType.Container) { @@ -923,9 +923,9 @@ function removeNode(index: number, viewData: LView) { * * @codeGenApi */ -export function Δi18n(index: number, message: string, subTemplateIndex?: number): void { - Δi18nStart(index, message, subTemplateIndex); - Δi18nEnd(); +export function ɵɵi18n(index: number, message: string, subTemplateIndex?: number): void { + ɵɵi18nStart(index, message, subTemplateIndex); + ɵɵi18nEnd(); } /** @@ -936,7 +936,7 @@ export function Δi18n(index: number, message: string, subTemplateIndex?: number * * @codeGenApi */ -export function Δi18nAttributes(index: number, values: string[]): void { +export function ɵɵi18nAttributes(index: number, values: string[]): void { const tView = getLView()[TVIEW]; ngDevMode && assertDefined(tView, `tView should be defined`); if (tView.firstTemplatePass && tView.data[index + HEADER_OFFSET] === null) { @@ -968,7 +968,7 @@ function i18nAttributesFirstPass(tView: TView, index: number, values: string[]) addAllToArray( generateBindingUpdateOpCodes(value, previousElementIndex, attrName), updateOpCodes); } else { - ΔelementAttribute(previousElementIndex, attrName, value); + ɵɵelementAttribute(previousElementIndex, attrName, value); } } } @@ -988,7 +988,7 @@ let shiftsCounter = 0; * * @codeGenApi */ -export function Δi18nExp(expression: T | NO_CHANGE): void { +export function ɵɵi18nExp(expression: T | NO_CHANGE): void { if (expression !== NO_CHANGE) { changeMask = changeMask | (1 << shiftsCounter); } @@ -1003,7 +1003,7 @@ export function Δi18nExp(expression: T | NO_CHANGE): void { * * @codeGenApi */ -export function Δi18nApply(index: number) { +export function ɵɵi18nApply(index: number) { if (shiftsCounter) { const lView = getLView(); const tView = lView[TVIEW]; @@ -1633,7 +1633,7 @@ const LOCALIZE_PH_REGEXP = /\{\$(.*?)\}/g; * @publicApi * @deprecated this method is temporary & should not be used as it will be removed soon */ -export function Δi18nLocalize(input: string, placeholders: {[key: string]: string} = {}) { +export function ɵɵi18nLocalize(input: string, placeholders: {[key: string]: string} = {}) { if (typeof TRANSLATIONS[input] !== 'undefined') { // to account for empty string input = TRANSLATIONS[input]; } diff --git a/packages/core/src/render3/index.ts b/packages/core/src/render3/index.ts index c658822b77..408f786824 100644 --- a/packages/core/src/render3/index.ts +++ b/packages/core/src/render3/index.ts @@ -6,109 +6,109 @@ * found in the LICENSE file at https://angular.io/license */ import {LifecycleHooksFeature, renderComponent, whenRendered} from './component'; -import {ΔdefineBase, ΔdefineComponent, ΔdefineDirective, ΔdefineNgModule, ΔdefinePipe, ΔsetComponentScope, ΔsetNgModuleScope} from './definition'; -import {ΔInheritDefinitionFeature} from './features/inherit_definition_feature'; -import {ΔNgOnChangesFeature} from './features/ng_onchanges_feature'; -import {ΔProvidersFeature} from './features/providers_feature'; -import {ComponentDef, ComponentTemplate, ComponentType, DirectiveDef, DirectiveDefFlags, DirectiveType, PipeDef, ΔBaseDef, ΔComponentDefWithMeta, ΔDirectiveDefWithMeta, ΔPipeDefWithMeta} from './interfaces/definition'; +import {ɵɵdefineBase, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵsetComponentScope, ɵɵsetNgModuleScope} from './definition'; +import {ɵɵInheritDefinitionFeature} from './features/inherit_definition_feature'; +import {ɵɵNgOnChangesFeature} from './features/ng_onchanges_feature'; +import {ɵɵProvidersFeature} from './features/providers_feature'; +import {ComponentDef, ComponentTemplate, ComponentType, DirectiveDef, DirectiveDefFlags, DirectiveType, PipeDef, ɵɵBaseDef, ɵɵComponentDefWithMeta, ɵɵDirectiveDefWithMeta, ɵɵPipeDefWithMeta} from './interfaces/definition'; import {getComponent, getDirectives, getHostElement, getRenderedText} from './util/discovery_utils'; export {ComponentFactory, ComponentFactoryResolver, ComponentRef, injectComponentFactoryResolver} from './component_ref'; -export {ΔgetFactoryOf, ΔgetInheritedFactory} from './di'; +export {ɵɵgetFactoryOf, ɵɵgetInheritedFactory} from './di'; // clang-format off export { detectChanges, markDirty, store, tick, - ΔallocHostVars, - Δbind, - ΔcomponentHostSyntheticListener, - ΔcomponentHostSyntheticProperty, + ɵɵallocHostVars, + ɵɵbind, + ɵɵcomponentHostSyntheticListener, + ɵɵcomponentHostSyntheticProperty, - Δcontainer, - ΔcontainerRefreshEnd, - ΔcontainerRefreshStart, + ɵɵcontainer, + ɵɵcontainerRefreshEnd, + ɵɵcontainerRefreshStart, - ΔdirectiveInject, + ɵɵdirectiveInject, - Δelement, - ΔelementAttribute, - ΔelementClassProp, - ΔelementContainerEnd, + ɵɵelement, + ɵɵelementAttribute, + ɵɵelementClassProp, + ɵɵelementContainerEnd, - ΔelementContainerStart, - ΔelementEnd, + ɵɵelementContainerStart, + ɵɵelementEnd, - ΔelementHostAttrs, - ΔelementHostClassProp, - ΔelementHostStyleProp, - ΔelementHostStyling, - ΔelementHostStylingApply, - ΔelementHostStylingMap, - ΔelementProperty, - ΔelementStart, - ΔelementStyleProp, - ΔelementStyling, - ΔelementStylingApply, - ΔelementStylingMap, - ΔembeddedViewEnd, + ɵɵelementHostAttrs, + ɵɵelementHostClassProp, + ɵɵelementHostStyleProp, + ɵɵelementHostStyling, + ɵɵelementHostStylingApply, + ɵɵelementHostStylingMap, + ɵɵelementProperty, + ɵɵelementStart, + ɵɵelementStyleProp, + ɵɵelementStyling, + ɵɵelementStylingApply, + ɵɵelementStylingMap, + ɵɵembeddedViewEnd, - ΔembeddedViewStart, + ɵɵembeddedViewStart, - ΔgetCurrentView, - ΔinjectAttribute, + ɵɵgetCurrentView, + ɵɵinjectAttribute, - Δinterpolation1, - Δinterpolation2, - Δinterpolation3, - Δinterpolation4, - Δinterpolation5, - Δinterpolation6, - Δinterpolation7, - Δinterpolation8, - ΔinterpolationV, + ɵɵinterpolation1, + ɵɵinterpolation2, + ɵɵinterpolation3, + ɵɵinterpolation4, + ɵɵinterpolation5, + ɵɵinterpolation6, + ɵɵinterpolation7, + ɵɵinterpolation8, + ɵɵinterpolationV, - Δlistener, - Δload, + ɵɵlistener, + ɵɵload, - ΔnamespaceHTML, - ΔnamespaceMathML, - ΔnamespaceSVG, + ɵɵnamespaceHTML, + ɵɵnamespaceMathML, + ɵɵnamespaceSVG, - ΔnextContext, + ɵɵnextContext, - Δprojection, - ΔprojectionDef, - Δproperty, + ɵɵprojection, + ɵɵprojectionDef, + ɵɵproperty, - Δreference, + ɵɵreference, - Δselect, - Δtemplate, + ɵɵselect, + ɵɵtemplate, - Δtext, - ΔtextBinding} from './instructions/all'; + ɵɵtext, + ɵɵtextBinding} from './instructions/all'; export {RenderFlags} from './interfaces/definition'; export {CssSelectorList} from './interfaces/projection'; export { - ΔrestoreView, + ɵɵrestoreView, - ΔenableBindings, - ΔdisableBindings, + ɵɵenableBindings, + ɵɵdisableBindings, } from './state'; export { - Δi18n, - Δi18nAttributes, - Δi18nExp, - Δi18nStart, - Δi18nEnd, - Δi18nApply, - Δi18nPostprocess, + ɵɵi18n, + ɵɵi18nAttributes, + ɵɵi18nExp, + ɵɵi18nStart, + ɵɵi18nEnd, + ɵɵi18nApply, + ɵɵi18nPostprocess, i18nConfigureLocalize, - Δi18nLocalize, + ɵɵi18nLocalize, } from './i18n'; export {NgModuleFactory, NgModuleRef, NgModuleType} from './ng_module_ref'; @@ -122,71 +122,71 @@ export { } from './metadata'; export { - Δpipe, - ΔpipeBind1, - ΔpipeBind2, - ΔpipeBind3, - ΔpipeBind4, - ΔpipeBindV, + ɵɵpipe, + ɵɵpipeBind1, + ɵɵpipeBind2, + ɵɵpipeBind3, + ɵɵpipeBind4, + ɵɵpipeBindV, } from './pipe'; export { - ΔqueryRefresh, - ΔviewQuery, - ΔstaticViewQuery, - ΔloadViewQuery, - ΔcontentQuery, - ΔloadContentQuery, - ΔstaticContentQuery + ɵɵqueryRefresh, + ɵɵviewQuery, + ɵɵstaticViewQuery, + ɵɵloadViewQuery, + ɵɵcontentQuery, + ɵɵloadContentQuery, + ɵɵstaticContentQuery } from './query'; export { - ΔpureFunction0, - ΔpureFunction1, - ΔpureFunction2, - ΔpureFunction3, - ΔpureFunction4, - ΔpureFunction5, - ΔpureFunction6, - ΔpureFunction7, - ΔpureFunction8, - ΔpureFunctionV, + ɵɵpureFunction0, + ɵɵpureFunction1, + ɵɵpureFunction2, + ɵɵpureFunction3, + ɵɵpureFunction4, + ɵɵpureFunction5, + ɵɵpureFunction6, + ɵɵpureFunction7, + ɵɵpureFunction8, + ɵɵpureFunctionV, } from './pure_function'; -export {ΔtemplateRefExtractor} from './view_engine_compatibility_prebound'; +export {ɵɵtemplateRefExtractor} from './view_engine_compatibility_prebound'; -export {ΔresolveWindow, ΔresolveDocument, ΔresolveBody} from './util/misc_utils'; +export {ɵɵresolveWindow, ɵɵresolveDocument, ɵɵresolveBody} from './util/misc_utils'; // clang-format on export { - ΔBaseDef, + ɵɵBaseDef, ComponentDef, - ΔComponentDefWithMeta, + ɵɵComponentDefWithMeta, ComponentTemplate, ComponentType, DirectiveDef, DirectiveDefFlags, - ΔDirectiveDefWithMeta, + ɵɵDirectiveDefWithMeta, DirectiveType, - ΔNgOnChangesFeature, - ΔInheritDefinitionFeature, - ΔProvidersFeature, + ɵɵNgOnChangesFeature, + ɵɵInheritDefinitionFeature, + ɵɵProvidersFeature, PipeDef, - ΔPipeDefWithMeta, + ɵɵPipeDefWithMeta, LifecycleHooksFeature, - ΔdefineComponent, - ΔdefineDirective, - ΔdefineNgModule, - ΔdefineBase, - ΔdefinePipe, + ɵɵdefineComponent, + ɵɵdefineDirective, + ɵɵdefineNgModule, + ɵɵdefineBase, + ɵɵdefinePipe, getHostElement, getComponent, getDirectives, getRenderedText, renderComponent, - ΔsetComponentScope, - ΔsetNgModuleScope, + ɵɵsetComponentScope, + ɵɵsetNgModuleScope, whenRendered, }; diff --git a/packages/core/src/render3/instructions/alloc_host_vars.ts b/packages/core/src/render3/instructions/alloc_host_vars.ts index 2e12f1a9e9..7301c9726f 100644 --- a/packages/core/src/render3/instructions/alloc_host_vars.ts +++ b/packages/core/src/render3/instructions/alloc_host_vars.ts @@ -19,7 +19,7 @@ import {NO_CHANGE} from '../tokens'; * * @codeGenApi */ -export function ΔallocHostVars(count: number): void { +export function ɵɵallocHostVars(count: number): void { const lView = getLView(); const tView = lView[TVIEW]; if (!tView.firstTemplatePass) return; diff --git a/packages/core/src/render3/instructions/container.ts b/packages/core/src/render3/instructions/container.ts index 6cac4418c7..a9cc7f6d80 100644 --- a/packages/core/src/render3/instructions/container.ts +++ b/packages/core/src/render3/instructions/container.ts @@ -30,7 +30,7 @@ import {addToViewTree, createDirectivesAndLocals, createLContainer, createNodeAt * * @codeGenApi */ -export function Δcontainer(index: number): void { +export function ɵɵcontainer(index: number): void { const tNode = containerInternal(index, null, null); const lView = getLView(); if (lView[TVIEW].firstTemplatePass) { @@ -59,7 +59,7 @@ export function Δcontainer(index: number): void { * * @codeGenApi */ -export function Δtemplate( +export function ɵɵtemplate( index: number, templateFn: ComponentTemplate| null, consts: number, vars: number, tagName?: string | null, attrs?: TAttributes | null, localRefs?: string[] | null, localRefExtractor?: LocalRefExtractor) { @@ -87,7 +87,7 @@ export function Δtemplate( * * @codeGenApi */ -export function ΔcontainerRefreshStart(index: number): void { +export function ɵɵcontainerRefreshStart(index: number): void { const lView = getLView(); const tView = lView[TVIEW]; let previousOrParentTNode = loadInternal(tView.data, index) as TNode; @@ -110,7 +110,7 @@ export function ΔcontainerRefreshStart(index: number): void { * * @codeGenApi */ -export function ΔcontainerRefreshEnd(): void { +export function ɵɵcontainerRefreshEnd(): void { let previousOrParentTNode = getPreviousOrParentTNode(); if (getIsParent()) { setIsParent(false); diff --git a/packages/core/src/render3/instructions/di.ts b/packages/core/src/render3/instructions/di.ts index 7685d1e0d7..49f60e7a1f 100644 --- a/packages/core/src/render3/instructions/di.ts +++ b/packages/core/src/render3/instructions/di.ts @@ -23,9 +23,9 @@ import {getLView, getPreviousOrParentTNode} from '../state'; * class SomeDirective { * constructor(directive: DirectiveA) {} * - * static ngDirectiveDef = ΔdefineDirective({ + * static ngDirectiveDef = ɵɵdefineDirective({ * type: SomeDirective, - * factory: () => new SomeDirective(ΔdirectiveInject(DirectiveA)) + * factory: () => new SomeDirective(ɵɵdirectiveInject(DirectiveA)) * }); * } * ``` @@ -35,9 +35,9 @@ import {getLView, getPreviousOrParentTNode} from '../state'; * * @codeGenApi */ -export function ΔdirectiveInject(token: Type| InjectionToken): T; -export function ΔdirectiveInject(token: Type| InjectionToken, flags: InjectFlags): T; -export function ΔdirectiveInject( +export function ɵɵdirectiveInject(token: Type| InjectionToken): T; +export function ɵɵdirectiveInject(token: Type| InjectionToken, flags: InjectFlags): T; +export function ɵɵdirectiveInject( token: Type| InjectionToken, flags = InjectFlags.Default): T|null { token = resolveForwardRef(token); return getOrCreateInjectable( @@ -50,6 +50,6 @@ export function ΔdirectiveInject( * * @codeGenApi */ -export function ΔinjectAttribute(attrNameToInject: string): string|null { +export function ɵɵinjectAttribute(attrNameToInject: string): string|null { return injectAttributeImpl(getPreviousOrParentTNode(), attrNameToInject); } diff --git a/packages/core/src/render3/instructions/element.ts b/packages/core/src/render3/instructions/element.ts index 016d8b98df..a250911ddd 100644 --- a/packages/core/src/render3/instructions/element.ts +++ b/packages/core/src/render3/instructions/element.ts @@ -44,7 +44,7 @@ import {getActiveDirectiveStylingIndex} from './styling'; * * @codeGenApi */ -export function ΔelementStart( +export function ɵɵelementStart( index: number, name: string, attrs?: TAttributes | null, localRefs?: string[] | null): void { const lView = getLView(); const tView = lView[TVIEW]; @@ -129,7 +129,7 @@ export function ΔelementStart( * * @codeGenApi */ -export function ΔelementEnd(): void { +export function ɵɵelementEnd(): void { let previousOrParentTNode = getPreviousOrParentTNode(); if (getIsParent()) { setIsParent(false); @@ -181,10 +181,10 @@ export function ΔelementEnd(): void { * * @codeGenApi */ -export function Δelement( +export function ɵɵelement( index: number, name: string, attrs?: TAttributes | null, localRefs?: string[] | null): void { - ΔelementStart(index, name, attrs, localRefs); - ΔelementEnd(); + ɵɵelementStart(index, name, attrs, localRefs); + ɵɵelementEnd(); } @@ -200,7 +200,7 @@ export function Δelement( * * @codeGenApi */ -export function ΔelementAttribute( +export function ɵɵelementAttribute( index: number, name: string, value: any, sanitizer?: SanitizerFn | null, namespace?: string): void { if (value !== NO_CHANGE) { @@ -268,7 +268,7 @@ export function ΔelementAttribute( * * @codeGenApi */ -export function ΔelementHostAttrs(attrs: TAttributes) { +export function ɵɵelementHostAttrs(attrs: TAttributes) { const hostElementIndex = getSelectedIndex(); const lView = getLView(); const tNode = getTNode(hostElementIndex, lView); diff --git a/packages/core/src/render3/instructions/element_container.ts b/packages/core/src/render3/instructions/element_container.ts index 15002fc6b4..4ad34536f2 100644 --- a/packages/core/src/render3/instructions/element_container.ts +++ b/packages/core/src/render3/instructions/element_container.ts @@ -31,7 +31,7 @@ import {createDirectivesAndLocals, createNodeAtIndex, executeContentQueries, set * * @codeGenApi */ -export function ΔelementContainerStart( +export function ɵɵelementContainerStart( index: number, attrs?: TAttributes | null, localRefs?: string[] | null): void { const lView = getLView(); const tView = lView[TVIEW]; @@ -72,7 +72,7 @@ export function ΔelementContainerStart( * * @codeGenApi */ -export function ΔelementContainerEnd(): void { +export function ɵɵelementContainerEnd(): void { let previousOrParentTNode = getPreviousOrParentTNode(); const lView = getLView(); const tView = lView[TVIEW]; diff --git a/packages/core/src/render3/instructions/embedded_view.ts b/packages/core/src/render3/instructions/embedded_view.ts index 80c11d1efa..135c223d2f 100644 --- a/packages/core/src/render3/instructions/embedded_view.ts +++ b/packages/core/src/render3/instructions/embedded_view.ts @@ -26,7 +26,8 @@ import {assignTViewNodeToLView, createLView, createTView, refreshDescendantViews * * @codeGenApi */ -export function ΔembeddedViewStart(viewBlockId: number, consts: number, vars: number): RenderFlags { +export function ɵɵembeddedViewStart( + viewBlockId: number, consts: number, vars: number): RenderFlags { const lView = getLView(); const previousOrParentTNode = getPreviousOrParentTNode(); // The previous node can be a view node if we are processing an inline for loop @@ -129,7 +130,7 @@ function scanForView(lContainer: LContainer, startIdx: number, viewBlockId: numb * * @codeGenApi */ -export function ΔembeddedViewEnd(): void { +export function ɵɵembeddedViewEnd(): void { const lView = getLView(); const viewHost = lView[T_HOST]; diff --git a/packages/core/src/render3/instructions/get_current_view.ts b/packages/core/src/render3/instructions/get_current_view.ts index f477a1e569..f8c75ffff3 100644 --- a/packages/core/src/render3/instructions/get_current_view.ts +++ b/packages/core/src/render3/instructions/get_current_view.ts @@ -17,6 +17,6 @@ import {getLView} from '../state'; * * @codeGenApi */ -export function ΔgetCurrentView(): OpaqueViewState { +export function ɵɵgetCurrentView(): OpaqueViewState { return getLView() as any as OpaqueViewState; } diff --git a/packages/core/src/render3/instructions/listener.ts b/packages/core/src/render3/instructions/listener.ts index a8c18c1558..af43545555 100644 --- a/packages/core/src/render3/instructions/listener.ts +++ b/packages/core/src/render3/instructions/listener.ts @@ -31,7 +31,7 @@ import {BindingDirection, generatePropertyAliases, getCleanup, handleError, load * * @codeGenApi */ -export function Δlistener( +export function ɵɵlistener( eventName: string, listenerFn: (e?: any) => any, useCapture = false, eventTargetResolver?: GlobalTargetResolver): void { listenerInternal(eventName, listenerFn, useCapture, eventTargetResolver); @@ -58,7 +58,7 @@ export function Δlistener( * * @codeGenApi */ -export function ΔcomponentHostSyntheticListener( +export function ɵɵcomponentHostSyntheticListener( eventName: string, listenerFn: (e?: any) => any, useCapture = false, eventTargetResolver?: GlobalTargetResolver): void { listenerInternal(eventName, listenerFn, useCapture, eventTargetResolver, loadComponentRenderer); diff --git a/packages/core/src/render3/instructions/namespace.ts b/packages/core/src/render3/instructions/namespace.ts index d2ecc7dc84..ae423a615a 100644 --- a/packages/core/src/render3/instructions/namespace.ts +++ b/packages/core/src/render3/instructions/namespace.ts @@ -6,4 +6,4 @@ * found in the LICENSE file at https://angular.io/license */ -export {ΔnamespaceHTML, ΔnamespaceMathML, ΔnamespaceSVG} from '../state'; +export {ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG} from '../state'; diff --git a/packages/core/src/render3/instructions/next_context.ts b/packages/core/src/render3/instructions/next_context.ts index 3994247692..086762c3c7 100644 --- a/packages/core/src/render3/instructions/next_context.ts +++ b/packages/core/src/render3/instructions/next_context.ts @@ -19,6 +19,6 @@ import {nextContextImpl} from '../state'; * * @codeGenApi */ -export function ΔnextContext(level: number = 1): T { +export function ɵɵnextContext(level: number = 1): T { return nextContextImpl(level); } diff --git a/packages/core/src/render3/instructions/projection.ts b/packages/core/src/render3/instructions/projection.ts index 1237a3b346..d47f28b0b0 100644 --- a/packages/core/src/render3/instructions/projection.ts +++ b/packages/core/src/render3/instructions/projection.ts @@ -39,7 +39,7 @@ import {createNodeAtIndex} from './shared'; * * @codeGenApi */ -export function ΔprojectionDef(selectors?: CssSelectorList[]): void { +export function ɵɵprojectionDef(selectors?: CssSelectorList[]): void { const componentNode = findComponentView(getLView())[T_HOST] as TElementNode; if (!componentNode.projection) { @@ -78,7 +78,7 @@ export function ΔprojectionDef(selectors?: CssSelectorList[]): void { * * @codeGenApi */ -export function Δprojection( +export function ɵɵprojection( nodeIndex: number, selectorIndex: number = 0, attrs?: TAttributes): void { const lView = getLView(); const tProjectionNode = diff --git a/packages/core/src/render3/instructions/property.ts b/packages/core/src/render3/instructions/property.ts index 8cd388009d..9557c2f3cd 100644 --- a/packages/core/src/render3/instructions/property.ts +++ b/packages/core/src/render3/instructions/property.ts @@ -34,13 +34,13 @@ import {TsickleIssue1009, elementPropertyInternal, loadComponentRenderer, storeB * * @codeGenApi */ -export function Δproperty( +export function ɵɵproperty( propName: string, value: T, sanitizer?: SanitizerFn | null, nativeOnly?: boolean): TsickleIssue1009 { const index = getSelectedIndex(); - const bindReconciledValue = Δbind(value); + const bindReconciledValue = ɵɵbind(value); elementPropertyInternal(index, propName, bindReconciledValue, sanitizer, nativeOnly); - return Δproperty; + return ɵɵproperty; } /** @@ -50,7 +50,7 @@ export function Δproperty( * * @codeGenApi */ -export function Δbind(value: T): T|NO_CHANGE { +export function ɵɵbind(value: T): T|NO_CHANGE { const lView = getLView(); const bindingIndex = lView[BINDING_INDEX]++; storeBindingMetadata(lView); @@ -75,7 +75,7 @@ export function Δbind(value: T): T|NO_CHANGE { * * @codeGenApi */ -export function ΔelementProperty( +export function ɵɵelementProperty( index: number, propName: string, value: T | NO_CHANGE, sanitizer?: SanitizerFn | null, nativeOnly?: boolean): void { elementPropertyInternal(index, propName, value, sanitizer, nativeOnly); @@ -104,7 +104,7 @@ export function ΔelementProperty( * * @codeGenApi */ -export function ΔcomponentHostSyntheticProperty( +export function ɵɵcomponentHostSyntheticProperty( index: number, propName: string, value: T | NO_CHANGE, sanitizer?: SanitizerFn | null, nativeOnly?: boolean) { elementPropertyInternal(index, propName, value, sanitizer, nativeOnly, loadComponentRenderer); diff --git a/packages/core/src/render3/instructions/property_interpolation.ts b/packages/core/src/render3/instructions/property_interpolation.ts index d0dafd10b0..959245925a 100644 --- a/packages/core/src/render3/instructions/property_interpolation.ts +++ b/packages/core/src/render3/instructions/property_interpolation.ts @@ -29,7 +29,7 @@ import {TsickleIssue1009, elementPropertyInternal, storeBindingMetadata} from '. * * @codeGenApi */ -export function ΔinterpolationV(values: any[]): string|NO_CHANGE { +export function ɵɵinterpolationV(values: any[]): string|NO_CHANGE { ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values'); ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values'); let different = false; @@ -74,7 +74,7 @@ export function ΔinterpolationV(values: any[]): string|NO_CHANGE { * * @codeGenApi */ -export function Δinterpolation1(prefix: string, v0: any, suffix: string): string|NO_CHANGE { +export function ɵɵinterpolation1(prefix: string, v0: any, suffix: string): string|NO_CHANGE { const lView = getLView(); const different = bindingUpdated(lView, lView[BINDING_INDEX]++, v0); storeBindingMetadata(lView, prefix, suffix); @@ -86,7 +86,7 @@ export function Δinterpolation1(prefix: string, v0: any, suffix: string): strin * * @codeGenApi */ -export function Δinterpolation2( +export function ɵɵinterpolation2( prefix: string, v0: any, i0: string, v1: any, suffix: string): string|NO_CHANGE { const lView = getLView(); const bindingIndex = lView[BINDING_INDEX]; @@ -107,7 +107,7 @@ export function Δinterpolation2( * * @codeGenApi */ -export function Δinterpolation3( +export function ɵɵinterpolation3( prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): string| NO_CHANGE { const lView = getLView(); @@ -133,7 +133,7 @@ export function Δinterpolation3( * * @codeGenApi */ -export function Δinterpolation4( +export function ɵɵinterpolation4( prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): string|NO_CHANGE { const lView = getLView(); @@ -161,7 +161,7 @@ export function Δinterpolation4( * * @codeGenApi */ -export function Δinterpolation5( +export function ɵɵinterpolation5( prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string): string|NO_CHANGE { const lView = getLView(); @@ -191,7 +191,7 @@ export function Δinterpolation5( * * @codeGenApi */ -export function Δinterpolation6( +export function ɵɵinterpolation6( prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string): string|NO_CHANGE { const lView = getLView(); @@ -222,7 +222,7 @@ export function Δinterpolation6( * * @codeGenApi */ -export function Δinterpolation7( +export function ɵɵinterpolation7( prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): string| NO_CHANGE { @@ -256,7 +256,7 @@ export function Δinterpolation7( * * @codeGenApi */ -export function Δinterpolation8( +export function ɵɵinterpolation8( prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string): string|NO_CHANGE { @@ -292,7 +292,7 @@ export function Δinterpolation8( /** - * Shared reference to a string, used in `ΔpropertyInterpolate`. + * Shared reference to a string, used in `ɵɵpropertyInterpolate`. */ const EMPTY_STRING = ''; @@ -310,7 +310,7 @@ const EMPTY_STRING = ''; * Its compiled representation is:: * * ```ts - * ΔpropertyInterpolate('title', v0); + * ɵɵpropertyInterpolate('title', v0); * ``` * * If the property name also exists as an input property on one of the element's directives, @@ -323,9 +323,9 @@ const EMPTY_STRING = ''; * @param suffix Static value used for concatenation only. * @returns itself, so that it may be chained. */ -export function ΔpropertyInterpolate(propName: string, v0: any): TsickleIssue1009 { - ΔpropertyInterpolate1(propName, EMPTY_STRING, v0, EMPTY_STRING); - return ΔpropertyInterpolate; +export function ɵɵpropertyInterpolate(propName: string, v0: any): TsickleIssue1009 { + ɵɵpropertyInterpolate1(propName, EMPTY_STRING, v0, EMPTY_STRING); + return ɵɵpropertyInterpolate; } @@ -342,7 +342,7 @@ export function ΔpropertyInterpolate(propName: string, v0: any): TsickleIssue10 * Its compiled representation is:: * * ```ts - * ΔpropertyInterpolate1('title', 'prefix', v0, 'suffix'); + * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix'); * ``` * * If the property name also exists as an input property on one of the element's directives, @@ -355,11 +355,11 @@ export function ΔpropertyInterpolate(propName: string, v0: any): TsickleIssue10 * @param suffix Static value used for concatenation only. * @returns itself, so that it may be chained. */ -export function ΔpropertyInterpolate1( +export function ɵɵpropertyInterpolate1( propName: string, prefix: string, v0: any, suffix: string): TsickleIssue1009 { const index = getSelectedIndex(); - elementPropertyInternal(index, propName, Δinterpolation1(prefix, v0, suffix)); - return ΔpropertyInterpolate1; + elementPropertyInternal(index, propName, ɵɵinterpolation1(prefix, v0, suffix)); + return ɵɵpropertyInterpolate1; } /** @@ -375,7 +375,7 @@ export function ΔpropertyInterpolate1( * Its compiled representation is:: * * ```ts - * ΔpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix'); + * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix'); * ``` * * If the property name also exists as an input property on one of the element's directives, @@ -390,12 +390,12 @@ export function ΔpropertyInterpolate1( * @param suffix Static value used for concatenation only. * @returns itself, so that it may be chained. */ -export function ΔpropertyInterpolate2( +export function ɵɵpropertyInterpolate2( propName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string): TsickleIssue1009 { const index = getSelectedIndex(); - elementPropertyInternal(index, propName, Δinterpolation2(prefix, v0, i0, v1, suffix)); - return ΔpropertyInterpolate2; + elementPropertyInternal(index, propName, ɵɵinterpolation2(prefix, v0, i0, v1, suffix)); + return ɵɵpropertyInterpolate2; } /** @@ -411,7 +411,7 @@ export function ΔpropertyInterpolate2( * Its compiled representation is:: * * ```ts - * ΔpropertyInterpolate3( + * ɵɵpropertyInterpolate3( * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix'); * ``` * @@ -429,12 +429,12 @@ export function ΔpropertyInterpolate2( * @param suffix Static value used for concatenation only. * @returns itself, so that it may be chained. */ -export function ΔpropertyInterpolate3( +export function ɵɵpropertyInterpolate3( propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): TsickleIssue1009 { const index = getSelectedIndex(); - elementPropertyInternal(index, propName, Δinterpolation3(prefix, v0, i0, v1, i1, v2, suffix)); - return ΔpropertyInterpolate3; + elementPropertyInternal(index, propName, ɵɵinterpolation3(prefix, v0, i0, v1, i1, v2, suffix)); + return ɵɵpropertyInterpolate3; } /** @@ -450,7 +450,7 @@ export function ΔpropertyInterpolate3( * Its compiled representation is:: * * ```ts - * ΔpropertyInterpolate4( + * ɵɵpropertyInterpolate4( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix'); * ``` * @@ -470,13 +470,13 @@ export function ΔpropertyInterpolate3( * @param suffix Static value used for concatenation only. * @returns itself, so that it may be chained. */ -export function ΔpropertyInterpolate4( +export function ɵɵpropertyInterpolate4( propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): TsickleIssue1009 { const index = getSelectedIndex(); elementPropertyInternal( - index, propName, Δinterpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix)); - return ΔpropertyInterpolate4; + index, propName, ɵɵinterpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix)); + return ɵɵpropertyInterpolate4; } /** @@ -492,7 +492,7 @@ export function ΔpropertyInterpolate4( * Its compiled representation is:: * * ```ts - * ΔpropertyInterpolate5( + * ɵɵpropertyInterpolate5( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix'); * ``` * @@ -514,13 +514,13 @@ export function ΔpropertyInterpolate4( * @param suffix Static value used for concatenation only. * @returns itself, so that it may be chained. */ -export function ΔpropertyInterpolate5( +export function ɵɵpropertyInterpolate5( propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string): TsickleIssue1009 { const index = getSelectedIndex(); elementPropertyInternal( - index, propName, Δinterpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix)); - return ΔpropertyInterpolate5; + index, propName, ɵɵinterpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix)); + return ɵɵpropertyInterpolate5; } /** @@ -536,7 +536,7 @@ export function ΔpropertyInterpolate5( * Its compiled representation is:: * * ```ts - * ΔpropertyInterpolate6( + * ɵɵpropertyInterpolate6( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix'); * ``` * @@ -560,13 +560,14 @@ export function ΔpropertyInterpolate5( * @param suffix Static value used for concatenation only. * @returns itself, so that it may be chained. */ -export function ΔpropertyInterpolate6( +export function ɵɵpropertyInterpolate6( propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string): TsickleIssue1009 { const index = getSelectedIndex(); elementPropertyInternal( - index, propName, Δinterpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix)); - return ΔpropertyInterpolate6; + index, propName, + ɵɵinterpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix)); + return ɵɵpropertyInterpolate6; } /** @@ -582,7 +583,7 @@ export function ΔpropertyInterpolate6( * Its compiled representation is:: * * ```ts - * ΔpropertyInterpolate7( + * ɵɵpropertyInterpolate7( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix'); * ``` * @@ -608,15 +609,15 @@ export function ΔpropertyInterpolate6( * @param suffix Static value used for concatenation only. * @returns itself, so that it may be chained. */ -export function ΔpropertyInterpolate7( +export function ɵɵpropertyInterpolate7( propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): TsickleIssue1009 { const index = getSelectedIndex(); elementPropertyInternal( index, propName, - Δinterpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix)); - return ΔpropertyInterpolate7; + ɵɵinterpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix)); + return ɵɵpropertyInterpolate7; } /** @@ -632,7 +633,7 @@ export function ΔpropertyInterpolate7( * Its compiled representation is:: * * ```ts - * ΔpropertyInterpolate8( + * ɵɵpropertyInterpolate8( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix'); * ``` * @@ -660,15 +661,15 @@ export function ΔpropertyInterpolate7( * @param suffix Static value used for concatenation only. * @returns itself, so that it may be chained. */ -export function ΔpropertyInterpolate8( +export function ɵɵpropertyInterpolate8( propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string): TsickleIssue1009 { const index = getSelectedIndex(); elementPropertyInternal( index, propName, - Δinterpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix)); - return ΔpropertyInterpolate8; + ɵɵinterpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix)); + return ɵɵpropertyInterpolate8; } /** @@ -684,7 +685,7 @@ export function ΔpropertyInterpolate8( * Its compiled representation is:: * * ```ts - * ΔpropertyInterpolateV( + * ɵɵpropertyInterpolateV( * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9, * 'suffix']); * ``` @@ -699,9 +700,9 @@ export function ΔpropertyInterpolate8( * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`) * @returns itself, so that it may be chained. */ -export function ΔpropertyInterpolateV(propName: string, values: any[]): TsickleIssue1009 { +export function ɵɵpropertyInterpolateV(propName: string, values: any[]): TsickleIssue1009 { const index = getSelectedIndex(); - elementPropertyInternal(index, propName, ΔinterpolationV(values)); - return ΔpropertyInterpolateV; + elementPropertyInternal(index, propName, ɵɵinterpolationV(values)); + return ɵɵpropertyInterpolateV; } diff --git a/packages/core/src/render3/instructions/select.ts b/packages/core/src/render3/instructions/select.ts index 1927723f41..7df13cd745 100644 --- a/packages/core/src/render3/instructions/select.ts +++ b/packages/core/src/render3/instructions/select.ts @@ -31,7 +31,7 @@ import {getCheckNoChangesMode, getLView, setSelectedIndex} from '../state'; * * @codeGenApi */ -export function Δselect(index: number): void { +export function ɵɵselect(index: number): void { ngDevMode && assertGreaterThan(index, -1, 'Invalid index'); ngDevMode && assertLessThan( diff --git a/packages/core/src/render3/instructions/shared.ts b/packages/core/src/render3/instructions/shared.ts index ad81489b94..4f08f9e80d 100644 --- a/packages/core/src/render3/instructions/shared.ts +++ b/packages/core/src/render3/instructions/shared.ts @@ -30,7 +30,7 @@ import {StylingContext} from '../interfaces/styling'; import {BINDING_INDEX, CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTEXT, DECLARATION_VIEW, ExpandoInstructions, FLAGS, HEADER_OFFSET, HOST, INJECTOR, InitPhaseState, LView, LViewFlags, NEXT, PARENT, QUERIES, RENDERER, RENDERER_FACTORY, RootContext, RootContextFlags, SANITIZER, TData, TVIEW, TView, T_HOST} from '../interfaces/view'; import {assertNodeOfPossibleTypes, assertNodeType} from '../node_assert'; import {isNodeMatchingSelectorList} from '../node_selector_matcher'; -import {enterView, getBindingsEnabled, getCheckNoChangesMode, getIsParent, getLView, getNamespace, getPreviousOrParentTNode, incrementActiveDirectiveId, isCreationMode, leaveView, resetComponentState, setActiveHostElement, setBindingRoot, setCheckNoChangesMode, setCurrentDirectiveDef, setCurrentQueryIndex, setIsParent, setPreviousOrParentTNode, setSelectedIndex, ΔnamespaceHTML} from '../state'; +import {enterView, getBindingsEnabled, getCheckNoChangesMode, getIsParent, getLView, getNamespace, getPreviousOrParentTNode, incrementActiveDirectiveId, isCreationMode, leaveView, resetComponentState, setActiveHostElement, setBindingRoot, setCheckNoChangesMode, setCurrentDirectiveDef, setCurrentQueryIndex, setIsParent, setPreviousOrParentTNode, setSelectedIndex, ɵɵnamespaceHTML} from '../state'; import {initializeStaticContext as initializeStaticStylingContext} from '../styling/class_and_style_bindings'; import {ANIMATION_PROP_PREFIX, isAnimationProp} from '../styling/util'; import {NO_CHANGE} from '../tokens'; @@ -431,7 +431,7 @@ export function renderEmbeddedTemplate(viewToRender: LView, tView: TView, con oldView = enterView(viewToRender, viewToRender[T_HOST]); resetPreOrderHookFlags(viewToRender); - ΔnamespaceHTML(); + ɵɵnamespaceHTML(); // Reset the selected index so we can assert that `select` was called later setSelectedIndex(-1); @@ -466,7 +466,7 @@ function renderComponentOrTemplate( if (creationModeIsActive) { // creation mode pass if (templateFn) { - ΔnamespaceHTML(); + ɵɵnamespaceHTML(); // Reset the selected index so we can assert that `select` was called later setSelectedIndex(-1); @@ -1672,7 +1672,7 @@ export function checkView(hostView: LView, component: T) { try { resetPreOrderHookFlags(hostView); - ΔnamespaceHTML(); + ɵɵnamespaceHTML(); creationMode && executeViewQueryFn(RenderFlags.Create, hostTView, component); // Reset the selected index so we can assert that `select` was called later diff --git a/packages/core/src/render3/instructions/storage.ts b/packages/core/src/render3/instructions/storage.ts index 53c1944191..c95db3a1e9 100644 --- a/packages/core/src/render3/instructions/storage.ts +++ b/packages/core/src/render3/instructions/storage.ts @@ -33,7 +33,7 @@ export function store(index: number, value: T): void { * * @codeGenApi */ -export function Δreference(index: number) { +export function ɵɵreference(index: number) { const contextLView = getContextLView(); return loadInternal(contextLView, index); } @@ -43,6 +43,6 @@ export function Δreference(index: number) { * * @codeGenApi */ -export function Δload(index: number): T { +export function ɵɵload(index: number): T { return loadInternal(getLView(), index); } diff --git a/packages/core/src/render3/instructions/styling.ts b/packages/core/src/render3/instructions/styling.ts index cf0e5705c5..cb89610c14 100644 --- a/packages/core/src/render3/instructions/styling.ts +++ b/packages/core/src/render3/instructions/styling.ts @@ -64,7 +64,7 @@ import {scheduleTick, setInputsForProperty} from './shared'; * * @codeGenApi */ -export function ΔelementStyling( +export function ɵɵelementStyling( classBindingNames?: string[] | null, styleBindingNames?: string[] | null, styleSanitizer?: StyleSanitizeFn | null): void { const tNode = getPreviousOrParentTNode(); @@ -106,7 +106,7 @@ export function ΔelementStyling( * * @codeGenApi */ -export function ΔelementHostStyling( +export function ɵɵelementHostStyling( classBindingNames?: string[] | null, styleBindingNames?: string[] | null, styleSanitizer?: StyleSanitizeFn | null): void { const tNode = getPreviousOrParentTNode(); @@ -166,7 +166,7 @@ function initElementStyling( * * @codeGenApi */ -export function ΔelementStyleProp( +export function ɵɵelementStyleProp( index: number, styleIndex: number, value: string | number | String | PlayerFactory | null, suffix?: string | null, forceOverride?: boolean): void { const valueToAdd = resolveStylePropValue(value, suffix); @@ -200,7 +200,7 @@ export function ΔelementStyleProp( * * @codeGenApi */ -export function ΔelementHostStyleProp( +export function ɵɵelementHostStyleProp( styleIndex: number, value: string | number | String | PlayerFactory | null, suffix?: string | null, forceOverride?: boolean): void { const directiveStylingIndex = getActiveDirectiveStylingIndex(); @@ -253,7 +253,7 @@ function resolveStylePropValue( * * @codeGenApi */ -export function ΔelementClassProp( +export function ɵɵelementClassProp( index: number, classIndex: number, value: boolean | PlayerFactory, forceOverride?: boolean): void { const input = (value instanceof BoundPlayerFactory) ? @@ -283,7 +283,7 @@ export function ΔelementClassProp( * * @codeGenApi */ -export function ΔelementHostClassProp( +export function ɵɵelementHostClassProp( classIndex: number, value: boolean | PlayerFactory, forceOverride?: boolean): void { const directiveStylingIndex = getActiveDirectiveStylingIndex(); const hostElementIndex = getSelectedIndex(); @@ -326,7 +326,7 @@ function booleanOrNull(value: any): boolean|null { * * @codeGenApi */ -export function ΔelementStylingMap( +export function ɵɵelementStylingMap( index: number, classes: {[key: string]: any} | string | NO_CHANGE | null, styles?: {[styleName: string]: any} | NO_CHANGE | null): void { const lView = getLView(); @@ -379,7 +379,7 @@ export function ΔelementStylingMap( * * @codeGenApi */ -export function ΔelementHostStylingMap( +export function ɵɵelementHostStylingMap( classes: {[key: string]: any} | string | NO_CHANGE | null, styles?: {[styleName: string]: any} | NO_CHANGE | null): void { const directiveStylingIndex = getActiveDirectiveStylingIndex(); @@ -405,7 +405,7 @@ export function ΔelementHostStylingMap( * * @codeGenApi */ -export function ΔelementStylingApply(index: number): void { +export function ɵɵelementStylingApply(index: number): void { elementStylingApplyInternal(DEFAULT_TEMPLATE_DIRECTIVE_INDEX, index); } @@ -419,7 +419,7 @@ export function ΔelementStylingApply(index: number): void { * * @codeGenApi */ -export function ΔelementHostStylingApply(): void { +export function ɵɵelementHostStylingApply(): void { elementStylingApplyInternal(getActiveDirectiveStylingIndex(), getSelectedIndex()); } diff --git a/packages/core/src/render3/instructions/text.ts b/packages/core/src/render3/instructions/text.ts index 1792ed6f78..13bff5d10d 100644 --- a/packages/core/src/render3/instructions/text.ts +++ b/packages/core/src/render3/instructions/text.ts @@ -24,7 +24,7 @@ import {createNodeAtIndex} from './shared'; * * @codeGenApi */ -export function Δtext(index: number, value?: any): void { +export function ɵɵtext(index: number, value?: any): void { const lView = getLView(); ngDevMode && assertEqual( lView[BINDING_INDEX], lView[TVIEW].bindingStartIndex, @@ -47,7 +47,7 @@ export function Δtext(index: number, value?: any): void { * * @codeGenApi */ -export function ΔtextBinding(index: number, value: T | NO_CHANGE): void { +export function ɵɵtextBinding(index: number, value: T | NO_CHANGE): void { if (value !== NO_CHANGE) { const lView = getLView(); ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET); diff --git a/packages/core/src/render3/interfaces/definition.ts b/packages/core/src/render3/interfaces/definition.ts index 29a8940f52..a674901be6 100644 --- a/packages/core/src/render3/interfaces/definition.ts +++ b/packages/core/src/render3/interfaces/definition.ts @@ -88,7 +88,7 @@ export interface PipeType extends Type { ngPipeDef: never; } /** * @codeGenApi */ -export type ΔDirectiveDefWithMeta< +export type ɵɵDirectiveDefWithMeta< T, Selector extends string, ExportAs extends string[], InputMap extends{[key: string]: string}, OutputMap extends{[key: string]: string}, QueryFields extends string[]> = DirectiveDef; @@ -103,7 +103,7 @@ export type ΔDirectiveDefWithMeta< * * @codeGenApi */ -export interface ΔBaseDef { +export interface ɵɵBaseDef { /** * A dictionary mapping the inputs' minified property names to their public API names, which * are their aliases if any, or their original unminified property names @@ -139,7 +139,7 @@ export interface ΔBaseDef { * * See: {@link defineDirective} */ -export interface DirectiveDef extends ΔBaseDef { +export interface DirectiveDef extends ɵɵBaseDef { /** Token representing the directive. Used by DI. */ type: Type; @@ -202,7 +202,7 @@ export interface DirectiveDef extends ΔBaseDef { /** * @codeGenApi */ -export type ΔComponentDefWithMeta< +export type ɵɵComponentDefWithMeta< T, Selector extends String, ExportAs extends string[], InputMap extends{[key: string]: string}, OutputMap extends{[key: string]: string}, QueryFields extends string[]> = ComponentDef; @@ -349,7 +349,7 @@ export interface PipeDef { /** * @codeGenApi */ -export type ΔPipeDefWithMeta = PipeDef; +export type ɵɵPipeDefWithMeta = PipeDef; export interface DirectiveDefFeature { (directiveDef: DirectiveDef): void; diff --git a/packages/core/src/render3/jit/environment.ts b/packages/core/src/render3/jit/environment.ts index bb4c88506b..18c02dd2ba 100644 --- a/packages/core/src/render3/jit/environment.ts +++ b/packages/core/src/render3/jit/environment.ts @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import {ΔdefineInjectable, ΔdefineInjector,} from '../../di/interface/defs'; -import {Δinject} from '../../di/injector_compatibility'; +import {ɵɵdefineInjectable, ɵɵdefineInjector,} from '../../di/interface/defs'; +import {ɵɵinject} from '../../di/injector_compatibility'; import * as r3 from '../index'; import * as sanitization from '../../sanitization/sanitization'; @@ -18,117 +18,117 @@ import * as sanitization from '../../sanitization/sanitization'; * This should be kept up to date with the public exports of @angular/core. */ export const angularCoreEnv: {[name: string]: Function} = { - 'ΔdefineBase': r3.ΔdefineBase, - 'ΔdefineComponent': r3.ΔdefineComponent, - 'ΔdefineDirective': r3.ΔdefineDirective, - 'ΔdefineInjectable': ΔdefineInjectable, - 'ΔdefineInjector': ΔdefineInjector, - 'ΔdefineNgModule': r3.ΔdefineNgModule, - 'ΔdefinePipe': r3.ΔdefinePipe, - 'ΔdirectiveInject': r3.ΔdirectiveInject, - 'ΔgetFactoryOf': r3.ΔgetFactoryOf, - 'ΔgetInheritedFactory': r3.ΔgetInheritedFactory, - 'Δinject': Δinject, - 'ΔinjectAttribute': r3.ΔinjectAttribute, - 'ΔtemplateRefExtractor': r3.ΔtemplateRefExtractor, - 'ΔNgOnChangesFeature': r3.ΔNgOnChangesFeature, - 'ΔProvidersFeature': r3.ΔProvidersFeature, - 'ΔInheritDefinitionFeature': r3.ΔInheritDefinitionFeature, - 'ΔelementAttribute': r3.ΔelementAttribute, - 'Δbind': r3.Δbind, - 'Δcontainer': r3.Δcontainer, - 'ΔnextContext': r3.ΔnextContext, - 'ΔcontainerRefreshStart': r3.ΔcontainerRefreshStart, - 'ΔcontainerRefreshEnd': r3.ΔcontainerRefreshEnd, - 'ΔnamespaceHTML': r3.ΔnamespaceHTML, - 'ΔnamespaceMathML': r3.ΔnamespaceMathML, - 'ΔnamespaceSVG': r3.ΔnamespaceSVG, - 'ΔenableBindings': r3.ΔenableBindings, - 'ΔdisableBindings': r3.ΔdisableBindings, - 'ΔallocHostVars': r3.ΔallocHostVars, - 'ΔelementStart': r3.ΔelementStart, - 'ΔelementEnd': r3.ΔelementEnd, - 'Δelement': r3.Δelement, - 'ΔelementContainerStart': r3.ΔelementContainerStart, - 'ΔelementContainerEnd': r3.ΔelementContainerEnd, - 'ΔpureFunction0': r3.ΔpureFunction0, - 'ΔpureFunction1': r3.ΔpureFunction1, - 'ΔpureFunction2': r3.ΔpureFunction2, - 'ΔpureFunction3': r3.ΔpureFunction3, - 'ΔpureFunction4': r3.ΔpureFunction4, - 'ΔpureFunction5': r3.ΔpureFunction5, - 'ΔpureFunction6': r3.ΔpureFunction6, - 'ΔpureFunction7': r3.ΔpureFunction7, - 'ΔpureFunction8': r3.ΔpureFunction8, - 'ΔpureFunctionV': r3.ΔpureFunctionV, - 'ΔgetCurrentView': r3.ΔgetCurrentView, - 'ΔrestoreView': r3.ΔrestoreView, - 'Δinterpolation1': r3.Δinterpolation1, - 'Δinterpolation2': r3.Δinterpolation2, - 'Δinterpolation3': r3.Δinterpolation3, - 'Δinterpolation4': r3.Δinterpolation4, - 'Δinterpolation5': r3.Δinterpolation5, - 'Δinterpolation6': r3.Δinterpolation6, - 'Δinterpolation7': r3.Δinterpolation7, - 'Δinterpolation8': r3.Δinterpolation8, - 'ΔinterpolationV': r3.ΔinterpolationV, - 'Δlistener': r3.Δlistener, - 'Δload': r3.Δload, - 'Δprojection': r3.Δprojection, - 'ΔelementProperty': r3.ΔelementProperty, - 'ΔcomponentHostSyntheticProperty': r3.ΔcomponentHostSyntheticProperty, - 'ΔcomponentHostSyntheticListener': r3.ΔcomponentHostSyntheticListener, - 'ΔpipeBind1': r3.ΔpipeBind1, - 'ΔpipeBind2': r3.ΔpipeBind2, - 'ΔpipeBind3': r3.ΔpipeBind3, - 'ΔpipeBind4': r3.ΔpipeBind4, - 'ΔpipeBindV': r3.ΔpipeBindV, - 'ΔprojectionDef': r3.ΔprojectionDef, - 'Δpipe': r3.Δpipe, - 'ΔqueryRefresh': r3.ΔqueryRefresh, - 'ΔviewQuery': r3.ΔviewQuery, - 'ΔstaticViewQuery': r3.ΔstaticViewQuery, - 'ΔstaticContentQuery': r3.ΔstaticContentQuery, - 'ΔloadViewQuery': r3.ΔloadViewQuery, - 'ΔcontentQuery': r3.ΔcontentQuery, - 'ΔloadContentQuery': r3.ΔloadContentQuery, - 'Δreference': r3.Δreference, - 'ΔelementHostAttrs': r3.ΔelementHostAttrs, - 'ΔelementStyling': r3.ΔelementStyling, - 'ΔelementStylingMap': r3.ΔelementStylingMap, - 'ΔelementStyleProp': r3.ΔelementStyleProp, - 'ΔelementStylingApply': r3.ΔelementStylingApply, - 'ΔelementClassProp': r3.ΔelementClassProp, - 'ΔelementHostStyling': r3.ΔelementHostStyling, - 'ΔelementHostStylingMap': r3.ΔelementHostStylingMap, - 'ΔelementHostStyleProp': r3.ΔelementHostStyleProp, - 'ΔelementHostStylingApply': r3.ΔelementHostStylingApply, - 'ΔelementHostClassProp': r3.ΔelementHostClassProp, - 'Δselect': r3.Δselect, - 'Δtemplate': r3.Δtemplate, - 'Δtext': r3.Δtext, - 'ΔtextBinding': r3.ΔtextBinding, - 'ΔembeddedViewStart': r3.ΔembeddedViewStart, - 'ΔembeddedViewEnd': r3.ΔembeddedViewEnd, - 'Δi18n': r3.Δi18n, - 'Δi18nAttributes': r3.Δi18nAttributes, - 'Δi18nExp': r3.Δi18nExp, - 'Δi18nStart': r3.Δi18nStart, - 'Δi18nEnd': r3.Δi18nEnd, - 'Δi18nApply': r3.Δi18nApply, - 'Δi18nPostprocess': r3.Δi18nPostprocess, - 'Δi18nLocalize': r3.Δi18nLocalize, - 'ΔresolveWindow': r3.ΔresolveWindow, - 'ΔresolveDocument': r3.ΔresolveDocument, - 'ΔresolveBody': r3.ΔresolveBody, - 'ΔsetComponentScope': r3.ΔsetComponentScope, - 'ΔsetNgModuleScope': r3.ΔsetNgModuleScope, + 'ɵɵdefineBase': r3.ɵɵdefineBase, + 'ɵɵdefineComponent': r3.ɵɵdefineComponent, + 'ɵɵdefineDirective': r3.ɵɵdefineDirective, + 'ɵɵdefineInjectable': ɵɵdefineInjectable, + 'ɵɵdefineInjector': ɵɵdefineInjector, + 'ɵɵdefineNgModule': r3.ɵɵdefineNgModule, + 'ɵɵdefinePipe': r3.ɵɵdefinePipe, + 'ɵɵdirectiveInject': r3.ɵɵdirectiveInject, + 'ɵɵgetFactoryOf': r3.ɵɵgetFactoryOf, + 'ɵɵgetInheritedFactory': r3.ɵɵgetInheritedFactory, + 'ɵɵinject': ɵɵinject, + 'ɵɵinjectAttribute': r3.ɵɵinjectAttribute, + 'ɵɵtemplateRefExtractor': r3.ɵɵtemplateRefExtractor, + 'ɵɵNgOnChangesFeature': r3.ɵɵNgOnChangesFeature, + 'ɵɵProvidersFeature': r3.ɵɵProvidersFeature, + 'ɵɵInheritDefinitionFeature': r3.ɵɵInheritDefinitionFeature, + 'ɵɵelementAttribute': r3.ɵɵelementAttribute, + 'ɵɵbind': r3.ɵɵbind, + 'ɵɵcontainer': r3.ɵɵcontainer, + 'ɵɵnextContext': r3.ɵɵnextContext, + 'ɵɵcontainerRefreshStart': r3.ɵɵcontainerRefreshStart, + 'ɵɵcontainerRefreshEnd': r3.ɵɵcontainerRefreshEnd, + 'ɵɵnamespaceHTML': r3.ɵɵnamespaceHTML, + 'ɵɵnamespaceMathML': r3.ɵɵnamespaceMathML, + 'ɵɵnamespaceSVG': r3.ɵɵnamespaceSVG, + 'ɵɵenableBindings': r3.ɵɵenableBindings, + 'ɵɵdisableBindings': r3.ɵɵdisableBindings, + 'ɵɵallocHostVars': r3.ɵɵallocHostVars, + 'ɵɵelementStart': r3.ɵɵelementStart, + 'ɵɵelementEnd': r3.ɵɵelementEnd, + 'ɵɵelement': r3.ɵɵelement, + 'ɵɵelementContainerStart': r3.ɵɵelementContainerStart, + 'ɵɵelementContainerEnd': r3.ɵɵelementContainerEnd, + 'ɵɵpureFunction0': r3.ɵɵpureFunction0, + 'ɵɵpureFunction1': r3.ɵɵpureFunction1, + 'ɵɵpureFunction2': r3.ɵɵpureFunction2, + 'ɵɵpureFunction3': r3.ɵɵpureFunction3, + 'ɵɵpureFunction4': r3.ɵɵpureFunction4, + 'ɵɵpureFunction5': r3.ɵɵpureFunction5, + 'ɵɵpureFunction6': r3.ɵɵpureFunction6, + 'ɵɵpureFunction7': r3.ɵɵpureFunction7, + 'ɵɵpureFunction8': r3.ɵɵpureFunction8, + 'ɵɵpureFunctionV': r3.ɵɵpureFunctionV, + 'ɵɵgetCurrentView': r3.ɵɵgetCurrentView, + 'ɵɵrestoreView': r3.ɵɵrestoreView, + 'ɵɵinterpolation1': r3.ɵɵinterpolation1, + 'ɵɵinterpolation2': r3.ɵɵinterpolation2, + 'ɵɵinterpolation3': r3.ɵɵinterpolation3, + 'ɵɵinterpolation4': r3.ɵɵinterpolation4, + 'ɵɵinterpolation5': r3.ɵɵinterpolation5, + 'ɵɵinterpolation6': r3.ɵɵinterpolation6, + 'ɵɵinterpolation7': r3.ɵɵinterpolation7, + 'ɵɵinterpolation8': r3.ɵɵinterpolation8, + 'ɵɵinterpolationV': r3.ɵɵinterpolationV, + 'ɵɵlistener': r3.ɵɵlistener, + 'ɵɵload': r3.ɵɵload, + 'ɵɵprojection': r3.ɵɵprojection, + 'ɵɵelementProperty': r3.ɵɵelementProperty, + 'ɵɵcomponentHostSyntheticProperty': r3.ɵɵcomponentHostSyntheticProperty, + 'ɵɵcomponentHostSyntheticListener': r3.ɵɵcomponentHostSyntheticListener, + 'ɵɵpipeBind1': r3.ɵɵpipeBind1, + 'ɵɵpipeBind2': r3.ɵɵpipeBind2, + 'ɵɵpipeBind3': r3.ɵɵpipeBind3, + 'ɵɵpipeBind4': r3.ɵɵpipeBind4, + 'ɵɵpipeBindV': r3.ɵɵpipeBindV, + 'ɵɵprojectionDef': r3.ɵɵprojectionDef, + 'ɵɵpipe': r3.ɵɵpipe, + 'ɵɵqueryRefresh': r3.ɵɵqueryRefresh, + 'ɵɵviewQuery': r3.ɵɵviewQuery, + 'ɵɵstaticViewQuery': r3.ɵɵstaticViewQuery, + 'ɵɵstaticContentQuery': r3.ɵɵstaticContentQuery, + 'ɵɵloadViewQuery': r3.ɵɵloadViewQuery, + 'ɵɵcontentQuery': r3.ɵɵcontentQuery, + 'ɵɵloadContentQuery': r3.ɵɵloadContentQuery, + 'ɵɵreference': r3.ɵɵreference, + 'ɵɵelementHostAttrs': r3.ɵɵelementHostAttrs, + 'ɵɵelementStyling': r3.ɵɵelementStyling, + 'ɵɵelementStylingMap': r3.ɵɵelementStylingMap, + 'ɵɵelementStyleProp': r3.ɵɵelementStyleProp, + 'ɵɵelementStylingApply': r3.ɵɵelementStylingApply, + 'ɵɵelementClassProp': r3.ɵɵelementClassProp, + 'ɵɵelementHostStyling': r3.ɵɵelementHostStyling, + 'ɵɵelementHostStylingMap': r3.ɵɵelementHostStylingMap, + 'ɵɵelementHostStyleProp': r3.ɵɵelementHostStyleProp, + 'ɵɵelementHostStylingApply': r3.ɵɵelementHostStylingApply, + 'ɵɵelementHostClassProp': r3.ɵɵelementHostClassProp, + 'ɵɵselect': r3.ɵɵselect, + 'ɵɵtemplate': r3.ɵɵtemplate, + 'ɵɵtext': r3.ɵɵtext, + 'ɵɵtextBinding': r3.ɵɵtextBinding, + 'ɵɵembeddedViewStart': r3.ɵɵembeddedViewStart, + 'ɵɵembeddedViewEnd': r3.ɵɵembeddedViewEnd, + 'ɵɵi18n': r3.ɵɵi18n, + 'ɵɵi18nAttributes': r3.ɵɵi18nAttributes, + 'ɵɵi18nExp': r3.ɵɵi18nExp, + 'ɵɵi18nStart': r3.ɵɵi18nStart, + 'ɵɵi18nEnd': r3.ɵɵi18nEnd, + 'ɵɵi18nApply': r3.ɵɵi18nApply, + 'ɵɵi18nPostprocess': r3.ɵɵi18nPostprocess, + 'ɵɵi18nLocalize': r3.ɵɵi18nLocalize, + 'ɵɵresolveWindow': r3.ɵɵresolveWindow, + 'ɵɵresolveDocument': r3.ɵɵresolveDocument, + 'ɵɵresolveBody': r3.ɵɵresolveBody, + 'ɵɵsetComponentScope': r3.ɵɵsetComponentScope, + 'ɵɵsetNgModuleScope': r3.ɵɵsetNgModuleScope, - 'ΔsanitizeHtml': sanitization.ΔsanitizeHtml, - 'ΔsanitizeStyle': sanitization.ΔsanitizeStyle, - 'ΔdefaultStyleSanitizer': sanitization.ΔdefaultStyleSanitizer, - 'ΔsanitizeResourceUrl': sanitization.ΔsanitizeResourceUrl, - 'ΔsanitizeScript': sanitization.ΔsanitizeScript, - 'ΔsanitizeUrl': sanitization.ΔsanitizeUrl, - 'ΔsanitizeUrlOrResourceUrl': sanitization.ΔsanitizeUrlOrResourceUrl + 'ɵɵsanitizeHtml': sanitization.ɵɵsanitizeHtml, + 'ɵɵsanitizeStyle': sanitization.ɵɵsanitizeStyle, + 'ɵɵdefaultStyleSanitizer': sanitization.ɵɵdefaultStyleSanitizer, + 'ɵɵsanitizeResourceUrl': sanitization.ɵɵsanitizeResourceUrl, + 'ɵɵsanitizeScript': sanitization.ɵɵsanitizeScript, + 'ɵɵsanitizeUrl': sanitization.ɵɵsanitizeUrl, + 'ɵɵsanitizeUrlOrResourceUrl': sanitization.ɵɵsanitizeUrlOrResourceUrl }; diff --git a/packages/core/src/render3/pipe.ts b/packages/core/src/render3/pipe.ts index 10caa79a0e..a1168e366c 100644 --- a/packages/core/src/render3/pipe.ts +++ b/packages/core/src/render3/pipe.ts @@ -9,10 +9,10 @@ import {WrappedValue} from '../change_detection/change_detection_util'; import {PipeTransform} from '../change_detection/pipe_transform'; -import {store, Δload} from './instructions/all'; +import {store, ɵɵload} from './instructions/all'; import {PipeDef, PipeDefList} from './interfaces/definition'; import {BINDING_INDEX, HEADER_OFFSET, TVIEW} from './interfaces/view'; -import {ΔpureFunction1, ΔpureFunction2, ΔpureFunction3, ΔpureFunction4, ΔpureFunctionV} from './pure_function'; +import {ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunctionV} from './pure_function'; import {getLView} from './state'; import {NO_CHANGE} from './tokens'; @@ -27,7 +27,7 @@ import {NO_CHANGE} from './tokens'; * * @codeGenApi */ -export function Δpipe(index: number, pipeName: string): any { +export function ɵɵpipe(index: number, pipeName: string): any { const tView = getLView()[TVIEW]; let pipeDef: PipeDef; const adjustedIndex = index + HEADER_OFFSET; @@ -81,10 +81,10 @@ function getPipeDef(name: string, registry: PipeDefList | null): PipeDef { * * @codeGenApi */ -export function ΔpipeBind1(index: number, slotOffset: number, v1: any): any { - const pipeInstance = Δload(index); +export function ɵɵpipeBind1(index: number, slotOffset: number, v1: any): any { + const pipeInstance = ɵɵload(index); return unwrapValue( - isPure(index) ? ΔpureFunction1(slotOffset, pipeInstance.transform, v1, pipeInstance) : + isPure(index) ? ɵɵpureFunction1(slotOffset, pipeInstance.transform, v1, pipeInstance) : pipeInstance.transform(v1)); } @@ -101,10 +101,10 @@ export function ΔpipeBind1(index: number, slotOffset: number, v1: any): any { * * @codeGenApi */ -export function ΔpipeBind2(index: number, slotOffset: number, v1: any, v2: any): any { - const pipeInstance = Δload(index); +export function ɵɵpipeBind2(index: number, slotOffset: number, v1: any, v2: any): any { + const pipeInstance = ɵɵload(index); return unwrapValue( - isPure(index) ? ΔpureFunction2(slotOffset, pipeInstance.transform, v1, v2, pipeInstance) : + isPure(index) ? ɵɵpureFunction2(slotOffset, pipeInstance.transform, v1, v2, pipeInstance) : pipeInstance.transform(v1, v2)); } @@ -122,11 +122,12 @@ export function ΔpipeBind2(index: number, slotOffset: number, v1: any, v2: any) * * @codeGenApi */ -export function ΔpipeBind3(index: number, slotOffset: number, v1: any, v2: any, v3: any): any { - const pipeInstance = Δload(index); +export function ɵɵpipeBind3(index: number, slotOffset: number, v1: any, v2: any, v3: any): any { + const pipeInstance = ɵɵload(index); return unwrapValue( - isPure(index) ? ΔpureFunction3(slotOffset, pipeInstance.transform, v1, v2, v3, pipeInstance) : - pipeInstance.transform(v1, v2, v3)); + isPure(index) ? + ɵɵpureFunction3(slotOffset, pipeInstance.transform, v1, v2, v3, pipeInstance) : + pipeInstance.transform(v1, v2, v3)); } /** @@ -144,12 +145,12 @@ export function ΔpipeBind3(index: number, slotOffset: number, v1: any, v2: any, * * @codeGenApi */ -export function ΔpipeBind4( +export function ɵɵpipeBind4( index: number, slotOffset: number, v1: any, v2: any, v3: any, v4: any): any { - const pipeInstance = Δload(index); + const pipeInstance = ɵɵload(index); return unwrapValue( isPure(index) ? - ΔpureFunction4(slotOffset, pipeInstance.transform, v1, v2, v3, v4, pipeInstance) : + ɵɵpureFunction4(slotOffset, pipeInstance.transform, v1, v2, v3, v4, pipeInstance) : pipeInstance.transform(v1, v2, v3, v4)); } @@ -165,10 +166,10 @@ export function ΔpipeBind4( * * @codeGenApi */ -export function ΔpipeBindV(index: number, slotOffset: number, values: any[]): any { - const pipeInstance = Δload(index); +export function ɵɵpipeBindV(index: number, slotOffset: number, values: any[]): any { + const pipeInstance = ɵɵload(index); return unwrapValue( - isPure(index) ? ΔpureFunctionV(slotOffset, pipeInstance.transform, values, pipeInstance) : + isPure(index) ? ɵɵpureFunctionV(slotOffset, pipeInstance.transform, values, pipeInstance) : pipeInstance.transform.apply(pipeInstance, values)); } diff --git a/packages/core/src/render3/pure_function.ts b/packages/core/src/render3/pure_function.ts index bd4f1cd255..d3a893ba6d 100644 --- a/packages/core/src/render3/pure_function.ts +++ b/packages/core/src/render3/pure_function.ts @@ -40,7 +40,7 @@ import {getBindingRoot, getLView, isCreationMode} from './state'; * * @codeGenApi */ -export function ΔpureFunction0(slotOffset: number, pureFn: () => T, thisArg?: any): T { +export function ɵɵpureFunction0(slotOffset: number, pureFn: () => T, thisArg?: any): T { // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings const bindingIndex = getBindingRoot() + slotOffset; const lView = getLView(); @@ -61,7 +61,7 @@ export function ΔpureFunction0(slotOffset: number, pureFn: () => T, thisArg? * * @codeGenApi */ -export function ΔpureFunction1( +export function ɵɵpureFunction1( slotOffset: number, pureFn: (v: any) => any, exp: any, thisArg?: any): any { // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings const lView = getLView(); @@ -84,7 +84,7 @@ export function ΔpureFunction1( * * @codeGenApi */ -export function ΔpureFunction2( +export function ɵɵpureFunction2( slotOffset: number, pureFn: (v1: any, v2: any) => any, exp1: any, exp2: any, thisArg?: any): any { // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings @@ -111,7 +111,7 @@ export function ΔpureFunction2( * * @codeGenApi */ -export function ΔpureFunction3( +export function ɵɵpureFunction3( slotOffset: number, pureFn: (v1: any, v2: any, v3: any) => any, exp1: any, exp2: any, exp3: any, thisArg?: any): any { // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings @@ -139,7 +139,7 @@ export function ΔpureFunction3( * * @codeGenApi */ -export function ΔpureFunction4( +export function ɵɵpureFunction4( slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, thisArg?: any): any { // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings @@ -168,7 +168,7 @@ export function ΔpureFunction4( * * @codeGenApi */ -export function ΔpureFunction5( +export function ɵɵpureFunction5( slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, thisArg?: any): any { // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings @@ -199,7 +199,7 @@ export function ΔpureFunction5( * * @codeGenApi */ -export function ΔpureFunction6( +export function ɵɵpureFunction6( slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, thisArg?: any): any { // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings @@ -232,7 +232,7 @@ export function ΔpureFunction6( * * @codeGenApi */ -export function ΔpureFunction7( +export function ɵɵpureFunction7( slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, thisArg?: any): any { @@ -267,7 +267,7 @@ export function ΔpureFunction7( * * @codeGenApi */ -export function ΔpureFunction8( +export function ɵɵpureFunction8( slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any, v8: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, exp8: any, @@ -299,7 +299,7 @@ export function ΔpureFunction8( * * @codeGenApi */ -export function ΔpureFunctionV( +export function ɵɵpureFunctionV( slotOffset: number, pureFn: (...v: any[]) => any, exps: any[], thisArg?: any): any { // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings let bindingIndex = getBindingRoot() + slotOffset; diff --git a/packages/core/src/render3/query.ts b/packages/core/src/render3/query.ts index 3c7b948587..08c67b14ee 100644 --- a/packages/core/src/render3/query.ts +++ b/packages/core/src/render3/query.ts @@ -18,7 +18,7 @@ import {assertDataInRange, assertDefined, assertEqual} from '../util/assert'; import {assertPreviousIsParent} from './assert'; import {getNodeInjectable, locateDirectiveOrProvider} from './di'; import {NG_ELEMENT_ID} from './fields'; -import {store, Δload} from './instructions/all'; +import {store, ɵɵload} from './instructions/all'; import {storeCleanupWithContext} from './instructions/shared'; import {unusedValueExportToPlacateAjd as unused1} from './interfaces/definition'; import {unusedValueExportToPlacateAjd as unused2} from './interfaces/injector'; @@ -372,7 +372,7 @@ export function query( * * @codeGenApi */ -export function ΔqueryRefresh(queryList: QueryList): boolean { +export function ɵɵqueryRefresh(queryList: QueryList): boolean { const queryListImpl = (queryList as any as QueryList_); const creationMode = isCreationMode(); @@ -394,10 +394,10 @@ export function ΔqueryRefresh(queryList: QueryList): boolean { * * @codeGenApi */ -export function ΔstaticViewQuery( +export function ɵɵstaticViewQuery( // TODO(FW-486): "read" should be an AbstractType predicate: Type| string[], descend: boolean, read: any): void { - const queryList = ΔviewQuery(predicate, descend, read) as QueryList_; + const queryList = ɵɵviewQuery(predicate, descend, read) as QueryList_; const tView = getLView()[TVIEW]; queryList._static = true; if (!tView.staticViewQueries) { @@ -415,7 +415,7 @@ export function ΔstaticViewQuery( * * @codeGenApi */ -export function ΔviewQuery( +export function ɵɵviewQuery( // TODO(FW-486): "read" should be an AbstractType predicate: Type| string[], descend: boolean, read: any): QueryList { const lView = getLView(); @@ -435,10 +435,10 @@ export function ΔviewQuery( * * @codeGenApi */ -export function ΔloadViewQuery(): T { +export function ɵɵloadViewQuery(): T { const index = getCurrentQueryIndex(); setCurrentQueryIndex(index + 1); - return Δload(index - HEADER_OFFSET); + return ɵɵload(index - HEADER_OFFSET); } /** @@ -453,7 +453,7 @@ export function ΔloadViewQuery(): T { * * @codeGenApi */ -export function ΔcontentQuery( +export function ɵɵcontentQuery( directiveIndex: number, predicate: Type| string[], descend: boolean, // TODO(FW-486): "read" should be an AbstractType read: any): QueryList { @@ -484,11 +484,11 @@ export function ΔcontentQuery( * * @codeGenApi */ -export function ΔstaticContentQuery( +export function ɵɵstaticContentQuery( directiveIndex: number, predicate: Type| string[], descend: boolean, // TODO(FW-486): "read" should be an AbstractType read: any): void { - const queryList = ΔcontentQuery(directiveIndex, predicate, descend, read) as QueryList_; + const queryList = ɵɵcontentQuery(directiveIndex, predicate, descend, read) as QueryList_; const tView = getLView()[TVIEW]; queryList._static = true; if (!tView.staticContentQueries) { @@ -500,7 +500,7 @@ export function ΔstaticContentQuery( * * @codeGenApi */ -export function ΔloadContentQuery(): QueryList { +export function ɵɵloadContentQuery(): QueryList { const lView = getLView(); ngDevMode && assertDefined( diff --git a/packages/core/src/render3/state.ts b/packages/core/src/render3/state.ts index 3d289451b7..5bc7d315bc 100644 --- a/packages/core/src/render3/state.ts +++ b/packages/core/src/render3/state.ts @@ -82,17 +82,17 @@ export function getBindingsEnabled(): boolean { * Should match component / directive. * *
- * + * * * Should not match component / directive because we are in ngNonBindable. * - * + * *
* ``` * * @codeGenApi */ -export function ΔenableBindings(): void { +export function ɵɵenableBindings(): void { bindingsEnabled = true; } @@ -105,17 +105,17 @@ export function ΔenableBindings(): void { * Should match component / directive. * *
- * + * * * Should not match component / directive because we are in ngNonBindable. * - * + * *
* ``` * * @codeGenApi */ -export function ΔdisableBindings(): void { +export function ɵɵdisableBindings(): void { bindingsEnabled = false; } @@ -269,7 +269,7 @@ export function getActiveDirectiveSuperClassDepth() { * * @codeGenApi */ -export function ΔrestoreView(viewToRestore: OpaqueViewState) { +export function ɵɵrestoreView(viewToRestore: OpaqueViewState) { contextLView = viewToRestore as any as LView; } @@ -492,7 +492,7 @@ let _currentNamespace: string|null = null; * * @codeGenApi */ -export function ΔnamespaceSVG() { +export function ɵɵnamespaceSVG() { _currentNamespace = 'http://www.w3.org/2000/svg'; } @@ -501,7 +501,7 @@ export function ΔnamespaceSVG() { * * @codeGenApi */ -export function ΔnamespaceMathML() { +export function ɵɵnamespaceMathML() { _currentNamespace = 'http://www.w3.org/1998/MathML/'; } @@ -511,7 +511,7 @@ export function ΔnamespaceMathML() { * * @codeGenApi */ -export function ΔnamespaceHTML() { +export function ɵɵnamespaceHTML() { _currentNamespace = null; } diff --git a/packages/core/src/render3/util/misc_utils.ts b/packages/core/src/render3/util/misc_utils.ts index 7fa449e622..191ca325a9 100644 --- a/packages/core/src/render3/util/misc_utils.ts +++ b/packages/core/src/render3/util/misc_utils.ts @@ -45,7 +45,7 @@ export const defaultScheduler = * * @codeGenApi */ -export function ΔresolveWindow(element: RElement & {ownerDocument: Document}) { +export function ɵɵresolveWindow(element: RElement & {ownerDocument: Document}) { return {name: 'window', target: element.ownerDocument.defaultView}; } @@ -53,7 +53,7 @@ export function ΔresolveWindow(element: RElement & {ownerDocument: Document}) { * * @codeGenApi */ -export function ΔresolveDocument(element: RElement & {ownerDocument: Document}) { +export function ɵɵresolveDocument(element: RElement & {ownerDocument: Document}) { return {name: 'document', target: element.ownerDocument}; } @@ -61,7 +61,7 @@ export function ΔresolveDocument(element: RElement & {ownerDocument: Document}) * * @codeGenApi */ -export function ΔresolveBody(element: RElement & {ownerDocument: Document}) { +export function ɵɵresolveBody(element: RElement & {ownerDocument: Document}) { return {name: 'body', target: element.ownerDocument.body}; } diff --git a/packages/core/src/render3/view_engine_compatibility_prebound.ts b/packages/core/src/render3/view_engine_compatibility_prebound.ts index a2cdbc706c..2c5505a831 100644 --- a/packages/core/src/render3/view_engine_compatibility_prebound.ts +++ b/packages/core/src/render3/view_engine_compatibility_prebound.ts @@ -22,6 +22,6 @@ import {createTemplateRef} from './view_engine_compatibility'; * * @codeGenApi */ -export function ΔtemplateRefExtractor(tNode: TNode, currentView: LView) { +export function ɵɵtemplateRefExtractor(tNode: TNode, currentView: LView) { return createTemplateRef(ViewEngine_TemplateRef, ViewEngine_ElementRef, tNode, currentView); } diff --git a/packages/core/src/sanitization/sanitization.ts b/packages/core/src/sanitization/sanitization.ts index 5d5b4a3a5c..e28616071e 100644 --- a/packages/core/src/sanitization/sanitization.ts +++ b/packages/core/src/sanitization/sanitization.ts @@ -33,7 +33,7 @@ import {_sanitizeUrl as _sanitizeUrl} from './url_sanitizer'; * * @publicApi */ -export function ΔsanitizeHtml(unsafeHtml: any): string { +export function ɵɵsanitizeHtml(unsafeHtml: any): string { const sanitizer = getSanitizer(); if (sanitizer) { return sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || ''; @@ -59,7 +59,7 @@ export function ΔsanitizeHtml(unsafeHtml: any): string { * * @publicApi */ -export function ΔsanitizeStyle(unsafeStyle: any): string { +export function ɵɵsanitizeStyle(unsafeStyle: any): string { const sanitizer = getSanitizer(); if (sanitizer) { return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || ''; @@ -86,7 +86,7 @@ export function ΔsanitizeStyle(unsafeStyle: any): string { * * @publicApi */ -export function ΔsanitizeUrl(unsafeUrl: any): string { +export function ɵɵsanitizeUrl(unsafeUrl: any): string { const sanitizer = getSanitizer(); if (sanitizer) { return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || ''; @@ -108,7 +108,7 @@ export function ΔsanitizeUrl(unsafeUrl: any): string { * * @publicApi */ -export function ΔsanitizeResourceUrl(unsafeResourceUrl: any): string { +export function ɵɵsanitizeResourceUrl(unsafeResourceUrl: any): string { const sanitizer = getSanitizer(); if (sanitizer) { return sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || ''; @@ -131,7 +131,7 @@ export function ΔsanitizeResourceUrl(unsafeResourceUrl: any): string { * * @publicApi */ -export function ΔsanitizeScript(unsafeScript: any): string { +export function ɵɵsanitizeScript(unsafeScript: any): string { const sanitizer = getSanitizer(); if (sanitizer) { return sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || ''; @@ -153,9 +153,9 @@ export function getUrlSanitizer(tag: string, prop: string) { if ((prop === 'src' && (tag === 'embed' || tag === 'frame' || tag === 'iframe' || tag === 'media' || tag === 'script')) || (prop === 'href' && (tag === 'base' || tag === 'link'))) { - return ΔsanitizeResourceUrl; + return ɵɵsanitizeResourceUrl; } - return ΔsanitizeUrl; + return ɵɵsanitizeUrl; } /** @@ -173,7 +173,7 @@ export function getUrlSanitizer(tag: string, prop: string) { * * @publicApi */ -export function ΔsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any { +export function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any { return getUrlSanitizer(tag, prop)(unsafeUrl); } @@ -183,13 +183,13 @@ export function ΔsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: st * * @publicApi */ -export const ΔdefaultStyleSanitizer = (function(prop: string, value?: string): string | boolean { +export const ɵɵdefaultStyleSanitizer = (function(prop: string, value?: string): string | boolean { if (value === undefined) { return prop === 'background-image' || prop === 'background' || prop === 'border-image' || prop === 'filter' || prop === 'list-style' || prop === 'list-style-image'; } - return ΔsanitizeStyle(value); + return ɵɵsanitizeStyle(value); } as StyleSanitizeFn); export function validateAgainstEventProperties(name: string) { diff --git a/packages/core/src/view/ng_module.ts b/packages/core/src/view/ng_module.ts index 3edaaf83c4..37fed07345 100644 --- a/packages/core/src/view/ng_module.ts +++ b/packages/core/src/view/ng_module.ts @@ -9,7 +9,7 @@ import {resolveForwardRef} from '../di/forward_ref'; import {INJECTOR, Injector} from '../di/injector'; import {setCurrentInjector} from '../di/injector_compatibility'; -import {getInjectableDef, ΔInjectableDef} from '../di/interface/defs'; +import {getInjectableDef, ɵɵInjectableDef} from '../di/interface/defs'; import {APP_ROOT} from '../di/scope'; import {NgModuleRef} from '../linker/ng_module_factory'; import {stringify} from '../util/stringify'; @@ -98,7 +98,7 @@ export function resolveNgModuleDep( return data; } const providerDef = data._def.providersByKey[tokenKey]; - let injectableDef: ΔInjectableDef|null; + let injectableDef: ɵɵInjectableDef|null; if (providerDef) { let providerInstance = data._providers[providerDef.index]; if (providerInstance === undefined) { @@ -132,7 +132,7 @@ function moduleTransitivelyPresent(ngModule: NgModuleData, scope: any): boolean return ngModule._def.modules.indexOf(scope) > -1; } -function targetsModule(ngModule: NgModuleData, def: ΔInjectableDef): boolean { +function targetsModule(ngModule: NgModuleData, def: ɵɵInjectableDef): boolean { return def.providedIn != null && (moduleTransitivelyPresent(ngModule, def.providedIn) || def.providedIn === 'root' && ngModule._def.isRoot); } diff --git a/packages/core/src/view/services.ts b/packages/core/src/view/services.ts index 67465f2ba4..02302ba35e 100644 --- a/packages/core/src/view/services.ts +++ b/packages/core/src/view/services.ts @@ -9,7 +9,7 @@ import {DebugElement__PRE_R3__, DebugNode__PRE_R3__, EventListener, getDebugNode, indexDebugNode, removeDebugNodeFromIndex} from '../debug/debug_node'; import {Injector} from '../di'; import {InjectableType} from '../di/injectable'; -import {getInjectableDef, ΔInjectableDef} from '../di/interface/defs'; +import {getInjectableDef, ɵɵInjectableDef} from '../di/interface/defs'; import {ErrorHandler} from '../error_handler'; import {Type} from '../interface/type'; import {ComponentFactory} from '../linker/component_factory'; @@ -170,7 +170,7 @@ const viewDefOverrides = new Map(); function debugOverrideProvider(override: ProviderOverride) { providerOverrides.set(override.token, override); - let injectableDef: ΔInjectableDef|null; + let injectableDef: ɵɵInjectableDef|null; if (typeof override.token === 'function' && (injectableDef = getInjectableDef(override.token)) && typeof injectableDef.providedIn === 'function') { providerOverridesWithScope.set(override.token as InjectableType, override); diff --git a/packages/core/test/bundling/cyclic_import/bundle.golden_symbols.json b/packages/core/test/bundling/cyclic_import/bundle.golden_symbols.json index 3a280df1a9..98c70fb680 100644 --- a/packages/core/test/bundling/cyclic_import/bundle.golden_symbols.json +++ b/packages/core/test/bundling/cyclic_import/bundle.golden_symbols.json @@ -675,30 +675,30 @@ "name": "viewAttachedToChangeDetector" }, { - "name": "ΔdefineComponent" + "name": "ɵɵdefineComponent" }, { - "name": "ΔdefineInjector" + "name": "ɵɵdefineInjector" }, { - "name": "ΔdefineNgModule" + "name": "ɵɵdefineNgModule" }, { - "name": "Δelement" + "name": "ɵɵelement" }, { - "name": "ΔelementEnd" + "name": "ɵɵelementEnd" }, { - "name": "ΔelementStart" + "name": "ɵɵelementStart" }, { - "name": "ΔnamespaceHTML" + "name": "ɵɵnamespaceHTML" }, { - "name": "ΔsetComponentScope" + "name": "ɵɵsetComponentScope" }, { - "name": "Δtext" + "name": "ɵɵtext" } ] \ No newline at end of file diff --git a/packages/core/test/bundling/hello_world/bundle.golden_symbols.json b/packages/core/test/bundling/hello_world/bundle.golden_symbols.json index 2d4ad34769..98e4f7685f 100644 --- a/packages/core/test/bundling/hello_world/bundle.golden_symbols.json +++ b/packages/core/test/bundling/hello_world/bundle.golden_symbols.json @@ -486,12 +486,12 @@ "name": "viewAttachedToChangeDetector" }, { - "name": "ΔdefineComponent" + "name": "ɵɵdefineComponent" }, { - "name": "ΔnamespaceHTML" + "name": "ɵɵnamespaceHTML" }, { - "name": "Δtext" + "name": "ɵɵtext" } ] \ No newline at end of file diff --git a/packages/core/test/bundling/injection/bundle.golden_symbols.json b/packages/core/test/bundling/injection/bundle.golden_symbols.json index d4a4363da9..62887f7ba6 100644 --- a/packages/core/test/bundling/injection/bundle.golden_symbols.json +++ b/packages/core/test/bundling/injection/bundle.golden_symbols.json @@ -228,12 +228,12 @@ "name": "tryResolveToken" }, { - "name": "ΔdefineInjectable" + "name": "ɵɵdefineInjectable" }, { - "name": "ΔdefineInjector" + "name": "ɵɵdefineInjector" }, { - "name": "Δinject" + "name": "ɵɵinject" } ] \ No newline at end of file diff --git a/packages/core/test/bundling/injection/usage.ts b/packages/core/test/bundling/injection/usage.ts index 777867de2e..8f4c9a1f5b 100644 --- a/packages/core/test/bundling/injection/usage.ts +++ b/packages/core/test/bundling/injection/usage.ts @@ -6,17 +6,17 @@ * found in the LICENSE file at https://angular.io/license */ -import {Injector, ɵcreateInjector as createInjector, ΔdefineInjectable, ΔdefineInjector} from '@angular/core'; +import {Injector, ɵcreateInjector as createInjector, ɵɵdefineInjectable, ɵɵdefineInjector} from '@angular/core'; export class RootService { - static ngInjectableDef = ΔdefineInjectable({ + static ngInjectableDef = ɵɵdefineInjectable({ providedIn: 'root', factory: () => new RootService(), }); } export class ScopedService { - static ngInjectableDef = ΔdefineInjectable({ + static ngInjectableDef = ɵɵdefineInjectable({ providedIn: null, factory: () => new ScopedService(), }); @@ -28,7 +28,7 @@ export class ScopedService { } export class DefinedInjector { - static ngInjectorDef = ΔdefineInjector({ + static ngInjectorDef = ɵɵdefineInjector({ factory: () => new DefinedInjector(), providers: [ScopedService], }); diff --git a/packages/core/test/bundling/todo/bundle.golden_symbols.json b/packages/core/test/bundling/todo/bundle.golden_symbols.json index 992ae96090..7f8e07c77b 100644 --- a/packages/core/test/bundling/todo/bundle.golden_symbols.json +++ b/packages/core/test/bundling/todo/bundle.golden_symbols.json @@ -1305,69 +1305,69 @@ "name": "wrapListener" }, { - "name": "Δbind" + "name": "ɵɵbind" }, { - "name": "ΔdefineComponent" + "name": "ɵɵdefineComponent" }, { - "name": "ΔdefineDirective" + "name": "ɵɵdefineDirective" }, { - "name": "ΔdefineInjectable" + "name": "ɵɵdefineInjectable" }, { - "name": "ΔdirectiveInject" + "name": "ɵɵdirectiveInject" }, { - "name": "ΔelementClassProp" + "name": "ɵɵelementClassProp" }, { - "name": "ΔelementEnd" + "name": "ɵɵelementEnd" }, { - "name": "ΔelementProperty" + "name": "ɵɵelementProperty" }, { - "name": "ΔelementStart" + "name": "ɵɵelementStart" }, { - "name": "ΔelementStyling" + "name": "ɵɵelementStyling" }, { - "name": "ΔelementStylingApply" + "name": "ɵɵelementStylingApply" }, { - "name": "ΔgetCurrentView" + "name": "ɵɵgetCurrentView" }, { - "name": "Δinterpolation1" + "name": "ɵɵinterpolation1" }, { - "name": "Δlistener" + "name": "ɵɵlistener" }, { - "name": "ΔnamespaceHTML" + "name": "ɵɵnamespaceHTML" }, { - "name": "ΔnextContext" + "name": "ɵɵnextContext" }, { - "name": "Δreference" + "name": "ɵɵreference" }, { - "name": "ΔrestoreView" + "name": "ɵɵrestoreView" }, { - "name": "Δselect" + "name": "ɵɵselect" }, { - "name": "Δtemplate" + "name": "ɵɵtemplate" }, { - "name": "Δtext" + "name": "ɵɵtext" }, { - "name": "ΔtextBinding" + "name": "ɵɵtextBinding" } ] \ No newline at end of file diff --git a/packages/core/test/bundling/todo_i18n/index.ts b/packages/core/test/bundling/todo_i18n/index.ts index e402eb10ae..49337f9395 100644 --- a/packages/core/test/bundling/todo_i18n/index.ts +++ b/packages/core/test/bundling/todo_i18n/index.ts @@ -16,7 +16,7 @@ import '@angular/core/test/bundling/util/src/reflect_metadata'; */ import './translations'; import {CommonModule} from '@angular/common'; -import {Component, Injectable, NgModule, ViewEncapsulation, ɵmarkDirty as markDirty, ɵrenderComponent as renderComponent, Δi18nLocalize as localize} from '@angular/core'; +import {Component, Injectable, NgModule, ViewEncapsulation, ɵmarkDirty as markDirty, ɵrenderComponent as renderComponent, ɵɵi18nLocalize as localize} from '@angular/core'; class Todo { editing: boolean; diff --git a/packages/core/test/di/r3_injector_spec.ts b/packages/core/test/di/r3_injector_spec.ts index 03f142fd38..75907a1aee 100644 --- a/packages/core/test/di/r3_injector_spec.ts +++ b/packages/core/test/di/r3_injector_spec.ts @@ -6,34 +6,34 @@ * found in the LICENSE file at https://angular.io/license */ -import {INJECTOR, InjectFlags, InjectionToken, Injector, Optional, ΔdefineInjectable, ΔdefineInjector, Δinject} from '@angular/core'; +import {INJECTOR, InjectFlags, InjectionToken, Injector, Optional, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵinject} from '@angular/core'; import {R3Injector, createInjector} from '@angular/core/src/di/r3_injector'; import {expect} from '@angular/platform-browser/testing/src/matchers'; describe('InjectorDef-based createInjector()', () => { class CircularA { - static ngInjectableDef = ΔdefineInjectable({ + static ngInjectableDef = ɵɵdefineInjectable({ providedIn: null, - factory: () => Δinject(CircularB), + factory: () => ɵɵinject(CircularB), }); } class CircularB { - static ngInjectableDef = ΔdefineInjectable({ + static ngInjectableDef = ɵɵdefineInjectable({ providedIn: null, - factory: () => Δinject(CircularA), + factory: () => ɵɵinject(CircularA), }); } class Service { - static ngInjectableDef = ΔdefineInjectable({ + static ngInjectableDef = ɵɵdefineInjectable({ providedIn: null, factory: () => new Service(), }); } class OptionalService { - static ngInjectableDef = ΔdefineInjectable({ + static ngInjectableDef = ɵɵdefineInjectable({ providedIn: null, factory: () => new OptionalService(), }); @@ -55,41 +55,41 @@ describe('InjectorDef-based createInjector()', () => { class ServiceWithDep { constructor(readonly service: Service) {} - static ngInjectableDef = ΔdefineInjectable({ + static ngInjectableDef = ɵɵdefineInjectable({ providedIn: null, - factory: () => new ServiceWithDep(Δinject(Service)), + factory: () => new ServiceWithDep(ɵɵinject(Service)), }); } class ServiceWithOptionalDep { constructor(@Optional() readonly service: OptionalService|null) {} - static ngInjectableDef = ΔdefineInjectable({ + static ngInjectableDef = ɵɵdefineInjectable({ providedIn: null, - factory: () => new ServiceWithOptionalDep(Δinject(OptionalService, InjectFlags.Optional)), + factory: () => new ServiceWithOptionalDep(ɵɵinject(OptionalService, InjectFlags.Optional)), }); } class ServiceWithMissingDep { constructor(readonly service: Service) {} - static ngInjectableDef = ΔdefineInjectable({ + static ngInjectableDef = ɵɵdefineInjectable({ providedIn: null, - factory: () => new ServiceWithMissingDep(Δinject(Service)), + factory: () => new ServiceWithMissingDep(ɵɵinject(Service)), }); } class ServiceWithMultiDep { constructor(readonly locale: string[]) {} - static ngInjectableDef = ΔdefineInjectable({ + static ngInjectableDef = ɵɵdefineInjectable({ providedIn: null, - factory: () => new ServiceWithMultiDep(Δinject(LOCALE)), + factory: () => new ServiceWithMultiDep(ɵɵinject(LOCALE)), }); } class ServiceTwo { - static ngInjectableDef = ΔdefineInjectable({ + static ngInjectableDef = ɵɵdefineInjectable({ providedIn: null, factory: () => new ServiceTwo(), }); @@ -97,7 +97,7 @@ describe('InjectorDef-based createInjector()', () => { let deepServiceDestroyed = false; class DeepService { - static ngInjectableDef = ΔdefineInjectable({ + static ngInjectableDef = ɵɵdefineInjectable({ providedIn: null, factory: () => new DeepService(), }); @@ -107,7 +107,7 @@ describe('InjectorDef-based createInjector()', () => { let eagerServiceCreated: boolean = false; class EagerService { - static ngInjectableDef = ΔdefineInjectable({ + static ngInjectableDef = ɵɵdefineInjectable({ providedIn: undefined, factory: () => new EagerService(), }); @@ -119,8 +119,8 @@ describe('InjectorDef-based createInjector()', () => { class DeepModule { constructor(eagerService: EagerService) { deepModuleCreated = true; } - static ngInjectorDef = ΔdefineInjector({ - factory: () => new DeepModule(Δinject(EagerService)), + static ngInjectorDef = ɵɵdefineInjector({ + factory: () => new DeepModule(ɵɵinject(EagerService)), imports: undefined, providers: [ EagerService, @@ -137,7 +137,7 @@ describe('InjectorDef-based createInjector()', () => { } class IntermediateModule { - static ngInjectorDef = ΔdefineInjector({ + static ngInjectorDef = ɵɵdefineInjector({ factory: () => new IntermediateModule(), imports: [DeepModule.safe()], providers: [], @@ -147,13 +147,13 @@ describe('InjectorDef-based createInjector()', () => { class InjectorWithDep { constructor(readonly service: Service) {} - static ngInjectorDef = ΔdefineInjector({ - factory: () => new InjectorWithDep(Δinject(Service)), + static ngInjectorDef = ɵɵdefineInjector({ + factory: () => new InjectorWithDep(ɵɵinject(Service)), }); } class Module { - static ngInjectorDef = ΔdefineInjector({ + static ngInjectorDef = ɵɵdefineInjector({ factory: () => new Module(), imports: [IntermediateModule], providers: [ @@ -175,7 +175,7 @@ describe('InjectorDef-based createInjector()', () => { } class OtherModule { - static ngInjectorDef = ΔdefineInjector({ + static ngInjectorDef = ɵɵdefineInjector({ factory: () => new OtherModule(), imports: undefined, providers: [], @@ -183,7 +183,7 @@ describe('InjectorDef-based createInjector()', () => { } class ModuleWithMissingDep { - static ngInjectorDef = ΔdefineInjector({ + static ngInjectorDef = ɵɵdefineInjector({ factory: () => new ModuleWithMissingDep(), imports: undefined, providers: [ServiceWithMissingDep], @@ -193,7 +193,7 @@ describe('InjectorDef-based createInjector()', () => { class NotAModule {} class ImportsNotAModule { - static ngInjectorDef = ΔdefineInjector({ + static ngInjectorDef = ɵɵdefineInjector({ factory: () => new ImportsNotAModule(), imports: [NotAModule], providers: [], @@ -202,7 +202,7 @@ describe('InjectorDef-based createInjector()', () => { let scopedServiceDestroyed = false; class ScopedService { - static ngInjectableDef = ΔdefineInjectable({ + static ngInjectableDef = ɵɵdefineInjectable({ providedIn: Module, factory: () => new ScopedService(), }); @@ -211,7 +211,7 @@ describe('InjectorDef-based createInjector()', () => { } class WrongScopeService { - static ngInjectableDef = ΔdefineInjectable({ + static ngInjectableDef = ɵɵdefineInjectable({ providedIn: OtherModule, factory: () => new WrongScopeService(), }); @@ -367,7 +367,7 @@ describe('InjectorDef-based createInjector()', () => { } class ErrorModule { static ngInjectorDef = - ΔdefineInjector({factory: () => new ErrorModule(), providers: [MissingArgumentType]}); + ɵɵdefineInjector({factory: () => new ErrorModule(), providers: [MissingArgumentType]}); } expect(() => createInjector(ErrorModule).get(MissingArgumentType)) .toThrowError('Can\'t resolve all parameters for MissingArgumentType: (?).'); diff --git a/packages/core/test/linker/ng_module_integration_spec.ts b/packages/core/test/linker/ng_module_integration_spec.ts index e093a9af9f..4500bd26df 100644 --- a/packages/core/test/linker/ng_module_integration_spec.ts +++ b/packages/core/test/linker/ng_module_integration_spec.ts @@ -8,7 +8,7 @@ import {ANALYZE_FOR_ENTRY_COMPONENTS, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectorRef, Compiler, Component, ComponentFactoryResolver, Directive, HostBinding, Inject, Injectable, InjectionToken, Injector, Input, NgModule, NgModuleRef, Optional, Pipe, Provider, Self, Type, forwardRef, getModuleFactory, ɵivyEnabled as ivyEnabled} from '@angular/core'; import {Console} from '@angular/core/src/console'; -import {ΔInjectableDef, ΔdefineInjectable} from '@angular/core/src/di/interface/defs'; +import {ɵɵInjectableDef, ɵɵdefineInjectable} from '@angular/core/src/di/interface/defs'; import {getNgModuleDef} from '@angular/core/src/render3/definition'; import {NgModuleData} from '@angular/core/src/view/types'; import {tokenKey} from '@angular/core/src/view/util'; @@ -1362,7 +1362,7 @@ function declareTests(config?: {useJit: boolean}) { } class Bar { - static ngInjectableDef: ΔInjectableDef = ΔdefineInjectable({ + static ngInjectableDef: ɵɵInjectableDef = ɵɵdefineInjectable({ factory: () => new Bar(), providedIn: SomeModule, }); @@ -1394,7 +1394,7 @@ function declareTests(config?: {useJit: boolean}) { } class Bar { - static ngInjectableDef: ΔInjectableDef = ΔdefineInjectable({ + static ngInjectableDef: ɵɵInjectableDef = ɵɵdefineInjectable({ factory: () => new Bar(), providedIn: SomeModule, }); diff --git a/packages/core/test/render3/basic_perf.ts b/packages/core/test/render3/basic_perf.ts index 7fc6aa6d75..b0595447dc 100644 --- a/packages/core/test/render3/basic_perf.ts +++ b/packages/core/test/render3/basic_perf.ts @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import {ΔdefineComponent} from '../../src/render3/index'; -import {Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, ΔelementEnd, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, Δtext} from '../../src/render3/instructions/all'; +import {ɵɵdefineComponent} from '../../src/render3/index'; +import {ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵelementEnd, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵtext} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; import {document, renderComponent} from './render_util'; @@ -33,31 +33,31 @@ describe('iv perf test', () => { it(`${iteration}. create ${count} divs in Render3`, () => { class Component { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Component, selectors: [['div']], consts: 1, vars: 0, template: function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { for (let i = 0; i < count; i++) { - let rf0 = ΔembeddedViewStart(0, 2, 0); + let rf0 = ɵɵembeddedViewStart(0, 2, 0); { if (rf0 & RenderFlags.Create) { - ΔelementStart(0, 'div'); - Δtext(1, '-'); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵtext(1, '-'); + ɵɵelementEnd(); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, factory: () => new Component diff --git a/packages/core/test/render3/change_detection_spec.ts b/packages/core/test/render3/change_detection_spec.ts index 7172fa179e..c5e38d76d5 100644 --- a/packages/core/test/render3/change_detection_spec.ts +++ b/packages/core/test/render3/change_detection_spec.ts @@ -11,8 +11,8 @@ import {withBody} from '@angular/private/testing'; import {ChangeDetectionStrategy, ChangeDetectorRef, DoCheck, RendererType2} from '../../src/core'; import {whenRendered} from '../../src/render3/component'; -import {LifecycleHooksFeature, getRenderedText, ΔNgOnChangesFeature, ΔdefineComponent, ΔdefineDirective, ΔgetCurrentView, ΔtemplateRefExtractor} from '../../src/render3/index'; -import {detectChanges, markDirty, tick, Δbind, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, ΔdirectiveInject, Δelement, ΔelementEnd, ΔelementProperty, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, Δinterpolation1, Δinterpolation2, Δlistener, Δreference, Δtemplate, Δtext, ΔtextBinding} from '../../src/render3/instructions/all'; +import {LifecycleHooksFeature, getRenderedText, ɵɵNgOnChangesFeature, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵgetCurrentView, ɵɵtemplateRefExtractor} from '../../src/render3/index'; +import {detectChanges, markDirty, tick, ɵɵbind, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵdirectiveInject, ɵɵelement, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵinterpolation1, ɵɵinterpolation2, ɵɵlistener, ɵɵreference, ɵɵtemplate, ɵɵtext, ɵɵtextBinding} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; import {RElement, Renderer3, RendererFactory3} from '../../src/render3/interfaces/renderer'; import {FLAGS, LViewFlags} from '../../src/render3/interfaces/view'; @@ -26,7 +26,7 @@ describe('change detection', () => { doCheckCount = 0; ngDoCheck(): void { this.doCheckCount++; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComponent, selectors: [['my-comp']], factory: () => new MyComponent(), @@ -34,12 +34,12 @@ describe('change detection', () => { vars: 1, template: (rf: RenderFlags, ctx: MyComponent) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span'); - Δtext(1); - ΔelementEnd(); + ɵɵelementStart(0, 'span'); + ɵɵtext(1); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔtextBinding(1, Δbind(ctx.value)); + ɵɵtextBinding(1, ɵɵbind(ctx.value)); } } }); @@ -101,7 +101,7 @@ describe('change detection', () => { onClick() {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComponent, selectors: [['my-comp']], factory: () => comp = new MyComponent(), @@ -113,15 +113,15 @@ describe('change detection', () => { */ template: (rf: RenderFlags, ctx: MyComponent) => { if (rf & RenderFlags.Create) { - Δtext(0); - ΔelementStart(1, 'button'); + ɵɵtext(0); + ɵɵelementStart(1, 'button'); { - Δlistener('click', () => { ctx.onClick(); }); + ɵɵlistener('click', () => { ctx.onClick(); }); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δinterpolation2('', ctx.doCheckCount, ' - ', ctx.name, '')); + ɵɵtextBinding(0, ɵɵinterpolation2('', ctx.doCheckCount, ' - ', ctx.name, '')); } }, changeDetection: ChangeDetectionStrategy.OnPush, @@ -132,7 +132,7 @@ describe('change detection', () => { class MyApp { name: string = 'Nancy'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, selectors: [['my-app']], factory: () => new MyApp(), @@ -141,10 +141,10 @@ describe('change detection', () => { /** */ template: (rf: RenderFlags, ctx: MyApp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'my-comp'); + ɵɵelement(0, 'my-comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'name', Δbind(ctx.name)); + ɵɵelementProperty(0, 'name', ɵɵbind(ctx.name)); } }, directives: () => [MyComponent] @@ -222,10 +222,10 @@ describe('change detection', () => { const ButtonParent = createComponent('button-parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'my-comp'); - ΔelementStart(1, 'button', ['id', 'parent']); - { Δlistener('click', () => noop()); } - ΔelementEnd(); + ɵɵelement(0, 'my-comp'); + ɵɵelementStart(1, 'button', ['id', 'parent']); + { ɵɵlistener('click', () => noop()); } + ɵɵelementEnd(); } }, 2, 0, [MyComponent]); @@ -247,7 +247,7 @@ describe('change detection', () => { doCheckCount = 0; ngDoCheck(): void { this.doCheckCount++; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ButtonParent, selectors: [['button-parent']], factory: () => parent = new ButtonParent(), @@ -256,11 +256,11 @@ describe('change detection', () => { /** {{ doCheckCount }} - */ template: (rf: RenderFlags, ctx: ButtonParent) => { if (rf & RenderFlags.Create) { - Δtext(0); - Δelement(1, 'my-comp'); + ɵɵtext(0); + ɵɵelement(1, 'my-comp'); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δinterpolation1('', ctx.doCheckCount, ' - ')); + ɵɵtextBinding(0, ɵɵinterpolation1('', ctx.doCheckCount, ' - ')); } }, directives: () => [MyComponent], @@ -270,7 +270,7 @@ describe('change detection', () => { const MyButtonApp = createComponent('my-button-app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'button-parent'); + ɵɵelement(0, 'button-parent'); } }, 1, 0, [ButtonParent]); @@ -308,7 +308,7 @@ describe('change detection', () => { onClick() {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ManualComponent, selectors: [['manual-comp']], factory: () => comp = new ManualComponent(), @@ -322,18 +322,18 @@ describe('change detection', () => { if (rf & RenderFlags.Create) { // This is temporarily the only way to turn on manual change detection // because public API has not yet been added. - const view = ΔgetCurrentView() as any; + const view = ɵɵgetCurrentView() as any; view[FLAGS] |= LViewFlags.ManualOnPush; - Δtext(0); - ΔelementStart(1, 'button'); + ɵɵtext(0); + ɵɵelementStart(1, 'button'); { - Δlistener('click', () => { ctx.onClick(); }); + ɵɵlistener('click', () => { ctx.onClick(); }); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δinterpolation2('', ctx.doCheckCount, ' - ', ctx.name, '')); + ɵɵtextBinding(0, ɵɵinterpolation2('', ctx.doCheckCount, ' - ', ctx.name, '')); } }, changeDetection: ChangeDetectionStrategy.OnPush, @@ -344,7 +344,7 @@ describe('change detection', () => { class ManualApp { name: string = 'Nancy'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ManualApp, selectors: [['manual-app']], factory: () => new ManualApp(), @@ -353,10 +353,10 @@ describe('change detection', () => { /** */ template: (rf: RenderFlags, ctx: ManualApp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'manual-comp'); + ɵɵelement(0, 'manual-comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'name', Δbind(ctx.name)); + ɵɵelementProperty(0, 'name', ɵɵbind(ctx.name)); } }, @@ -399,7 +399,7 @@ describe('change detection', () => { doCheckCount = 0; ngDoCheck(): void { this.doCheckCount++; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ButtonParent, selectors: [['button-parent']], factory: () => parent = new ButtonParent(), @@ -408,11 +408,11 @@ describe('change detection', () => { /** {{ doCheckCount }} - */ template: (rf: RenderFlags, ctx: ButtonParent) => { if (rf & RenderFlags.Create) { - Δtext(0); - Δelement(1, 'manual-comp'); + ɵɵtext(0); + ɵɵelement(1, 'manual-comp'); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δinterpolation1('', ctx.doCheckCount, ' - ')); + ɵɵtextBinding(0, ɵɵinterpolation1('', ctx.doCheckCount, ' - ')); } }, directives: () => [ManualComponent], @@ -423,7 +423,7 @@ describe('change detection', () => { const MyButtonApp = createComponent('my-button-app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'button-parent'); + ɵɵelement(0, 'button-parent'); } }, 1, 0, [ButtonParent]); @@ -476,19 +476,19 @@ describe('change detection', () => { ngDoCheck() { this.doCheckCount++; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComp, selectors: [['my-comp']], - factory: () => myComp = new MyComp(ΔdirectiveInject(ChangeDetectorRef as any)), + factory: () => myComp = new MyComp(ɵɵdirectiveInject(ChangeDetectorRef as any)), consts: 1, vars: 1, /** {{ name }} */ template: (rf: RenderFlags, ctx: MyComp) => { if (rf & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.name)); + ɵɵtextBinding(0, ɵɵbind(ctx.name)); } }, changeDetection: ChangeDetectionStrategy.OnPush @@ -502,10 +502,10 @@ describe('change detection', () => { ngDoCheck() { this.doCheckCount++; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ParentComp, selectors: [['parent-comp']], - factory: () => new ParentComp(ΔdirectiveInject(ChangeDetectorRef as any)), + factory: () => new ParentComp(ɵɵdirectiveInject(ChangeDetectorRef as any)), consts: 2, vars: 1, /** @@ -514,11 +514,11 @@ describe('change detection', () => { */ template: (rf: RenderFlags, ctx: ParentComp) => { if (rf & RenderFlags.Create) { - Δtext(0); - Δelement(1, 'my-comp'); + ɵɵtext(0); + ɵɵelement(1, 'my-comp'); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δinterpolation1('', ctx.doCheckCount, ' - ')); + ɵɵtextBinding(0, ɵɵinterpolation1('', ctx.doCheckCount, ' - ')); } }, directives: () => [MyComp] @@ -528,10 +528,10 @@ describe('change detection', () => { class Dir { constructor(public cdr: ChangeDetectorRef) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Dir, selectors: [['', 'dir', '']], - factory: () => dir = new Dir(ΔdirectiveInject(ChangeDetectorRef as any)) + factory: () => dir = new Dir(ɵɵdirectiveInject(ChangeDetectorRef as any)) }); } @@ -593,7 +593,7 @@ describe('change detection', () => { /** */ const MyApp = createComponent('my-app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'my-comp', ['dir', '']); + ɵɵelement(0, 'my-comp', ['dir', '']); } }, 1, 0, [MyComp, Dir]); @@ -612,11 +612,11 @@ describe('change detection', () => { */ const MyApp = createComponent('my-app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtext(0); - Δelement(1, 'div', ['dir', '']); + ɵɵtext(0); + ɵɵelement(1, 'div', ['dir', '']); } if (rf & RenderFlags.Update) { - ΔtextBinding(1, Δbind(ctx.value)); + ɵɵtextBinding(1, ɵɵbind(ctx.value)); } }, 2, 1, [Dir]); @@ -637,10 +637,10 @@ describe('change detection', () => { constructor(public cdr: ChangeDetectorRef) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, selectors: [['my-app']], - factory: () => new MyApp(ΔdirectiveInject(ChangeDetectorRef as any)), + factory: () => new MyApp(ɵɵdirectiveInject(ChangeDetectorRef as any)), consts: 2, vars: 1, /** @@ -651,22 +651,22 @@ describe('change detection', () => { */ template: function(rf: RenderFlags, ctx: MyApp) { if (rf & RenderFlags.Create) { - Δtext(0); - Δcontainer(1); + ɵɵtext(0); + ɵɵcontainer(1); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.name)); - ΔcontainerRefreshStart(1); + ɵɵtextBinding(0, ɵɵbind(ctx.name)); + ɵɵcontainerRefreshStart(1); { if (ctx.showing) { - let rf0 = ΔembeddedViewStart(0, 1, 0); + let rf0 = ɵɵembeddedViewStart(0, 1, 0); if (rf0 & RenderFlags.Create) { - Δelement(0, 'div', ['dir', '']); + ɵɵelement(0, 'div', ['dir', '']); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, directives: [Dir] @@ -692,19 +692,19 @@ describe('change detection', () => { this.cdr.detectChanges(); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: DetectChangesComp, selectors: [['detect-changes-comp']], - factory: () => new DetectChangesComp(ΔdirectiveInject(ChangeDetectorRef as any)), + factory: () => new DetectChangesComp(ɵɵdirectiveInject(ChangeDetectorRef as any)), consts: 1, vars: 1, /** {{ value }} */ template: (rf: RenderFlags, ctx: DetectChangesComp) => { if (rf & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.value)); + ɵɵtextBinding(0, ɵɵbind(ctx.value)); } } }); @@ -737,19 +737,19 @@ describe('change detection', () => { } } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ChildComp, selectors: [['child-comp']], - factory: () => new ChildComp(ΔdirectiveInject(ParentComp as any)), + factory: () => new ChildComp(ɵɵdirectiveInject(ParentComp as any)), consts: 1, vars: 0, template: (rf: RenderFlags, ctx: ChildComp) => { if (rf & RenderFlags.Create) { - Δtext(0, 'foo'); + ɵɵtext(0, 'foo'); } }, inputs: {inp: 'inp'}, - features: [ΔNgOnChangesFeature] + features: [ɵɵNgOnChangesFeature] }); } @@ -758,19 +758,19 @@ describe('change detection', () => { triggerChangeDetection() { this.cdr.detectChanges(); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ParentComp, selectors: [['parent-comp']], - factory: () => new ParentComp(ΔdirectiveInject(ChangeDetectorRef as any)), + factory: () => new ParentComp(ɵɵdirectiveInject(ChangeDetectorRef as any)), consts: 1, vars: 1, /** {{ value }} */ template: (rf: RenderFlags, ctx: ParentComp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'child-comp'); + ɵɵelement(0, 'child-comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'inp', Δbind(true)); + ɵɵelementProperty(0, 'inp', ɵɵbind(true)); } }, directives: [ChildComp] @@ -792,19 +792,19 @@ describe('change detection', () => { this.cdr.detectChanges(); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: DetectChangesComp, selectors: [['detect-changes-comp']], - factory: () => new DetectChangesComp(ΔdirectiveInject(ChangeDetectorRef as any)), + factory: () => new DetectChangesComp(ɵɵdirectiveInject(ChangeDetectorRef as any)), consts: 1, vars: 1, /** {{ doCheckCount }} */ template: (rf: RenderFlags, ctx: DetectChangesComp) => { if (rf & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.doCheckCount)); + ɵɵtextBinding(0, ɵɵbind(ctx.doCheckCount)); } } }); @@ -827,20 +827,20 @@ describe('change detection', () => { create() { return this.vcr.createEmbeddedView(this.tmp, this); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: StructuralComp, selectors: [['structural-comp']], factory: () => structuralComp = - new StructuralComp(ΔdirectiveInject(ViewContainerRef as any)), + new StructuralComp(ɵɵdirectiveInject(ViewContainerRef as any)), inputs: {tmp: 'tmp'}, consts: 1, vars: 1, template: function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.value)); + ɵɵtextBinding(0, ɵɵbind(ctx.value)); } } }); @@ -849,10 +849,10 @@ describe('change detection', () => { it('should support ViewRef.detectChanges()', () => { function FooTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.value)); + ɵɵtextBinding(0, ɵɵbind(ctx.value)); } } @@ -862,13 +862,13 @@ describe('change detection', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate( - 0, FooTemplate, 1, 1, 'ng-template', null, ['foo', ''], ΔtemplateRefExtractor); - Δelement(2, 'structural-comp'); + ɵɵtemplate( + 0, FooTemplate, 1, 1, 'ng-template', null, ['foo', ''], ɵɵtemplateRefExtractor); + ɵɵelement(2, 'structural-comp'); } if (rf & RenderFlags.Update) { - const foo = Δreference(1) as any; - ΔelementProperty(2, 'tmp', Δbind(foo)); + const foo = ɵɵreference(1) as any; + ɵɵelementProperty(2, 'tmp', ɵɵbind(foo)); } }, 3, 1, [StructuralComp]); @@ -894,7 +894,7 @@ describe('change detection', () => { it('should support ViewRef.detectChanges() directly after creation', () => { function FooTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtext(0, 'Template text'); + ɵɵtext(0, 'Template text'); } } @@ -904,13 +904,13 @@ describe('change detection', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate( - 0, FooTemplate, 1, 0, 'ng-template', null, ['foo', ''], ΔtemplateRefExtractor); - Δelement(2, 'structural-comp'); + ɵɵtemplate( + 0, FooTemplate, 1, 0, 'ng-template', null, ['foo', ''], ɵɵtemplateRefExtractor); + ɵɵelement(2, 'structural-comp'); } if (rf & RenderFlags.Update) { - const foo = Δreference(1) as any; - ΔelementProperty(2, 'tmp', Δbind(foo)); + const foo = ɵɵreference(1) as any; + ɵɵelementProperty(2, 'tmp', ɵɵbind(foo)); } }, 3, 1, [StructuralComp]); @@ -933,16 +933,16 @@ describe('change detection', () => { class MyApp { constructor(public cdr: ChangeDetectorRef) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, selectors: [['my-app']], - factory: () => new MyApp(ΔdirectiveInject(ChangeDetectorRef as any)), + factory: () => new MyApp(ɵɵdirectiveInject(ChangeDetectorRef as any)), consts: 1, vars: 0, /** */ template: (rf: RenderFlags, ctx: MyApp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'detached-comp'); + ɵɵelement(0, 'detached-comp'); } }, directives: () => [DetachedComp] @@ -957,19 +957,19 @@ describe('change detection', () => { ngDoCheck() { this.doCheckCount++; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: DetachedComp, selectors: [['detached-comp']], - factory: () => comp = new DetachedComp(ΔdirectiveInject(ChangeDetectorRef as any)), + factory: () => comp = new DetachedComp(ɵɵdirectiveInject(ChangeDetectorRef as any)), consts: 1, vars: 1, /** {{ value }} */ template: (rf: RenderFlags, ctx: DetachedComp) => { if (rf & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.value)); + ɵɵtextBinding(0, ɵɵbind(ctx.value)); } } }); @@ -1058,19 +1058,19 @@ describe('change detection', () => { constructor(public cdr: ChangeDetectorRef) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: OnPushComp, selectors: [['on-push-comp']], - factory: () => onPushComp = new OnPushComp(ΔdirectiveInject(ChangeDetectorRef as any)), + factory: () => onPushComp = new OnPushComp(ɵɵdirectiveInject(ChangeDetectorRef as any)), consts: 1, vars: 1, /** {{ value }} */ template: (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.value)); + ɵɵtextBinding(0, ɵɵbind(ctx.value)); } }, changeDetection: ChangeDetectionStrategy.OnPush, @@ -1081,10 +1081,10 @@ describe('change detection', () => { /** */ const OnPushApp = createComponent('on-push-app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'on-push-comp'); + ɵɵelement(0, 'on-push-comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'value', Δbind(ctx.value)); + ɵɵelementProperty(0, 'value', ɵɵbind(ctx.value)); } }, 1, 1, [OnPushComp]); @@ -1119,19 +1119,19 @@ describe('change detection', () => { ngDoCheck() { this.doCheckCount++; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: OnPushComp, selectors: [['on-push-comp']], - factory: () => comp = new OnPushComp(ΔdirectiveInject(ChangeDetectorRef as any)), + factory: () => comp = new OnPushComp(ɵɵdirectiveInject(ChangeDetectorRef as any)), consts: 1, vars: 1, /** {{ value }} */ template: (rf: RenderFlags, ctx: OnPushComp) => { if (rf & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.value)); + ɵɵtextBinding(0, ɵɵbind(ctx.value)); } }, changeDetection: ChangeDetectionStrategy.OnPush @@ -1141,7 +1141,7 @@ describe('change detection', () => { class OnPushParent { value = 'one'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: OnPushParent, selectors: [['on-push-parent']], factory: () => new OnPushParent(), @@ -1153,11 +1153,11 @@ describe('change detection', () => { */ template: (rf: RenderFlags, ctx: OnPushParent) => { if (rf & RenderFlags.Create) { - Δtext(0); - Δelement(1, 'on-push-comp'); + ɵɵtext(0); + ɵɵelement(1, 'on-push-comp'); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δinterpolation1('', ctx.value, ' - ')); + ɵɵtextBinding(0, ɵɵinterpolation1('', ctx.value, ' - ')); } }, directives: () => [OnPushComp], @@ -1213,7 +1213,7 @@ describe('change detection', () => { value = 'one'; showing = true; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: EmbeddedViewParent, selectors: [['embedded-view-parent']], factory: () => new EmbeddedViewParent(), @@ -1227,22 +1227,22 @@ describe('change detection', () => { */ template: (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δtext(0); - Δcontainer(1); + ɵɵtext(0); + ɵɵcontainer(1); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δinterpolation1('', ctx.value, ' - ')); - ΔcontainerRefreshStart(1); + ɵɵtextBinding(0, ɵɵinterpolation1('', ctx.value, ' - ')); + ɵɵcontainerRefreshStart(1); { if (ctx.showing) { - let rf0 = ΔembeddedViewStart(0, 1, 0); + let rf0 = ɵɵembeddedViewStart(0, 1, 0); if (rf0 & RenderFlags.Create) { - Δelement(0, 'on-push-comp'); + ɵɵelement(0, 'on-push-comp'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, directives: () => [OnPushComp], @@ -1293,18 +1293,18 @@ describe('change detection', () => { constructor(public cdr: ChangeDetectorRef) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: NoChangesComp, selectors: [['no-changes-comp']], - factory: () => comp = new NoChangesComp(ΔdirectiveInject(ChangeDetectorRef as any)), + factory: () => comp = new NoChangesComp(ɵɵdirectiveInject(ChangeDetectorRef as any)), consts: 1, vars: 1, template: (rf: RenderFlags, ctx: NoChangesComp) => { if (rf & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.value)); + ɵɵtextBinding(0, ɵɵbind(ctx.value)); } } }); @@ -1315,10 +1315,10 @@ describe('change detection', () => { constructor(public cdr: ChangeDetectorRef) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: AppComp, selectors: [['app-comp']], - factory: () => new AppComp(ΔdirectiveInject(ChangeDetectorRef as any)), + factory: () => new AppComp(ɵɵdirectiveInject(ChangeDetectorRef as any)), consts: 2, vars: 1, /** @@ -1327,11 +1327,11 @@ describe('change detection', () => { */ template: (rf: RenderFlags, ctx: AppComp) => { if (rf & RenderFlags.Create) { - Δtext(0); - Δelement(1, 'no-changes-comp'); + ɵɵtext(0); + ɵɵelement(1, 'no-changes-comp'); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δinterpolation1('', ctx.value, ' - ')); + ɵɵtextBinding(0, ɵɵinterpolation1('', ctx.value, ' - ')); } }, directives: () => [NoChangesComp] @@ -1378,10 +1378,10 @@ describe('change detection', () => { constructor(public cdr: ChangeDetectorRef) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: EmbeddedViewApp, selectors: [['embedded-view-app']], - factory: () => new EmbeddedViewApp(ΔdirectiveInject(ChangeDetectorRef as any)), + factory: () => new EmbeddedViewApp(ɵɵdirectiveInject(ChangeDetectorRef as any)), consts: 1, vars: 0, /** @@ -1391,23 +1391,23 @@ describe('change detection', () => { */ template: (rf: RenderFlags, ctx: EmbeddedViewApp) => { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.showing) { - let rf0 = ΔembeddedViewStart(0, 1, 1); + let rf0 = ɵɵembeddedViewStart(0, 1, 1); if (rf0 & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf0 & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.value)); + ɵɵtextBinding(0, ɵɵbind(ctx.value)); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } }); @@ -1463,7 +1463,7 @@ describe('change detection', () => { return 'works'; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComponent, selectors: [['my-comp']], factory: () => new MyComponent(), @@ -1471,10 +1471,10 @@ describe('change detection', () => { vars: 1, template: (rf: RenderFlags, ctx: MyComponent) => { if (rf & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.value)); + ɵɵtextBinding(0, ɵɵbind(ctx.value)); } } }); diff --git a/packages/core/test/render3/common_integration_spec.ts b/packages/core/test/render3/common_integration_spec.ts index 67ed632411..029c154027 100644 --- a/packages/core/test/render3/common_integration_spec.ts +++ b/packages/core/test/render3/common_integration_spec.ts @@ -8,10 +8,10 @@ import {NgForOfContext} from '@angular/common'; -import {AttributeMarker, ΔdefineComponent, Δelement, ΔgetCurrentView, ΔtemplateRefExtractor} from '../../src/render3/index'; -import {Δbind, ΔelementContainerEnd, ΔelementContainerStart, ΔelementEnd, ΔelementProperty, ΔelementStart, Δinterpolation1, Δinterpolation2, Δinterpolation3, ΔinterpolationV, Δlistener, Δload, ΔnextContext, Δreference, Δtemplate, Δtext, ΔtextBinding} from '../../src/render3/instructions/all'; +import {AttributeMarker, ɵɵdefineComponent, ɵɵelement, ɵɵgetCurrentView, ɵɵtemplateRefExtractor} from '../../src/render3/index'; +import {ɵɵbind, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵinterpolation1, ɵɵinterpolation2, ɵɵinterpolation3, ɵɵinterpolationV, ɵɵlistener, ɵɵload, ɵɵnextContext, ɵɵreference, ɵɵtemplate, ɵɵtext, ɵɵtextBinding} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; -import {ΔrestoreView} from '../../src/render3/state'; +import {ɵɵrestoreView} from '../../src/render3/state'; import {NgForOf, NgIf, NgTemplateOutlet} from './common_with_def'; import {ComponentFixture, createDirective, getDirectiveOnNode} from './render_util'; @@ -22,20 +22,20 @@ describe('@angular/common integration', () => { it('should update a loop', () => { function liTemplate(rf: RenderFlags, ctx: NgForOfContext) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'li'); - { Δtext(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'li'); + { ɵɵtext(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { const item = ctx.$implicit; - ΔtextBinding(1, Δbind(item)); + ɵɵtextBinding(1, ɵɵbind(item)); } } class MyApp { items: string[] = ['first', 'second']; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, factory: () => new MyApp(), selectors: [['my-app']], @@ -46,15 +46,15 @@ describe('@angular/common integration', () => { // template: (rf: RenderFlags, ctx: MyApp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'ul'); + ɵɵelementStart(0, 'ul'); { - Δtemplate( + ɵɵtemplate( 1, liTemplate, 2, 1, 'li', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(1, 'ngForOf', Δbind(ctx.items)); + ɵɵelementProperty(1, 'ngForOf', ɵɵbind(ctx.items)); } }, directives: () => [NgForOf] @@ -87,20 +87,20 @@ describe('@angular/common integration', () => { it('should support ngForOf context variables', () => { function liTemplate(rf: RenderFlags, ctx: NgForOfContext) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'li'); - { Δtext(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'li'); + { ɵɵtext(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { const item = ctx.$implicit; - ΔtextBinding(1, Δinterpolation3('', ctx.index, ' of ', ctx.count, ': ', item, '')); + ɵɵtextBinding(1, ɵɵinterpolation3('', ctx.index, ' of ', ctx.count, ': ', item, '')); } } class MyApp { items: string[] = ['first', 'second']; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, factory: () => new MyApp(), selectors: [['my-app']], @@ -112,15 +112,15 @@ describe('@angular/common integration', () => { // template: (rf: RenderFlags, ctx: MyApp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'ul'); + ɵɵelementStart(0, 'ul'); { - Δtemplate( + ɵɵtemplate( 1, liTemplate, 2, 3, 'li', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(1, 'ngForOf', Δbind(ctx.items)); + ɵɵelementProperty(1, 'ngForOf', ɵɵbind(ctx.items)); } }, @@ -143,7 +143,7 @@ describe('@angular/common integration', () => { const Dir = createDirective('dir'); class Comp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Comp, selectors: [['comp']], factory: () => new Comp(), @@ -151,9 +151,9 @@ describe('@angular/common integration', () => { vars: 0, template: (rf: RenderFlags, cmp: Comp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['dir', '']); - { Δtext(1, 'comp text'); } - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['dir', '']); + { ɵɵtext(1, 'comp text'); } + ɵɵelementEnd(); // testing only dirs.push(getDirectiveOnNode(0)); } @@ -164,7 +164,7 @@ describe('@angular/common integration', () => { function ngForTemplate(rf: RenderFlags, ctx: NgForOfContext) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } } @@ -172,7 +172,7 @@ describe('@angular/common integration', () => { class MyApp { rows: string[] = ['first', 'second']; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, factory: () => new MyApp(), selectors: [['my-app']], @@ -180,11 +180,11 @@ describe('@angular/common integration', () => { vars: 1, template: (rf: RenderFlags, ctx: MyApp) => { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, ngForTemplate, 1, 0, 'comp', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'ngForOf', Δbind(ctx.rows)); + ɵɵelementProperty(0, 'ngForOf', ɵɵbind(ctx.rows)); } }, directives: () => [NgForOf, Comp, Dir] @@ -212,13 +212,13 @@ describe('@angular/common integration', () => { function liTemplate(rf: RenderFlags, ctx: NgForOfContext) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'li'); - { Δtext(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'li'); + { ɵɵtext(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { const item = ctx.$implicit; - ΔtextBinding(1, Δinterpolation1('', item, '')); + ɵɵtextBinding(1, ɵɵinterpolation1('', item, '')); } } @@ -234,7 +234,7 @@ describe('@angular/common integration', () => { } } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, factory: () => new MyApp(), selectors: [['my-app']], @@ -246,21 +246,21 @@ describe('@angular/common integration', () => { // template: (rf: RenderFlags, ctx: MyApp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'button'); + ɵɵelementStart(0, 'button'); { - Δlistener('click', function() { return ctx.toggle(); }); - Δtext(1, 'Toggle List'); + ɵɵlistener('click', function() { return ctx.toggle(); }); + ɵɵtext(1, 'Toggle List'); } - ΔelementEnd(); - ΔelementStart(2, 'ul'); + ɵɵelementEnd(); + ɵɵelementStart(2, 'ul'); { - Δtemplate( + ɵɵtemplate( 3, liTemplate, 2, 1, 'li', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(3, 'ngForOf', Δbind(ctx.items)); + ɵɵelementProperty(3, 'ngForOf', ɵɵbind(ctx.items)); } }, @@ -302,7 +302,7 @@ describe('@angular/common integration', () => { class MyApp { items: any[] = [{data: ['1', '2'], value: 'first'}, {data: ['3', '4'], value: 'second'}]; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, factory: () => new MyApp(), selectors: [['my-app']], @@ -310,15 +310,15 @@ describe('@angular/common integration', () => { vars: 1, template: (rf: RenderFlags, ctx: MyApp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'ul'); + ɵɵelementStart(0, 'ul'); { - Δtemplate( + ɵɵtemplate( 1, liTemplate, 2, 1, 'li', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(1, 'ngForOf', Δbind(ctx.items)); + ɵɵelementProperty(1, 'ngForOf', ɵɵbind(ctx.items)); } }, @@ -328,30 +328,31 @@ describe('@angular/common integration', () => { function liTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'li'); + ɵɵelementStart(0, 'li'); { - Δtemplate( + ɵɵtemplate( 1, spanTemplate, 2, 3, 'span', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { const row = ctx.$implicit as any; - ΔelementProperty(1, 'ngForOf', Δbind(row.data)); + ɵɵelementProperty(1, 'ngForOf', ɵɵbind(row.data)); } } function spanTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span'); - { Δtext(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'span'); + { ɵɵtext(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { const cell = ctx.$implicit; - const row = ΔnextContext().$implicit as any; - const app = ΔnextContext() as any; - ΔtextBinding(1, Δinterpolation3('', cell, ' - ', row.value, ' - ', app.items.length, '')); + const row = ɵɵnextContext().$implicit as any; + const app = ɵɵnextContext() as any; + ɵɵtextBinding( + 1, ɵɵinterpolation3('', cell, ' - ', row.value, ' - ', app.items.length, '')); } } @@ -399,7 +400,7 @@ describe('@angular/common integration', () => { onClick(value: string, name: string) { this.events.push(value, name); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, factory: () => new MyApp(), selectors: [['my-app']], @@ -407,11 +408,11 @@ describe('@angular/common integration', () => { vars: 1, template: (rf: RenderFlags, ctx: MyApp) => { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, divTemplate, 2, 1, 'div', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'ngForOf', Δbind(ctx.items)); + ɵɵelementProperty(0, 'ngForOf', ɵɵbind(ctx.items)); } }, @@ -421,39 +422,39 @@ describe('@angular/common integration', () => { function divTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - { Δtemplate(1, pTemplate, 3, 2, 'p', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵtemplate(1, pTemplate, 3, 2, 'p', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { const row = ctx.$implicit as any; - ΔelementProperty(1, 'ngForOf', Δbind(row.data)); + ɵɵelementProperty(1, 'ngForOf', ɵɵbind(row.data)); } } function pTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - const state = ΔgetCurrentView(); - ΔelementStart(0, 'p'); + const state = ɵɵgetCurrentView(); + ɵɵelementStart(0, 'p'); { - ΔelementStart(1, 'span'); + ɵɵelementStart(1, 'span'); { - Δlistener('click', () => { - ΔrestoreView(state); - const row = ΔnextContext().$implicit as any; - const app = ΔnextContext(); + ɵɵlistener('click', () => { + ɵɵrestoreView(state); + const row = ɵɵnextContext().$implicit as any; + const app = ɵɵnextContext(); app.onClick(row.value, app.name); }); } - ΔelementEnd(); - Δtext(2); + ɵɵelementEnd(); + ɵɵtext(2); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - const row = ΔnextContext().$implicit as any; - const app = ΔnextContext() as any; - ΔtextBinding(2, Δinterpolation2('', row.value, ' - ', app.name, '')); + const row = ɵɵnextContext().$implicit as any; + const app = ɵɵnextContext() as any; + ɵɵtextBinding(2, ɵɵinterpolation2('', row.value, ' - ', app.name, '')); } } @@ -494,7 +495,7 @@ describe('@angular/common integration', () => { [{value: 'two', data: ['3', '4']}] ]; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, factory: () => new MyApp(), selectors: [['my-app']], @@ -502,11 +503,11 @@ describe('@angular/common integration', () => { vars: 1, template: (rf: RenderFlags, ctx: MyApp) => { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, divTemplate, 2, 1, 'div', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'ngForOf', Δbind(ctx.items)); + ɵɵelementProperty(0, 'ngForOf', ɵɵbind(ctx.items)); } }, @@ -516,44 +517,44 @@ describe('@angular/common integration', () => { function divTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); + ɵɵelementStart(0, 'div'); { - Δtemplate( + ɵɵtemplate( 1, innerDivTemplate, 2, 1, 'div', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { const row = ctx.$implicit as any; - ΔelementProperty(1, 'ngForOf', Δbind(row)); + ɵɵelementProperty(1, 'ngForOf', ɵɵbind(row)); } } function innerDivTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); + ɵɵelementStart(0, 'div'); { - Δtemplate( + ɵɵtemplate( 1, spanTemplate, 2, 2, 'span', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { const cell = ctx.$implicit as any; - ΔelementProperty(1, 'ngForOf', Δbind(cell.data)); + ɵɵelementProperty(1, 'ngForOf', ɵɵbind(cell.data)); } } function spanTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span'); - { Δtext(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'span'); + { ɵɵtext(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - const cell = ΔnextContext().$implicit as any; - const app = ΔnextContext(2) as any; - ΔtextBinding(1, Δinterpolation2('', cell.value, ' - ', app.name, '')); + const cell = ɵɵnextContext().$implicit as any; + const app = ɵɵnextContext(2) as any; + ɵɵtextBinding(1, ɵɵinterpolation2('', cell.value, ' - ', app.name, '')); } } @@ -669,7 +670,7 @@ describe('@angular/common integration', () => { } ]; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, factory: () => new MyApp(), selectors: [['my-app']], @@ -677,11 +678,11 @@ describe('@angular/common integration', () => { vars: 1, template: (rf: RenderFlags, ctx: MyApp) => { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, itemTemplate0, 2, 1, 'span', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'ngForOf', Δbind(ctx.items)); + ɵɵelementProperty(0, 'ngForOf', ɵɵbind(ctx.items)); } }, @@ -691,147 +692,147 @@ describe('@angular/common integration', () => { function itemTemplate0(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span'); + ɵɵelementStart(0, 'span'); { - Δtemplate( + ɵɵtemplate( 1, itemTemplate1, 2, 1, 'span', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { const item0 = ctx.$implicit as any; - ΔelementProperty(1, 'ngForOf', Δbind(item0.data)); + ɵɵelementProperty(1, 'ngForOf', ɵɵbind(item0.data)); } } function itemTemplate1(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span'); + ɵɵelementStart(0, 'span'); { - Δtemplate( + ɵɵtemplate( 1, itemTemplate2, 2, 1, 'span', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { const item1 = ctx.$implicit as any; - ΔelementProperty(1, 'ngForOf', Δbind(item1.data)); + ɵɵelementProperty(1, 'ngForOf', ɵɵbind(item1.data)); } } function itemTemplate2(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span'); + ɵɵelementStart(0, 'span'); { - Δtemplate( + ɵɵtemplate( 1, itemTemplate3, 2, 1, 'span', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { const item2 = ctx.$implicit as any; - ΔelementProperty(1, 'ngForOf', Δbind(item2.data)); + ɵɵelementProperty(1, 'ngForOf', ɵɵbind(item2.data)); } } function itemTemplate3(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span'); + ɵɵelementStart(0, 'span'); { - Δtemplate( + ɵɵtemplate( 1, itemTemplate4, 2, 1, 'span', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { const item3 = ctx.$implicit as any; - ΔelementProperty(1, 'ngForOf', Δbind(item3.data)); + ɵɵelementProperty(1, 'ngForOf', ɵɵbind(item3.data)); } } function itemTemplate4(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span'); + ɵɵelementStart(0, 'span'); { - Δtemplate( + ɵɵtemplate( 1, itemTemplate5, 2, 1, 'span', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { const item4 = ctx.$implicit as any; - ΔelementProperty(1, 'ngForOf', Δbind(item4.data)); + ɵɵelementProperty(1, 'ngForOf', ɵɵbind(item4.data)); } } function itemTemplate5(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span'); + ɵɵelementStart(0, 'span'); { - Δtemplate( + ɵɵtemplate( 1, itemTemplate6, 2, 1, 'span', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { const item5 = ctx.$implicit as any; - ΔelementProperty(1, 'ngForOf', Δbind(item5.data)); + ɵɵelementProperty(1, 'ngForOf', ɵɵbind(item5.data)); } } function itemTemplate6(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span'); + ɵɵelementStart(0, 'span'); { - Δtemplate( + ɵɵtemplate( 1, itemTemplate7, 2, 1, 'span', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { const item6 = ctx.$implicit as any; - ΔelementProperty(1, 'ngForOf', Δbind(item6.data)); + ɵɵelementProperty(1, 'ngForOf', ɵɵbind(item6.data)); } } function itemTemplate7(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span'); + ɵɵelementStart(0, 'span'); { - Δtemplate( + ɵɵtemplate( 1, itemTemplate8, 2, 10, 'span', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { const item7 = ctx.$implicit as any; - ΔelementProperty(1, 'ngForOf', Δbind(item7.data)); + ɵɵelementProperty(1, 'ngForOf', ɵɵbind(item7.data)); } } function itemTemplate8(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span'); - { Δtext(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'span'); + { ɵɵtext(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { const value = ctx.$implicit; - const item7 = ΔnextContext().$implicit; - const item6 = ΔnextContext().$implicit; - const item5 = ΔnextContext().$implicit; - const item4 = ΔnextContext().$implicit; - const item3 = ΔnextContext().$implicit; - const item2 = ΔnextContext().$implicit; - const item1 = ΔnextContext().$implicit; - const item0 = ΔnextContext().$implicit; - const myApp = ΔnextContext(); - ΔtextBinding(1, ΔinterpolationV([ - '', value, '.', item7.value, '.', item6.value, '.', item5.value, - '.', item4.value, '.', item3.value, '.', item2.value, '.', item1.value, - '.', item0.value, '.', myApp.value, '' - ])); + const item7 = ɵɵnextContext().$implicit; + const item6 = ɵɵnextContext().$implicit; + const item5 = ɵɵnextContext().$implicit; + const item4 = ɵɵnextContext().$implicit; + const item3 = ɵɵnextContext().$implicit; + const item2 = ɵɵnextContext().$implicit; + const item1 = ɵɵnextContext().$implicit; + const item0 = ɵɵnextContext().$implicit; + const myApp = ɵɵnextContext(); + ɵɵtextBinding(1, ɵɵinterpolationV([ + '', value, '.', item7.value, '.', item6.value, '.', item5.value, + '.', item4.value, '.', item3.value, '.', item2.value, '.', item1.value, + '.', item0.value, '.', myApp.value, '' + ])); } } @@ -858,7 +859,7 @@ describe('@angular/common integration', () => { valueOne = 'one'; valueTwo = 'two'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, factory: () => new MyApp(), selectors: [['my-app']], @@ -870,12 +871,12 @@ describe('@angular/common integration', () => { */ template: (rf: RenderFlags, ctx: MyApp) => { if (rf & RenderFlags.Create) { - Δtemplate(0, templateOne, 2, 1, 'div', [AttributeMarker.Template, 'ngIf']); - Δtemplate(1, templateTwo, 2, 1, 'div', [AttributeMarker.Template, 'ngIf']); + ɵɵtemplate(0, templateOne, 2, 1, 'div', [AttributeMarker.Template, 'ngIf']); + ɵɵtemplate(1, templateTwo, 2, 1, 'div', [AttributeMarker.Template, 'ngIf']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'ngIf', Δbind(ctx.showing)); - ΔelementProperty(1, 'ngIf', Δbind(ctx.showing)); + ɵɵelementProperty(0, 'ngIf', ɵɵbind(ctx.showing)); + ɵɵelementProperty(1, 'ngIf', ɵɵbind(ctx.showing)); } }, @@ -885,25 +886,25 @@ describe('@angular/common integration', () => { function templateOne(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - { Δtext(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵtext(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - const myApp = ΔnextContext(); - ΔtextBinding(1, Δbind(myApp.valueOne)); + const myApp = ɵɵnextContext(); + ɵɵtextBinding(1, ɵɵbind(myApp.valueOne)); } } function templateTwo(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - { Δtext(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵtext(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - const myApp = ΔnextContext(); - ΔtextBinding(1, Δbind(myApp.valueTwo)); + const myApp = ɵɵnextContext(); + ɵɵtextBinding(1, ɵɵbind(myApp.valueTwo)); } } @@ -932,7 +933,7 @@ describe('@angular/common integration', () => { innerShowing = true; name = 'App name'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: AppComponent, factory: () => new AppComponent(), selectors: [['my-app']], @@ -940,10 +941,10 @@ describe('@angular/common integration', () => { vars: 1, template: (rf: RenderFlags, ctx: AppComponent) => { if (rf & RenderFlags.Create) { - Δtemplate(0, divTemplate, 2, 1, 'div', [AttributeMarker.Template, 'ngIf']); + ɵɵtemplate(0, divTemplate, 2, 1, 'div', [AttributeMarker.Template, 'ngIf']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'ngIf', Δbind(ctx.showing)); + ɵɵelementProperty(0, 'ngIf', ɵɵbind(ctx.showing)); } }, @@ -953,37 +954,37 @@ describe('@angular/common integration', () => { function divTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - { Δtemplate(1, outerDivTemplate, 2, 1, 'div', [AttributeMarker.Template, 'ngIf']); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵtemplate(1, outerDivTemplate, 2, 1, 'div', [AttributeMarker.Template, 'ngIf']); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - const app = ΔnextContext(); - ΔelementProperty(1, 'ngIf', Δbind(app.outerShowing)); + const app = ɵɵnextContext(); + ɵɵelementProperty(1, 'ngIf', ɵɵbind(app.outerShowing)); } } function outerDivTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - { Δtemplate(1, innerDivTemplate, 2, 1, 'div', [AttributeMarker.Template, 'ngIf']); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵtemplate(1, innerDivTemplate, 2, 1, 'div', [AttributeMarker.Template, 'ngIf']); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - const app = ΔnextContext(2); - ΔelementProperty(1, 'ngIf', Δbind(app.innerShowing)); + const app = ɵɵnextContext(2); + ɵɵelementProperty(1, 'ngIf', ɵɵbind(app.innerShowing)); } } function innerDivTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - { Δtext(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵtext(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - const app = ΔnextContext(3); - ΔtextBinding(1, Δbind(app.name)); + const app = ɵɵnextContext(3); + ɵɵtextBinding(1, ɵɵbind(app.name)); } } @@ -1003,7 +1004,7 @@ describe('@angular/common integration', () => { class MyApp { showing = false; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, factory: () => new MyApp(), selectors: [['my-app']], @@ -1015,17 +1016,17 @@ describe('@angular/common integration', () => { */ template: (rf: RenderFlags, myApp: MyApp) => { if (rf & RenderFlags.Create) { - Δtemplate(0, (rf1: RenderFlags) => { + ɵɵtemplate(0, (rf1: RenderFlags) => { if (rf1 & RenderFlags.Create) { - Δtext(0, 'from tpl'); + ɵɵtext(0, 'from tpl'); } - }, 1, 0, 'ng-template', undefined, ['tpl', ''], ΔtemplateRefExtractor); - Δtemplate( + }, 1, 0, 'ng-template', undefined, ['tpl', ''], ɵɵtemplateRefExtractor); + ɵɵtemplate( 2, null, 0, 0, 'ng-template', [AttributeMarker.Bindings, 'ngTemplateOutlet']); } if (rf & RenderFlags.Update) { - const tplRef = Δload(1); - ΔelementProperty(2, 'ngTemplateOutlet', Δbind(myApp.showing ? tplRef : null)); + const tplRef = ɵɵload(1); + ɵɵelementProperty(2, 'ngTemplateOutlet', ɵɵbind(myApp.showing ? tplRef : null)); } }, directives: () => [NgTemplateOutlet] @@ -1047,7 +1048,7 @@ describe('@angular/common integration', () => { it('should allow usage on ng-container', () => { class MyApp { showing = false; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, factory: () => new MyApp(), selectors: [['my-app']], @@ -1059,17 +1060,17 @@ describe('@angular/common integration', () => { */ template: (rf: RenderFlags, myApp: MyApp) => { if (rf & RenderFlags.Create) { - Δtemplate(0, (rf1: RenderFlags) => { + ɵɵtemplate(0, (rf1: RenderFlags) => { if (rf1 & RenderFlags.Create) { - Δtext(0, 'from tpl'); + ɵɵtext(0, 'from tpl'); } - }, 1, 0, 'ng-template', undefined, ['tpl', ''], ΔtemplateRefExtractor); - ΔelementContainerStart(2, [AttributeMarker.Bindings, 'ngTemplateOutlet']); - ΔelementContainerEnd(); + }, 1, 0, 'ng-template', undefined, ['tpl', ''], ɵɵtemplateRefExtractor); + ɵɵelementContainerStart(2, [AttributeMarker.Bindings, 'ngTemplateOutlet']); + ɵɵelementContainerEnd(); } if (rf & RenderFlags.Update) { - const tplRef = Δreference(1); - ΔelementProperty(2, 'ngTemplateOutlet', Δbind(myApp.showing ? tplRef : null)); + const tplRef = ɵɵreference(1); + ɵɵelementProperty(2, 'ngTemplateOutlet', ɵɵbind(myApp.showing ? tplRef : null)); } }, directives: () => [NgTemplateOutlet] diff --git a/packages/core/test/render3/common_with_def.ts b/packages/core/test/render3/common_with_def.ts index c3cd705134..6e08c7ef43 100644 --- a/packages/core/test/render3/common_with_def.ts +++ b/packages/core/test/render3/common_with_def.ts @@ -9,18 +9,18 @@ import {NgForOf as NgForOfDef, NgIf as NgIfDef, NgTemplateOutlet as NgTemplateOutletDef} from '@angular/common'; import {IterableDiffers, TemplateRef, ViewContainerRef} from '@angular/core'; -import {DirectiveType, ΔNgOnChangesFeature, ΔdefineDirective, ΔdirectiveInject} from '../../src/render3/index'; +import {DirectiveType, ɵɵNgOnChangesFeature, ɵɵdefineDirective, ɵɵdirectiveInject} from '../../src/render3/index'; export const NgForOf: DirectiveType> = NgForOfDef as any; export const NgIf: DirectiveType = NgIfDef as any; export const NgTemplateOutlet: DirectiveType = NgTemplateOutletDef as any; -NgForOf.ngDirectiveDef = ΔdefineDirective({ +NgForOf.ngDirectiveDef = ɵɵdefineDirective({ type: NgForOfDef, selectors: [['', 'ngForOf', '']], factory: () => new NgForOfDef( - ΔdirectiveInject(ViewContainerRef as any), ΔdirectiveInject(TemplateRef as any), - ΔdirectiveInject(IterableDiffers)), + ɵɵdirectiveInject(ViewContainerRef as any), ɵɵdirectiveInject(TemplateRef as any), + ɵɵdirectiveInject(IterableDiffers)), inputs: { ngForOf: 'ngForOf', ngForTrackBy: 'ngForTrackBy', @@ -28,19 +28,19 @@ NgForOf.ngDirectiveDef = ΔdefineDirective({ } }); -(NgIf as any).ngDirectiveDef = ΔdefineDirective({ +(NgIf as any).ngDirectiveDef = ɵɵdefineDirective({ type: NgIfDef, selectors: [['', 'ngIf', '']], factory: () => new NgIfDef( - ΔdirectiveInject(ViewContainerRef as any), ΔdirectiveInject(TemplateRef as any)), + ɵɵdirectiveInject(ViewContainerRef as any), ɵɵdirectiveInject(TemplateRef as any)), inputs: {ngIf: 'ngIf', ngIfThen: 'ngIfThen', ngIfElse: 'ngIfElse'} }); -(NgTemplateOutlet as any).ngDirectiveDef = ΔdefineDirective({ +(NgTemplateOutlet as any).ngDirectiveDef = ɵɵdefineDirective({ type: NgTemplateOutletDef, selectors: [['', 'ngTemplateOutlet', '']], - factory: () => new NgTemplateOutletDef(ΔdirectiveInject(ViewContainerRef as any)), - features: [ΔNgOnChangesFeature()], + factory: () => new NgTemplateOutletDef(ɵɵdirectiveInject(ViewContainerRef as any)), + features: [ɵɵNgOnChangesFeature()], inputs: {ngTemplateOutlet: 'ngTemplateOutlet', ngTemplateOutletContext: 'ngTemplateOutletContext'} }); diff --git a/packages/core/test/render3/component_ref_spec.ts b/packages/core/test/render3/component_ref_spec.ts index bb414547ca..9af77d2d46 100644 --- a/packages/core/test/render3/component_ref_spec.ts +++ b/packages/core/test/render3/component_ref_spec.ts @@ -10,7 +10,7 @@ import {Injector, NgModuleRef, ViewEncapsulation} from '../../src/core'; import {ComponentFactory} from '../../src/linker/component_factory'; import {RendererFactory2} from '../../src/render/api'; import {injectComponentFactoryResolver} from '../../src/render3/component_ref'; -import {ΔdefineComponent} from '../../src/render3/index'; +import {ɵɵdefineComponent} from '../../src/render3/index'; import {domRendererFactory3} from '../../src/render3/interfaces/renderer'; import {Sanitizer} from '../../src/sanitization/security'; @@ -20,7 +20,7 @@ describe('ComponentFactory', () => { describe('constructor()', () => { it('should correctly populate default properties', () => { class TestComponent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: TestComponent, selectors: [['test', 'foo'], ['bar']], consts: 0, @@ -41,7 +41,7 @@ describe('ComponentFactory', () => { it('should correctly populate defined properties', () => { class TestComponent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: TestComponent, encapsulation: ViewEncapsulation.None, selectors: [['test', 'foo'], ['bar']], @@ -89,7 +89,7 @@ describe('ComponentFactory', () => { createRenderer3Spy = spyOn(domRendererFactory3, 'createRenderer').and.callThrough(); class TestComponent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: TestComponent, encapsulation: ViewEncapsulation.None, selectors: [['test']], diff --git a/packages/core/test/render3/component_spec.ts b/packages/core/test/render3/component_spec.ts index bac46be59a..f730ade9db 100644 --- a/packages/core/test/render3/component_spec.ts +++ b/packages/core/test/render3/component_spec.ts @@ -6,10 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ -import {InjectionToken, ViewEncapsulation, ΔdefineInjectable, ΔdefineInjector} from '../../src/core'; +import {InjectionToken, ViewEncapsulation, ɵɵdefineInjectable, ɵɵdefineInjector} from '../../src/core'; import {createInjector} from '../../src/di/r3_injector'; -import {AttributeMarker, ComponentFactory, LifecycleHooksFeature, getRenderedText, markDirty, ΔProvidersFeature, ΔdefineComponent, ΔdirectiveInject, Δtemplate} from '../../src/render3/index'; -import {tick, Δbind, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, Δelement, ΔelementEnd, ΔelementProperty, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, ΔnextContext, Δtext, ΔtextBinding} from '../../src/render3/instructions/all'; +import {AttributeMarker, ComponentFactory, LifecycleHooksFeature, getRenderedText, markDirty, ɵɵProvidersFeature, ɵɵdefineComponent, ɵɵdirectiveInject, ɵɵtemplate} from '../../src/render3/index'; +import {tick, ɵɵbind, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵelement, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵnextContext, ɵɵtext, ɵɵtextBinding} from '../../src/render3/instructions/all'; import {ComponentDef, RenderFlags} from '../../src/render3/interfaces/definition'; import {NgIf} from './common_with_def'; @@ -22,7 +22,7 @@ describe('component', () => { increment() { this.count++; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: CounterComponent, encapsulation: ViewEncapsulation.None, selectors: [['counter']], @@ -30,10 +30,10 @@ describe('component', () => { vars: 1, template: function(rf: RenderFlags, ctx: CounterComponent) { if (rf & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.count)); + ɵɵtextBinding(0, ɵɵbind(ctx.count)); } }, factory: () => new CounterComponent, @@ -65,30 +65,30 @@ describe('component', () => { class MyService { constructor(public value: string) {} static ngInjectableDef = - ΔdefineInjectable({providedIn: 'root', factory: () => new MyService('no-injector')}); + ɵɵdefineInjectable({providedIn: 'root', factory: () => new MyService('no-injector')}); } class MyComponent { constructor(public myService: MyService) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComponent, encapsulation: ViewEncapsulation.None, selectors: [['my-component']], - factory: () => new MyComponent(ΔdirectiveInject(MyService)), + factory: () => new MyComponent(ɵɵdirectiveInject(MyService)), consts: 1, vars: 1, template: function(fs: RenderFlags, ctx: MyComponent) { if (fs & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (fs & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.myService.value)); + ɵɵtextBinding(0, ɵɵbind(ctx.myService.value)); } } }); } class MyModule { - static ngInjectorDef = ΔdefineInjector({ + static ngInjectorDef = ɵɵdefineInjector({ factory: () => new MyModule(), providers: [{provide: MyService, useValue: new MyService('injector')}] }); @@ -113,7 +113,7 @@ describe('component', () => { // @Input name = ''; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Comp, selectors: [['comp']], factory: () => new Comp(), @@ -121,10 +121,10 @@ describe('component', () => { vars: 1, template: (rf: RenderFlags, ctx: Comp) => { if (rf & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.name)); + ɵɵtextBinding(0, ɵɵbind(ctx.name)); } }, inputs: {name: 'name'} @@ -135,10 +135,10 @@ describe('component', () => { // with a very large view const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(4097, 'comp'); + ɵɵelement(4097, 'comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty(4097, 'name', Δbind(ctx.name)); + ɵɵelementProperty(4097, 'name', ɵɵbind(ctx.name)); } }, 4098, 1, [Comp]); @@ -157,16 +157,16 @@ it('should not invoke renderer destroy method for embedded views', () => { function MyComponent_div_Template_2(rf: any, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - Δtext(1, 'Child view'); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵtext(1, 'Child view'); + ɵɵelementEnd(); } } class Comp { visible = true; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Comp, selectors: [['comp']], consts: 3, @@ -182,13 +182,14 @@ it('should not invoke renderer destroy method for embedded views', () => { */ template: function(rf: RenderFlags, ctx: Comp) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - Δtext(1, 'Root view'); - ΔelementEnd(); - Δtemplate(2, MyComponent_div_Template_2, 2, 0, 'div', [AttributeMarker.Template, 'ngIf']); + ɵɵelementStart(0, 'div'); + ɵɵtext(1, 'Root view'); + ɵɵelementEnd(); + ɵɵtemplate( + 2, MyComponent_div_Template_2, 2, 0, 'div', [AttributeMarker.Template, 'ngIf']); } if (rf & RenderFlags.Update) { - ΔelementProperty(2, 'ngIf', Δbind(ctx.visible)); + ɵɵelementProperty(2, 'ngIf', ɵɵbind(ctx.visible)); } } }); @@ -215,32 +216,32 @@ describe('component with a container', () => { function showItems(rf: RenderFlags, ctx: {items: string[]}) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { for (const item of ctx.items) { - const rf0 = ΔembeddedViewStart(0, 1, 1); + const rf0 = ɵɵembeddedViewStart(0, 1, 1); { if (rf0 & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf0 & RenderFlags.Update) { - ΔtextBinding(0, Δbind(item)); + ɵɵtextBinding(0, ɵɵbind(item)); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } class WrapperComponent { // TODO(issue/24571): remove '!'. items !: string[]; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: WrapperComponent, encapsulation: ViewEncapsulation.None, selectors: [['wrapper']], @@ -248,16 +249,16 @@ describe('component with a container', () => { vars: 0, template: function ChildComponentTemplate(rf: RenderFlags, ctx: {items: string[]}) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { - const rf0 = ΔembeddedViewStart(0, 1, 0); + const rf0 = ɵɵembeddedViewStart(0, 1, 0); { showItems(rf0, {items: ctx.items}); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, factory: () => new WrapperComponent, @@ -267,10 +268,10 @@ describe('component with a container', () => { function template(rf: RenderFlags, ctx: {items: string[]}) { if (rf & RenderFlags.Create) { - Δelement(0, 'wrapper'); + ɵɵelement(0, 'wrapper'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'items', Δbind(ctx.items)); + ɵɵelementProperty(0, 'items', ɵɵbind(ctx.items)); } } @@ -290,7 +291,7 @@ describe('component with a container', () => { // root) describe('encapsulation', () => { class WrapperComponent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: WrapperComponent, encapsulation: ViewEncapsulation.None, selectors: [['wrapper']], @@ -298,7 +299,7 @@ describe('encapsulation', () => { vars: 0, template: function(rf: RenderFlags, ctx: WrapperComponent) { if (rf & RenderFlags.Create) { - Δelement(0, 'encapsulated'); + ɵɵelement(0, 'encapsulated'); } }, factory: () => new WrapperComponent, @@ -307,15 +308,15 @@ describe('encapsulation', () => { } class EncapsulatedComponent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: EncapsulatedComponent, selectors: [['encapsulated']], consts: 2, vars: 0, template: function(rf: RenderFlags, ctx: EncapsulatedComponent) { if (rf & RenderFlags.Create) { - Δtext(0, 'foo'); - Δelement(1, 'leaf'); + ɵɵtext(0, 'foo'); + ɵɵelement(1, 'leaf'); } }, factory: () => new EncapsulatedComponent, @@ -327,7 +328,7 @@ describe('encapsulation', () => { } class LeafComponent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: LeafComponent, encapsulation: ViewEncapsulation.None, selectors: [['leaf']], @@ -335,9 +336,9 @@ describe('encapsulation', () => { vars: 0, template: function(rf: RenderFlags, ctx: LeafComponent) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span'); - { Δtext(1, 'bar'); } - ΔelementEnd(); + ɵɵelementStart(0, 'span'); + { ɵɵtext(1, 'bar'); } + ɵɵelementEnd(); } }, factory: () => new LeafComponent, @@ -360,14 +361,14 @@ describe('encapsulation', () => { it('should encapsulate host and children with different attributes', () => { class WrapperComponentWith { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: WrapperComponentWith, selectors: [['wrapper']], consts: 1, vars: 0, template: function(rf: RenderFlags, ctx: WrapperComponentWith) { if (rf & RenderFlags.Create) { - Δelement(0, 'leaf'); + ɵɵelement(0, 'leaf'); } }, factory: () => new WrapperComponentWith, @@ -379,16 +380,16 @@ describe('encapsulation', () => { } class LeafComponentwith { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: LeafComponentwith, selectors: [['leaf']], consts: 2, vars: 0, template: function(rf: RenderFlags, ctx: LeafComponentwith) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span'); - { Δtext(1, 'bar'); } - ΔelementEnd(); + ɵɵelementStart(0, 'span'); + { ɵɵtext(1, 'bar'); } + ɵɵelementEnd(); } }, factory: () => new LeafComponentwith, @@ -438,7 +439,7 @@ describe('recursive components', () => { ngOnDestroy() { events.push('destroy' + this.data.value); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: TreeComponent, encapsulation: ViewEncapsulation.None, selectors: [['tree-comp']], @@ -447,40 +448,40 @@ describe('recursive components', () => { vars: 1, template: (rf: RenderFlags, ctx: TreeComponent) => { if (rf & RenderFlags.Create) { - Δtext(0); - Δcontainer(1); - Δcontainer(2); + ɵɵtext(0); + ɵɵcontainer(1); + ɵɵcontainer(2); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.data.value)); - ΔcontainerRefreshStart(1); + ɵɵtextBinding(0, ɵɵbind(ctx.data.value)); + ɵɵcontainerRefreshStart(1); { if (ctx.data.left != null) { - let rf0 = ΔembeddedViewStart(0, 1, 1); + let rf0 = ɵɵembeddedViewStart(0, 1, 1); if (rf0 & RenderFlags.Create) { - Δelement(0, 'tree-comp'); + ɵɵelement(0, 'tree-comp'); } if (rf0 & RenderFlags.Update) { - ΔelementProperty(0, 'data', Δbind(ctx.data.left)); + ɵɵelementProperty(0, 'data', ɵɵbind(ctx.data.left)); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); - ΔcontainerRefreshStart(2); + ɵɵcontainerRefreshEnd(); + ɵɵcontainerRefreshStart(2); { if (ctx.data.right != null) { - let rf0 = ΔembeddedViewStart(0, 1, 1); + let rf0 = ɵɵembeddedViewStart(0, 1, 1); if (rf0 & RenderFlags.Create) { - Δelement(0, 'tree-comp'); + ɵɵelement(0, 'tree-comp'); } if (rf0 & RenderFlags.Update) { - ΔelementProperty(0, 'data', Δbind(ctx.data.right)); + ɵɵelementProperty(0, 'data', ɵɵbind(ctx.data.right)); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, inputs: {data: 'data'} @@ -502,7 +503,7 @@ describe('recursive components', () => { ngOnDestroy() { events.push('destroy' + this.data.value); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: NgIfTree, encapsulation: ViewEncapsulation.None, selectors: [['ng-if-tree']], @@ -512,18 +513,18 @@ describe('recursive components', () => { template: (rf: RenderFlags, ctx: NgIfTree) => { if (rf & RenderFlags.Create) { - Δtext(0); - Δtemplate( + ɵɵtext(0); + ɵɵtemplate( 1, IfTemplate, 1, 1, 'ng-if-tree', [AttributeMarker.Bindings, 'data', AttributeMarker.Template, 'ngIf']); - Δtemplate( + ɵɵtemplate( 2, IfTemplate2, 1, 1, 'ng-if-tree', [AttributeMarker.Bindings, 'data', AttributeMarker.Template, 'ngIf']); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.data.value)); - ΔelementProperty(1, 'ngIf', Δbind(ctx.data.left)); - ΔelementProperty(2, 'ngIf', Δbind(ctx.data.right)); + ɵɵtextBinding(0, ɵɵbind(ctx.data.value)); + ɵɵelementProperty(1, 'ngIf', ɵɵbind(ctx.data.left)); + ɵɵelementProperty(2, 'ngIf', ɵɵbind(ctx.data.right)); } }, @@ -533,23 +534,23 @@ describe('recursive components', () => { function IfTemplate(rf: RenderFlags, left: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'ng-if-tree'); - ΔelementEnd(); + ɵɵelementStart(0, 'ng-if-tree'); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - const parent = ΔnextContext(); - ΔelementProperty(0, 'data', Δbind(parent.data.left)); + const parent = ɵɵnextContext(); + ɵɵelementProperty(0, 'data', ɵɵbind(parent.data.left)); } } function IfTemplate2(rf: RenderFlags, right: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'ng-if-tree'); - ΔelementEnd(); + ɵɵelementStart(0, 'ng-if-tree'); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - const parent = ΔnextContext(); - ΔelementProperty(0, 'data', Δbind(parent.data.right)); + const parent = ɵɵnextContext(); + ɵɵelementProperty(0, 'data', ɵɵbind(parent.data.right)); } } @@ -582,19 +583,19 @@ describe('recursive components', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); if (!ctx.skipContent) { - const rf0 = ΔembeddedViewStart(0, 1, 0); + const rf0 = ɵɵembeddedViewStart(0, 1, 0); if (rf0 & RenderFlags.Create) { - ΔelementStart(0, 'tree-comp'); - ΔelementEnd(); + ɵɵelementStart(0, 'tree-comp'); + ɵɵelementEnd(); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1, 0, [TreeComponent]); @@ -616,19 +617,19 @@ describe('recursive components', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); if (!ctx.skipContent) { - const rf0 = ΔembeddedViewStart(0, 1, 0); + const rf0 = ɵɵembeddedViewStart(0, 1, 0); if (rf0 & RenderFlags.Create) { - ΔelementStart(0, 'ng-if-tree'); - ΔelementEnd(); + ɵɵelementStart(0, 'ng-if-tree'); + ɵɵelementEnd(); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1, 0, [NgIfTree]); @@ -647,7 +648,7 @@ describe('recursive components', () => { class TestInputsComponent { // TODO(issue/24571): remove '!'. minifiedName !: string; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: TestInputsComponent, encapsulation: ViewEncapsulation.None, selectors: [['test-inputs']], @@ -676,7 +677,7 @@ describe('view destruction', () => { let wasOnDestroyCalled = false; class ComponentWithOnDestroy { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ selectors: [['comp-with-destroy']], type: ComponentWithOnDestroy, consts: 0, @@ -694,7 +695,7 @@ describe('view destruction', () => { // when the view tree is torn down following the destruction of that root view. const ComponentWithChildOnDestroy = createComponent('test-app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'comp-with-destroy'); + ɵɵelement(0, 'comp-with-destroy'); } }, 1, 0, [ComponentWithOnDestroy], [], null, [], []); diff --git a/packages/core/test/render3/content_spec.ts b/packages/core/test/render3/content_spec.ts index bc1a16d478..f2109372eb 100644 --- a/packages/core/test/render3/content_spec.ts +++ b/packages/core/test/render3/content_spec.ts @@ -9,8 +9,8 @@ import {QueryList, TemplateRef, ViewContainerRef} from '@angular/core'; import {SelectorFlags} from '@angular/core/src/render3/interfaces/projection'; -import {AttributeMarker, detectChanges, ΔdefineComponent, ΔdefineDirective, ΔdirectiveInject, ΔloadViewQuery, ΔqueryRefresh, Δreference, ΔtemplateRefExtractor, ΔviewQuery} from '../../src/render3/index'; -import {Δbind, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, Δelement, ΔelementContainerEnd, ΔelementContainerStart, ΔelementEnd, ΔelementProperty, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, Δinterpolation1, Δprojection, ΔprojectionDef, Δtemplate, Δtext, ΔtextBinding} from '../../src/render3/instructions/all'; +import {AttributeMarker, detectChanges, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdirectiveInject, ɵɵloadViewQuery, ɵɵqueryRefresh, ɵɵreference, ɵɵtemplateRefExtractor, ɵɵviewQuery} from '../../src/render3/index'; +import {ɵɵbind, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵelement, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵinterpolation1, ɵɵprojection, ɵɵprojectionDef, ɵɵtemplate, ɵɵtext, ɵɵtextBinding} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; import {NgForOf, NgIf} from './common_with_def'; @@ -24,10 +24,10 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'div'); - { Δprojection(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'div'); + { ɵɵprojection(1); } + ɵɵelementEnd(); } }, 2); @@ -36,9 +36,9 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); - { Δtext(1, 'content'); } - ΔelementEnd(); + ɵɵelementStart(0, 'child'); + { ɵɵtext(1, 'content'); } + ɵɵelementEnd(); } }, 2, 0, [Child]); @@ -50,17 +50,17 @@ describe('content projection', () => { /** */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δprojection(0); + ɵɵprojectionDef(); + ɵɵprojection(0); } }, 1); /** content */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); - { Δtext(1, 'content'); } - ΔelementEnd(); + ɵɵelementStart(0, 'child'); + { ɵɵtext(1, 'content'); } + ɵɵelementEnd(); } }, 2, 0, [Child]); @@ -72,8 +72,8 @@ describe('content projection', () => { /** */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δprojection(0); + ɵɵprojectionDef(); + ɵɵprojection(0); } }, 1); @@ -86,15 +86,15 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - Δtext(1, 'before'); - ΔelementStart(2, 'div'); - { Δtext(3, 'content'); } - ΔelementEnd(); - Δtext(4, 'after'); + ɵɵtext(1, 'before'); + ɵɵelementStart(2, 'div'); + { ɵɵtext(3, 'content'); } + ɵɵelementEnd(); + ɵɵtext(4, 'after'); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 5, 0, [Child]); @@ -106,34 +106,34 @@ describe('content projection', () => { /**
*/ const GrandChild = createComponent('grand-child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'div'); - { Δprojection(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'div'); + { ɵɵprojection(1); } + ɵɵelementEnd(); } }, 2); /** */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'grand-child'); - { Δprojection(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'grand-child'); + { ɵɵprojection(1); } + ɵɵelementEnd(); } }, 2, 0, [GrandChild]); /** HelloWorld! */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - ΔelementStart(1, 'b'); - Δtext(2, 'Hello'); - ΔelementEnd(); - Δtext(3, 'World!'); + ɵɵelementStart(1, 'b'); + ɵɵtext(2, 'Hello'); + ɵɵelementEnd(); + ɵɵtext(3, 'World!'); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 4, 0, [Child]); @@ -147,16 +147,16 @@ describe('content projection', () => { /**
*/ const Child = createComponent('child', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'div'); - { Δprojection(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'div'); + { ɵɵprojection(1); } + ɵɵelementEnd(); } }, 2); const ProjectedComp = createComponent('projected-comp', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δtext(0, 'content'); + ɵɵtext(0, 'content'); } }, 1); @@ -167,9 +167,9 @@ describe('content projection', () => { */ const Parent = createComponent('parent', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); - { Δelement(1, 'projected-comp'); } - ΔelementEnd(); + ɵɵelementStart(0, 'child'); + { ɵɵelement(1, 'projected-comp'); } + ɵɵelementEnd(); } }, 2, 0, [Child, ProjectedComp]); @@ -182,20 +182,20 @@ describe('content projection', () => { /**
*/ const Child = createComponent('child', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'div'); - { Δprojection(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'div'); + { ɵɵprojection(1); } + ɵɵelementEnd(); } }, 2); /**

*/ const ProjectedComp = createComponent('projected-comp', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'p'); - Δprojection(1); - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'p'); + ɵɵprojection(1); + ɵɵelementEnd(); } }, 2); @@ -209,19 +209,19 @@ describe('content projection', () => { */ const Parent = createComponent('parent', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - ΔelementStart(1, 'projected-comp'); + ɵɵelementStart(1, 'projected-comp'); { - ΔelementStart(2, 'div'); - Δtext(3, 'Some content'); - ΔelementEnd(); - Δtext(4, 'Other content'); + ɵɵelementStart(2, 'div'); + ɵɵtext(3, 'Some content'); + ɵɵelementEnd(); + ɵɵtext(4, 'Other content'); } - ΔelementEnd(); + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 5, 0, [Child, ProjectedComp]); @@ -235,10 +235,10 @@ describe('content projection', () => { /**
*/ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'div'); - { Δprojection(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'div'); + { ɵɵprojection(1); } + ɵɵelementEnd(); } }, 2); @@ -253,26 +253,26 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: {value: any}) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - Δtext(1, '('); - Δcontainer(2); - Δtext(3, ')'); + ɵɵtext(1, '('); + ɵɵcontainer(2); + ɵɵtext(3, ')'); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(2); + ɵɵcontainerRefreshStart(2); { if (ctx.value) { - let rf0 = ΔembeddedViewStart(0, 1, 0); + let rf0 = ɵɵembeddedViewStart(0, 1, 0); if (rf0 & RenderFlags.Create) { - Δtext(0, 'content'); + ɵɵtext(0, 'content'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 4, 0, [Child]); @@ -292,8 +292,8 @@ describe('content projection', () => { /** */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δprojection(0); + ɵɵprojectionDef(); + ɵɵprojection(0); } }, 1); @@ -306,22 +306,22 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: {value: any}) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'child'); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { if (ctx.value) { - let rf0 = ΔembeddedViewStart(0, 1, 0); + let rf0 = ɵɵembeddedViewStart(0, 1, 0); if (rf0 & RenderFlags.Create) { - Δtext(0, 'content'); + ɵɵtext(0, 'content'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 2, 0, [Child]); @@ -341,10 +341,10 @@ describe('content projection', () => { /**
*/ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'div'); - { Δprojection(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'div'); + { ɵɵprojection(1); } + ɵɵelementEnd(); } }, 2); @@ -361,31 +361,31 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: {value: any}) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - Δtext(1, '('); - Δcontainer(2); - Δtext(3, ')'); + ɵɵtext(1, '('); + ɵɵcontainer(2); + ɵɵtext(3, ')'); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(2); + ɵɵcontainerRefreshStart(2); { if (ctx.value) { - let rf0 = ΔembeddedViewStart(0, 1, 0); + let rf0 = ɵɵembeddedViewStart(0, 1, 0); if (rf0 & RenderFlags.Create) { - Δtext(0, 'content'); + ɵɵtext(0, 'content'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } else { - if (ΔembeddedViewStart(1, 1, 0)) { - Δtext(0, 'else'); + if (ɵɵembeddedViewStart(1, 1, 0)) { + ɵɵtext(0, 'else'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 4, 0, [Child]); @@ -413,25 +413,25 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'div'); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'div'); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { if (!ctx.skipContent) { - let rf0 = ΔembeddedViewStart(0, 2, 0); + let rf0 = ɵɵembeddedViewStart(0, 2, 0); if (rf0 & RenderFlags.Create) { - ΔelementStart(0, 'span'); - Δprojection(1); - ΔelementEnd(); + ɵɵelementStart(0, 'span'); + ɵɵprojection(1); + ɵɵelementEnd(); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 2, 0); @@ -443,14 +443,14 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - ΔelementStart(1, 'div'); - { Δtext(2, 'text'); } - ΔelementEnd(); - Δtext(3, 'content'); + ɵɵelementStart(1, 'div'); + { ɵɵtext(2, 'text'); } + ɵɵelementEnd(); + ɵɵtext(3, 'content'); } - ΔelementEnd(); + ɵɵelementEnd(); // testing childCmptInstance = getDirectiveOnNode(0); @@ -478,31 +478,31 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'div'); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'div'); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { if (!ctx.skipContent) { - let rf0 = ΔembeddedViewStart(0, 2, 0); + let rf0 = ɵɵembeddedViewStart(0, 2, 0); if (rf0 & RenderFlags.Create) { - Δprojection(0); - Δtext(1, 'text'); + ɵɵprojection(0); + ɵɵtext(1, 'text'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 2); /** */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'child'); + ɵɵelement(0, 'child'); // testing childCmptInstance = getDirectiveOnNode(0); @@ -530,23 +530,23 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'div'); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'div'); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { if (!ctx.skipContent) { - let rf0 = ΔembeddedViewStart(0, 1, 0); + let rf0 = ɵɵembeddedViewStart(0, 1, 0); if (rf0 & RenderFlags.Create) { - Δprojection(0); + ɵɵprojection(0); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 2); @@ -555,12 +555,12 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { childCmptInstance = getDirectiveOnNode(0); - Δtext(1, 'content'); + ɵɵtext(1, 'content'); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 2, 0, [Child]); @@ -584,27 +584,27 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'div'); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'div'); { - Δtext(1, 'Before (inside)-'); - Δcontainer(2); - Δtext(3, '-After (inside)'); + ɵɵtext(1, 'Before (inside)-'); + ɵɵcontainer(2); + ɵɵtext(3, '-After (inside)'); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(2); + ɵɵcontainerRefreshStart(2); { if (!ctx.skipContent) { - let rf0 = ΔembeddedViewStart(0, 1, 0); + let rf0 = ɵɵembeddedViewStart(0, 1, 0); if (rf0 & RenderFlags.Create) { - Δprojection(0); + ɵɵprojection(0); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 4); @@ -619,26 +619,26 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - Δtext(1, 'Before text-'); - Δcontainer(2); - Δtext(3, '-After text'); + ɵɵtext(1, 'Before text-'); + ɵɵcontainer(2); + ɵɵtext(3, '-After text'); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(2); + ɵɵcontainerRefreshStart(2); { if (!ctx.skipContent) { - let rf0 = ΔembeddedViewStart(0, 1, 0); + let rf0 = ɵɵembeddedViewStart(0, 1, 0); if (rf0 & RenderFlags.Create) { - Δtext(0, 'content'); + ɵɵtext(0, 'content'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 4, 0, [Child]); @@ -664,23 +664,23 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'div'); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'div'); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { if (!ctx.skipContent) { - let rf0 = ΔembeddedViewStart(0, 1, 0); + let rf0 = ɵɵembeddedViewStart(0, 1, 0); if (rf0 & RenderFlags.Create) { - Δprojection(0); + ɵɵprojection(0); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 2); @@ -695,27 +695,27 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'child'); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'child'); { - Δtext(1, 'Before text'); - Δcontainer(2); - Δtext(3, '-After text'); + ɵɵtext(1, 'Before text'); + ɵɵcontainer(2); + ɵɵtext(3, '-After text'); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(2); + ɵɵcontainerRefreshStart(2); { if (!ctx.skipContent) { - let rf0 = ΔembeddedViewStart(0, 1, 0); + let rf0 = ɵɵembeddedViewStart(0, 1, 0); if (rf0 & RenderFlags.Create) { - Δprojection(0); + ɵɵprojection(0); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 4, 0, [Child]); @@ -723,13 +723,13 @@ describe('content projection', () => { /**

text

*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'parent'); + ɵɵelementStart(0, 'parent'); { - ΔelementStart(1, 'p'); - { Δtext(2, 'text'); } - ΔelementEnd(); + ɵɵelementStart(1, 'p'); + { ɵɵtext(2, 'text'); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); // testing parent = getDirectiveOnNode(0); } @@ -758,25 +758,25 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'div'); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'div'); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { if (!ctx.skipContent) { - let rf0 = ΔembeddedViewStart(0, 3, 0); + let rf0 = ɵɵembeddedViewStart(0, 3, 0); if (rf0 & RenderFlags.Create) { - Δtext(0, 'before-'); - Δprojection(1); - Δtext(2, '-after'); + ɵɵtext(0, 'before-'); + ɵɵprojection(1); + ɵɵtext(2, '-after'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 2); @@ -785,12 +785,12 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { childCmptInstance = getDirectiveOnNode(0); - Δtext(1, 'content'); + ɵɵtext(1, 'content'); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 2, 0, [Child]); @@ -812,20 +812,20 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δtext(0, 'Before-'); - Δtemplate(1, IfTemplate, 1, 0, 'ng-template', [AttributeMarker.Bindings, 'ngIf']); - Δtext(2, '-After'); + ɵɵprojectionDef(); + ɵɵtext(0, 'Before-'); + ɵɵtemplate(1, IfTemplate, 1, 0, 'ng-template', [AttributeMarker.Bindings, 'ngIf']); + ɵɵtext(2, '-After'); } if (rf & RenderFlags.Update) { - ΔelementProperty(1, 'ngIf', Δbind(ctx.showing)); + ɵɵelementProperty(1, 'ngIf', ɵɵbind(ctx.showing)); } }, 3, 1, [NgIf]); function IfTemplate(rf1: RenderFlags, ctx: any) { if (rf1 & RenderFlags.Create) { - Δprojection(0); + ɵɵprojection(0); } } @@ -838,14 +838,14 @@ describe('content projection', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - ΔelementStart(1, 'div'); - { Δtext(2, 'A'); } - ΔelementEnd(); - Δtext(3, 'Some text'); + ɵɵelementStart(1, 'div'); + { ɵɵtext(2, 'A'); } + ɵɵelementEnd(); + ɵɵtext(3, 'Some text'); } - ΔelementEnd(); + ɵɵelementEnd(); // testing child = getDirectiveOnNode(0); @@ -876,20 +876,20 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δtext(0, 'Before-'); - Δtemplate(1, IfTemplate, 1, 0, 'ng-template', [AttributeMarker.Bindings, 'ngIf']); - Δtext(2, '-After'); + ɵɵprojectionDef(); + ɵɵtext(0, 'Before-'); + ɵɵtemplate(1, IfTemplate, 1, 0, 'ng-template', [AttributeMarker.Bindings, 'ngIf']); + ɵɵtext(2, '-After'); } if (rf & RenderFlags.Update) { - ΔelementProperty(1, 'ngIf', Δbind(ctx.showing)); + ɵɵelementProperty(1, 'ngIf', ɵɵbind(ctx.showing)); } }, 3, 1, [NgIf]); function IfTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δprojection(0); + ɵɵprojection(0); } } @@ -902,14 +902,14 @@ describe('content projection', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - ΔelementStart(1, 'div'); - { Δtext(2, 'A'); } - ΔelementEnd(); - Δtext(3, 'Some text'); + ɵɵelementStart(1, 'div'); + { ɵɵtext(2, 'A'); } + ɵɵelementEnd(); + ɵɵtext(3, 'Some text'); } - ΔelementEnd(); + ɵɵelementEnd(); // testing child = getDirectiveOnNode(0); @@ -941,21 +941,21 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef([[['div']]]); - Δprojection(0); - Δtext(1, 'Before-'); - Δtemplate(2, IfTemplate, 1, 0, 'ng-template', [AttributeMarker.Bindings, 'ngIf']); - Δtext(3, '-After'); + ɵɵprojectionDef([[['div']]]); + ɵɵprojection(0); + ɵɵtext(1, 'Before-'); + ɵɵtemplate(2, IfTemplate, 1, 0, 'ng-template', [AttributeMarker.Bindings, 'ngIf']); + ɵɵtext(3, '-After'); } if (rf & RenderFlags.Update) { - ΔelementProperty(2, 'ngIf', Δbind(ctx.showing)); + ɵɵelementProperty(2, 'ngIf', ɵɵbind(ctx.showing)); } }, 4, 1, [NgIf]); function IfTemplate(rf1: RenderFlags) { if (rf1 & RenderFlags.Create) { - Δprojection(0, 1); + ɵɵprojection(0, 1); } } @@ -968,16 +968,16 @@ describe('content projection', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - ΔelementStart(1, 'div'); - { Δtext(2, 'A'); } - ΔelementEnd(); - ΔelementStart(3, 'span'); - { Δtext(4, 'B'); } - ΔelementEnd(); + ɵɵelementStart(1, 'div'); + { ɵɵtext(2, 'A'); } + ɵɵelementEnd(); + ɵɵelementStart(3, 'span'); + { ɵɵtext(4, 'B'); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); // testing child = getDirectiveOnNode(0); @@ -1004,7 +1004,7 @@ describe('content projection', () => { function NgTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δprojection(0); + ɵɵprojection(0); } } @@ -1017,19 +1017,20 @@ describe('content projection', () => { 'comp', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δtemplate(1, NgTemplate, 1, 0, 'ng-template', null, null, ΔtemplateRefExtractor); + ɵɵprojectionDef(); + ɵɵtemplate(1, NgTemplate, 1, 0, 'ng-template', null, null, ɵɵtemplateRefExtractor); } }, 2, 0, [], [], function(rf: RenderFlags, ctx: any) { /** @ViewChild(TemplateRef) template: TemplateRef */ if (rf & RenderFlags.Create) { - ΔviewQuery(TemplateRef as any, true, null); + ɵɵviewQuery(TemplateRef as any, true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && (ctx.template = tmp.first); + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && + (ctx.template = tmp.first); } }); @@ -1041,10 +1042,10 @@ describe('content projection', () => { open() { this.vcr.createEmbeddedView(this.trigger.template); } - static ngComponentDef = ΔdefineDirective({ + static ngComponentDef = ɵɵdefineDirective({ type: Trigger, selectors: [['', 'trigger', '']], - factory: () => triggerDir = new Trigger(ΔdirectiveInject(ViewContainerRef as any)), + factory: () => triggerDir = new Trigger(ɵɵdirectiveInject(ViewContainerRef as any)), inputs: {trigger: 'trigger'} }); } @@ -1057,14 +1058,14 @@ describe('content projection', () => { */ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'button', [AttributeMarker.Bindings, 'trigger']); - ΔelementStart(1, 'comp', null, ['comp', '']); - { Δtext(3, 'Some content'); } - ΔelementEnd(); + ɵɵelement(0, 'button', [AttributeMarker.Bindings, 'trigger']); + ɵɵelementStart(1, 'comp', null, ['comp', '']); + { ɵɵtext(3, 'Some content'); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - const comp = Δreference(2); - ΔelementProperty(0, 'trigger', Δbind(comp)); + const comp = ɵɵreference(2); + ɵɵelementProperty(0, 'trigger', ɵɵbind(comp)); } }, 4, 1, [Comp, Trigger]); @@ -1082,13 +1083,13 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'div'); - { Δprojection(1); } - ΔelementEnd(); - ΔelementStart(2, 'span'); - { Δprojection(3); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'div'); + { ɵɵprojection(1); } + ɵɵelementEnd(); + ɵɵelementStart(2, 'span'); + { ɵɵprojection(3); } + ɵɵelementEnd(); } }, 4); @@ -1097,9 +1098,9 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); - { Δtext(1, 'content'); } - ΔelementEnd(); + ɵɵelementStart(0, 'child'); + { ɵɵtext(1, 'content'); } + ɵɵelementEnd(); } }, 2, 0, [Child]); @@ -1128,24 +1129,24 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δprojection(0); - ΔelementStart(1, 'div'); - { Δcontainer(2); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵprojection(0); + ɵɵelementStart(1, 'div'); + { ɵɵcontainer(2); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(2); + ɵɵcontainerRefreshStart(2); { if (ctx.show) { - let rf0 = ΔembeddedViewStart(0, 1, 0); + let rf0 = ɵɵembeddedViewStart(0, 1, 0); if (rf0 & RenderFlags.Create) { - Δprojection(0); + ɵɵprojection(0); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 3); @@ -1154,12 +1155,12 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { childCmptInstance = getDirectiveOnNode(0); - Δtext(1, 'content'); + ɵɵtext(1, 'content'); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 2, 0, [Child]); @@ -1182,23 +1183,23 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - { Δtemplate(0, ForTemplate, 3, 1, 'div', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } + ɵɵprojectionDef(); + { ɵɵtemplate(0, ForTemplate, 3, 1, 'div', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'ngForOf', Δbind(items)); + ɵɵelementProperty(0, 'ngForOf', ɵɵbind(items)); } }, 1, 1, [NgForOf]); function ForTemplate(rf1: RenderFlags, ctx: {index: number}) { if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'div'); - Δtext(1); - Δprojection(2); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵtext(1); + ɵɵprojection(2); + ɵɵelementEnd(); } if (rf1 & RenderFlags.Update) { - ΔtextBinding(1, Δinterpolation1('(', ctx.index, '):')); + ɵɵtextBinding(1, ɵɵinterpolation1('(', ctx.index, '):')); } } @@ -1207,9 +1208,9 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); - { Δtext(1, 'content'); } - ΔelementEnd(); + ɵɵelementStart(0, 'child'); + { ɵɵtext(1, 'content'); } + ɵɵelementEnd(); } }, 2, 0, [Child]); @@ -1220,10 +1221,10 @@ describe('content projection', () => { it('should project with multiple instances of a component with projection', () => { const ProjectionComp = createComponent('projection-comp', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δtext(0, 'Before'); - Δprojection(1); - Δtext(2, 'After'); + ɵɵprojectionDef(); + ɵɵtext(0, 'Before'); + ɵɵprojection(1); + ɵɵtext(2, 'After'); } }, 3); @@ -1239,26 +1240,26 @@ describe('content projection', () => { */ const AppComp = createComponent('app-comp', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'projection-comp'); + ɵɵelementStart(0, 'projection-comp'); { - ΔelementStart(1, 'div'); - { Δtext(2, 'A'); } - ΔelementEnd(); - ΔelementStart(3, 'p'); - { Δtext(4, '123'); } - ΔelementEnd(); + ɵɵelementStart(1, 'div'); + { ɵɵtext(2, 'A'); } + ɵɵelementEnd(); + ɵɵelementStart(3, 'p'); + { ɵɵtext(4, '123'); } + ɵɵelementEnd(); } - ΔelementEnd(); - ΔelementStart(5, 'projection-comp'); + ɵɵelementEnd(); + ɵɵelementStart(5, 'projection-comp'); { - ΔelementStart(6, 'div'); - { Δtext(7, 'B'); } - ΔelementEnd(); - ΔelementStart(8, 'p'); - { Δtext(9, '456'); } - ΔelementEnd(); + ɵɵelementStart(6, 'div'); + { ɵɵtext(7, 'B'); } + ɵɵelementEnd(); + ɵɵelementStart(8, 'p'); + { ɵɵtext(9, '456'); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 10, 0, [ProjectionComp]); @@ -1278,10 +1279,10 @@ describe('content projection', () => { */ const ProjectionComp = createComponent('projection-comp', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δtext(0, 'Before'); - Δprojection(1); - Δtext(2, 'After'); + ɵɵprojectionDef(); + ɵɵtext(0, 'Before'); + ɵɵprojection(1); + ɵɵtext(2, 'After'); } }, 3); @@ -1298,28 +1299,28 @@ describe('content projection', () => { */ const ProjectionParent = createComponent('parent-comp', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'projection-comp'); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'projection-comp'); { - ΔelementStart(1, 'div'); - { Δtext(2, 'A'); } - ΔelementEnd(); - Δprojection(3, 0); - ΔelementStart(4, 'p'); - { Δtext(5, '123'); } - ΔelementEnd(); + ɵɵelementStart(1, 'div'); + { ɵɵtext(2, 'A'); } + ɵɵelementEnd(); + ɵɵprojection(3, 0); + ɵɵelementStart(4, 'p'); + { ɵɵtext(5, '123'); } + ɵɵelementEnd(); } - ΔelementEnd(); - ΔelementStart(6, 'projection-comp'); + ɵɵelementEnd(); + ɵɵelementStart(6, 'projection-comp'); { - ΔelementStart(7, 'div'); - { Δtext(8, 'B'); } - ΔelementEnd(); - ΔelementStart(9, 'p'); - { Δtext(10, '456'); } - ΔelementEnd(); + ɵɵelementStart(7, 'div'); + { ɵɵtext(8, 'B'); } + ɵɵelementEnd(); + ɵɵelementStart(9, 'p'); + { ɵɵtext(10, '456'); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 11, 0, [ProjectionComp]); @@ -1333,12 +1334,12 @@ describe('content projection', () => { */ const AppComp = createComponent('app-comp', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'parent-comp'); - { Δtext(1, '**ABC**'); } - ΔelementEnd(); - ΔelementStart(2, 'parent-comp'); - { Δtext(3, '**DEF**'); } - ΔelementEnd(); + ɵɵelementStart(0, 'parent-comp'); + { ɵɵtext(1, '**ABC**'); } + ɵɵelementEnd(); + ɵɵelementStart(2, 'parent-comp'); + { ɵɵtext(3, '**DEF**'); } + ɵɵelementEnd(); } }, 4, 0, [ProjectionParent]); @@ -1359,8 +1360,8 @@ describe('content projection', () => { ``; const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δprojection(0); + ɵɵprojectionDef(); + ɵɵprojection(0); } }, 1); @@ -1373,17 +1374,17 @@ describe('content projection', () => { `; const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - ΔelementContainerStart(1); + ɵɵelementContainerStart(1); { - ΔelementContainerStart(2); - { Δtext(3, 'content'); } - ΔelementContainerEnd(); + ɵɵelementContainerStart(2); + { ɵɵtext(3, 'content'); } + ɵɵelementContainerEnd(); } - ΔelementContainerEnd(); + ɵɵelementContainerEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 4, 0, [Child]); @@ -1396,8 +1397,8 @@ describe('content projection', () => { ``; const GrandChild = createComponent('grand-child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δprojection(0); + ɵɵprojectionDef(); + ɵɵprojection(0); } }, 1); @@ -1406,10 +1407,10 @@ describe('content projection', () => { `; const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'grand-child'); - { Δprojection(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'grand-child'); + { ɵɵprojection(1); } + ɵɵelementEnd(); } }, 2, 0, [GrandChild]); @@ -1422,17 +1423,17 @@ describe('content projection', () => { `; const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - ΔelementContainerStart(1); + ɵɵelementContainerStart(1); { - ΔelementContainerStart(2); - { Δtext(3, 'content'); } - ΔelementContainerEnd(); + ɵɵelementContainerStart(2); + { ɵɵtext(3, 'content'); } + ɵɵelementContainerEnd(); } - ΔelementContainerEnd(); + ɵɵelementContainerEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 4, 0, [Child]); @@ -1444,17 +1445,17 @@ describe('content projection', () => { //
Child content
const NestedComp = createComponent('nested-comp', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - Δtext(1, 'Child content'); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵtext(1, 'Child content'); + ɵɵelementEnd(); } }, 2, 0, []); // const RootComp = createComponent('root-comp', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δprojection(0); + ɵɵprojectionDef(); + ɵɵprojection(0); } }, 1, 0, []); @@ -1465,27 +1466,27 @@ describe('content projection', () => { // function MyApp_ng_container_1_child_comp_1_Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'nested-comp'); + ɵɵelement(0, 'nested-comp'); } } function MyApp_ng_container_1_Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementContainerStart(0); - Δtemplate( + ɵɵelementContainerStart(0); + ɵɵtemplate( 1, MyApp_ng_container_1_child_comp_1_Template, 1, 0, 'nested-comp', [AttributeMarker.Template, 'ngIf']); - ΔelementContainerEnd(); + ɵɵelementContainerEnd(); } if (rf & RenderFlags.Update) { const last_r2 = ctx.last; - ΔelementProperty(1, 'ngIf', Δbind(!last_r2)); + ɵɵelementProperty(1, 'ngIf', ɵɵbind(!last_r2)); } } let myAppInstance: MyApp; class MyApp { items = [1, 2]; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, selectors: [['', 'my-app', '']], factory: () => myAppInstance = new MyApp(), @@ -1493,14 +1494,14 @@ describe('content projection', () => { vars: 1, template: function MyApp_Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'root-comp'); - Δtemplate( + ɵɵelementStart(0, 'root-comp'); + ɵɵtemplate( 1, MyApp_ng_container_1_Template, 2, 1, 'ng-container', [AttributeMarker.Template, 'ngFor', 'ngForOf']); - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(1, 'ngForOf', Δbind(ctx.items)); + ɵɵelementProperty(1, 'ngForOf', ɵɵbind(ctx.items)); } }, directives: [NgForOf, NgIf, NestedComp, RootComp] @@ -1531,13 +1532,13 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef([[['span', 'title', 'toFirst']], [['span', 'title', 'toSecond']]]); - ΔelementStart(0, 'div', ['id', 'first']); - { Δprojection(1, 1); } - ΔelementEnd(); - ΔelementStart(2, 'div', ['id', 'second']); - { Δprojection(3, 2); } - ΔelementEnd(); + ɵɵprojectionDef([[['span', 'title', 'toFirst']], [['span', 'title', 'toSecond']]]); + ɵɵelementStart(0, 'div', ['id', 'first']); + { ɵɵprojection(1, 1); } + ɵɵelementEnd(); + ɵɵelementStart(2, 'div', ['id', 'second']); + { ɵɵprojection(3, 2); } + ɵɵelementEnd(); } }, 4); @@ -1549,16 +1550,16 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - ΔelementStart(1, 'span', ['title', 'toFirst']); - { Δtext(2, '1'); } - ΔelementEnd(); - ΔelementStart(3, 'span', ['title', 'toSecond']); - { Δtext(4, '2'); } - ΔelementEnd(); + ɵɵelementStart(1, 'span', ['title', 'toFirst']); + { ɵɵtext(2, '1'); } + ɵɵelementEnd(); + ɵɵelementStart(3, 'span', ['title', 'toSecond']); + { ɵɵtext(4, '2'); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 5, 0, [Child]); @@ -1575,8 +1576,8 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef([[['', 'title', '']]]); - { Δprojection(0, 1); } + ɵɵprojectionDef([[['', 'title', '']]]); + { ɵɵprojection(0, 1); } } }, 1); @@ -1587,16 +1588,16 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - ΔelementStart(1, 'span', [AttributeMarker.Bindings, 'title']); - { Δtext(2, 'Has title'); } - ΔelementEnd(); + ɵɵelementStart(1, 'span', [AttributeMarker.Bindings, 'title']); + { ɵɵtext(2, 'Has title'); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(1, 'title', Δbind('Some title')); + ɵɵelementProperty(1, 'title', ɵɵbind('Some title')); } }, 3, 1, [Child]); @@ -1612,16 +1613,16 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef([ + ɵɵprojectionDef([ [['span', SelectorFlags.CLASS, 'toFirst']], [['span', SelectorFlags.CLASS, 'toSecond']] ]); - ΔelementStart(0, 'div', ['id', 'first']); - { Δprojection(1, 1); } - ΔelementEnd(); - ΔelementStart(2, 'div', ['id', 'second']); - { Δprojection(3, 2); } - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['id', 'first']); + { ɵɵprojection(1, 1); } + ɵɵelementEnd(); + ɵɵelementStart(2, 'div', ['id', 'second']); + { ɵɵprojection(3, 2); } + ɵɵelementEnd(); } }, 4); @@ -1633,16 +1634,16 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - ΔelementStart(1, 'span', ['class', 'toFirst']); - { Δtext(2, '1'); } - ΔelementEnd(); - ΔelementStart(3, 'span', ['class', 'toSecond']); - { Δtext(4, '2'); } - ΔelementEnd(); + ɵɵelementStart(1, 'span', ['class', 'toFirst']); + { ɵɵtext(2, '1'); } + ɵɵelementEnd(); + ɵɵelementStart(3, 'span', ['class', 'toSecond']); + { ɵɵtext(4, '2'); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 5, 0, [Child]); @@ -1659,16 +1660,16 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef([ + ɵɵprojectionDef([ [['span', SelectorFlags.CLASS, 'toFirst']], [['span', SelectorFlags.CLASS, 'toSecond']] ]); - ΔelementStart(0, 'div', ['id', 'first']); - { Δprojection(1, 1); } - ΔelementEnd(); - ΔelementStart(2, 'div', ['id', 'second']); - { Δprojection(3, 2); } - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['id', 'first']); + { ɵɵprojection(1, 1); } + ɵɵelementEnd(); + ɵɵelementStart(2, 'div', ['id', 'second']); + { ɵɵprojection(3, 2); } + ɵɵelementEnd(); } }, 4); @@ -1680,16 +1681,16 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - ΔelementStart(1, 'span', ['class', 'other toFirst']); - { Δtext(2, '1'); } - ΔelementEnd(); - ΔelementStart(3, 'span', ['class', 'toSecond noise']); - { Δtext(4, '2'); } - ΔelementEnd(); + ɵɵelementStart(1, 'span', ['class', 'other toFirst']); + { ɵɵtext(2, '1'); } + ɵɵelementEnd(); + ɵɵelementStart(3, 'span', ['class', 'toSecond noise']); + { ɵɵtext(4, '2'); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 5, 0, [Child]); @@ -1706,13 +1707,13 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef([[['span']], [['span', SelectorFlags.CLASS, 'toSecond']]]); - ΔelementStart(0, 'div', ['id', 'first']); - { Δprojection(1, 1); } - ΔelementEnd(); - ΔelementStart(2, 'div', ['id', 'second']); - { Δprojection(3, 2); } - ΔelementEnd(); + ɵɵprojectionDef([[['span']], [['span', SelectorFlags.CLASS, 'toSecond']]]); + ɵɵelementStart(0, 'div', ['id', 'first']); + { ɵɵprojection(1, 1); } + ɵɵelementEnd(); + ɵɵelementStart(2, 'div', ['id', 'second']); + { ɵɵprojection(3, 2); } + ɵɵelementEnd(); } }, 4); @@ -1724,16 +1725,16 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - ΔelementStart(1, 'span', ['class', 'toFirst']); - { Δtext(2, '1'); } - ΔelementEnd(); - ΔelementStart(3, 'span', ['class', 'toSecond']); - { Δtext(4, '2'); } - ΔelementEnd(); + ɵɵelementStart(1, 'span', ['class', 'toFirst']); + { ɵɵtext(2, '1'); } + ɵɵelementEnd(); + ɵɵelementStart(3, 'span', ['class', 'toSecond']); + { ɵɵtext(4, '2'); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 5, 0, [Child]); @@ -1750,13 +1751,13 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef([[['span', SelectorFlags.CLASS, 'toFirst']]]); - ΔelementStart(0, 'div', ['id', 'first']); - { Δprojection(1, 1); } - ΔelementEnd(); - ΔelementStart(2, 'div', ['id', 'second']); - { Δprojection(3); } - ΔelementEnd(); + ɵɵprojectionDef([[['span', SelectorFlags.CLASS, 'toFirst']]]); + ɵɵelementStart(0, 'div', ['id', 'first']); + { ɵɵprojection(1, 1); } + ɵɵelementEnd(); + ɵɵelementStart(2, 'div', ['id', 'second']); + { ɵɵprojection(3); } + ɵɵelementEnd(); } }, 4); @@ -1768,17 +1769,17 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - ΔelementStart(1, 'span', ['class', 'toFirst']); - { Δtext(2, '1'); } - ΔelementEnd(); - ΔelementStart(3, 'span'); - { Δtext(4, 'remaining'); } - ΔelementEnd(); - Δtext(5, 'more remaining'); + ɵɵelementStart(1, 'span', ['class', 'toFirst']); + { ɵɵtext(2, '1'); } + ɵɵelementEnd(); + ɵɵelementStart(3, 'span'); + { ɵɵtext(4, 'remaining'); } + ɵɵelementEnd(); + ɵɵtext(5, 'more remaining'); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 6, 0, [Child]); @@ -1795,13 +1796,13 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef([[['span', SelectorFlags.CLASS, 'toSecond']]]); - ΔelementStart(0, 'div', ['id', 'first']); - { Δprojection(1); } - ΔelementEnd(); - ΔelementStart(2, 'div', ['id', 'second']); - { Δprojection(3, 1); } - ΔelementEnd(); + ɵɵprojectionDef([[['span', SelectorFlags.CLASS, 'toSecond']]]); + ɵɵelementStart(0, 'div', ['id', 'first']); + { ɵɵprojection(1); } + ɵɵelementEnd(); + ɵɵelementStart(2, 'div', ['id', 'second']); + { ɵɵprojection(3, 1); } + ɵɵelementEnd(); } }, 4); @@ -1814,17 +1815,17 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - ΔelementStart(1, 'span'); - { Δtext(2, '1'); } - ΔelementEnd(); - ΔelementStart(3, 'span', ['class', 'toSecond']); - { Δtext(4, '2'); } - ΔelementEnd(); - Δtext(5, 'remaining'); + ɵɵelementStart(1, 'span'); + { ɵɵtext(2, '1'); } + ɵɵelementEnd(); + ɵɵelementStart(3, 'span', ['class', 'toSecond']); + { ɵɵtext(4, '2'); } + ɵɵelementEnd(); + ɵɵtext(5, 'remaining'); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 6, 0, [Child]); @@ -1847,10 +1848,10 @@ describe('content projection', () => { */ const GrandChild = createComponent('grand-child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef([[['span']]]); - Δprojection(0, 1); - Δelement(1, 'hr'); - Δprojection(2); + ɵɵprojectionDef([[['span']]]); + ɵɵprojection(0, 1); + ɵɵelement(1, 'hr'); + ɵɵprojection(2); } }, 3); @@ -1862,15 +1863,15 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'grand-child'); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'grand-child'); { - Δprojection(1); - ΔelementStart(2, 'span'); - { Δtext(3, 'in child template'); } - ΔelementEnd(); + ɵɵprojection(1); + ɵɵelementStart(2, 'span'); + { ɵɵtext(3, 'in child template'); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 4, 0, [GrandChild]); @@ -1883,13 +1884,13 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - ΔelementStart(1, 'span'); - { Δtext(2, 'parent content'); } - ΔelementEnd(); + ɵɵelementStart(1, 'span'); + { ɵɵtext(2, 'parent content'); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 3, 0, [Child]); @@ -1908,10 +1909,10 @@ describe('content projection', () => { */ const Card = createComponent('card', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef([[['', 'card-title', '']], [['', 'card-content', '']]]); - Δprojection(0, 1); - Δelement(1, 'hr'); - Δprojection(2, 2); + ɵɵprojectionDef([[['', 'card-title', '']], [['', 'card-content', '']]]); + ɵɵprojection(0, 1); + ɵɵelement(1, 'hr'); + ɵɵprojection(2, 2); } }, 3); @@ -1923,15 +1924,15 @@ describe('content projection', () => { */ const CardWithTitle = createComponent('card-with-title', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'card'); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'card'); { - ΔelementStart(1, 'h1', ['card-title', '']); - { Δtext(2, 'Title'); } - ΔelementEnd(); - Δprojection(3, 0, ['card-content', '']); + ɵɵelementStart(1, 'h1', ['card-title', '']); + { ɵɵtext(2, 'Title'); } + ɵɵelementEnd(); + ɵɵprojection(3, 0, ['card-content', '']); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 4, 0, [Card]); @@ -1942,9 +1943,9 @@ describe('content projection', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'card-with-title'); - { Δtext(1, 'content'); } - ΔelementEnd(); + ɵɵelementStart(0, 'card-with-title'); + { ɵɵtext(1, 'content'); } + ɵɵelementEnd(); } }, 2, 0, [CardWithTitle]); @@ -1961,8 +1962,8 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef([[['div']]]); - Δprojection(0, 1); + ɵɵprojectionDef([[['div']]]); + ɵɵprojection(0, 1); } }, 1); @@ -1974,16 +1975,16 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - ΔelementStart(1, 'div', [AttributeMarker.ProjectAs, ['span']]); - { Δtext(2, 'should not project'); } - ΔelementEnd(); - ΔelementStart(3, 'div'); - { Δtext(4, 'should project'); } - ΔelementEnd(); + ɵɵelementStart(1, 'div', [AttributeMarker.ProjectAs, ['span']]); + { ɵɵtext(2, 'should not project'); } + ɵɵelementEnd(); + ɵɵelementStart(3, 'div'); + { ɵɵtext(4, 'should project'); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 5, 0, [Child]); @@ -2000,18 +2001,18 @@ describe('content projection', () => { */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef([[['div']]]); - ΔelementStart(0, 'span'); - { Δprojection(1, 1); } - ΔelementEnd(); + ɵɵprojectionDef([[['div']]]); + ɵɵelementStart(0, 'span'); + { ɵɵprojection(1, 1); } + ɵɵelementEnd(); } }, 2); function IfTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - { Δtext(1, 'content'); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵtext(1, 'content'); } + ɵɵelementEnd(); } } @@ -2022,12 +2023,12 @@ describe('content projection', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: {value: any}) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); - { Δtemplate(1, IfTemplate, 2, 0, 'div', [AttributeMarker.Template, 'ngIf']); } - ΔelementEnd(); + ɵɵelementStart(0, 'child'); + { ɵɵtemplate(1, IfTemplate, 2, 0, 'div', [AttributeMarker.Template, 'ngIf']); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(1, 'ngIf', Δbind(ctx.value)); + ɵɵelementProperty(1, 'ngIf', ɵɵbind(ctx.value)); } }, 2, 1, [Child, NgIf]); diff --git a/packages/core/test/render3/control_flow_spec.ts b/packages/core/test/render3/control_flow_spec.ts index 8a9f3eb094..3de917fcd0 100644 --- a/packages/core/test/render3/control_flow_spec.ts +++ b/packages/core/test/render3/control_flow_spec.ts @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import {ΔdefineComponent} from '../../src/render3/definition'; -import {Δbind, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, Δelement, ΔelementEnd, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, Δtext, ΔtextBinding} from '../../src/render3/instructions/all'; +import {ɵɵdefineComponent} from '../../src/render3/definition'; +import {ɵɵbind, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵelement, ɵɵelementEnd, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵtext, ɵɵtextBinding} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; import {ComponentFixture, TemplateFixture, createComponent} from './render_util'; @@ -16,29 +16,29 @@ describe('JS control flow', () => { it('should work with if block', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { if (ctx.condition) { - let rf1 = ΔembeddedViewStart(1, 2, 1); + let rf1 = ɵɵembeddedViewStart(1, 2, 1); { if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'span'); - { Δtext(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'span'); + { ɵɵtext(1); } + ɵɵelementEnd(); } if (rf1 & RenderFlags.Update) { - ΔtextBinding(1, Δbind(ctx.message)); + ɵɵtextBinding(1, ɵɵbind(ctx.message)); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 2); @@ -72,41 +72,41 @@ describe('JS control flow', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { if (ctx.condition) { - let rf1 = ΔembeddedViewStart(1, 2, 0); + let rf1 = ɵɵembeddedViewStart(1, 2, 0); { if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'span'); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'span'); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } if (rf1 & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { if (ctx.condition2) { - let rf2 = ΔembeddedViewStart(2, 1, 0); + let rf2 = ɵɵembeddedViewStart(2, 1, 0); { if (rf2 & RenderFlags.Create) { - Δtext(0, 'Hello'); + ɵɵtext(0, 'Hello'); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 2); @@ -164,51 +164,51 @@ describe('JS control flow', () => { * % } * % } */ - function createTemplate() { Δcontainer(0); } + function createTemplate() { ɵɵcontainer(0); } function updateTemplate() { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.condition) { - let rf1 = ΔembeddedViewStart(1, 2, 0); + let rf1 = ɵɵembeddedViewStart(1, 2, 0); { if (rf1 & RenderFlags.Create) { - { Δcontainer(0); } - { Δcontainer(1); } + { ɵɵcontainer(0); } + { ɵɵcontainer(1); } } if (rf1 & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.condition2) { - let rf2 = ΔembeddedViewStart(2, 1, 0); + let rf2 = ɵɵembeddedViewStart(2, 1, 0); { if (rf2 & RenderFlags.Create) { - Δtext(0, 'Hello'); + ɵɵtext(0, 'Hello'); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshEnd(); + ɵɵcontainerRefreshStart(1); { if (ctx.condition3) { - let rf2 = ΔembeddedViewStart(2, 1, 0); + let rf2 = ɵɵembeddedViewStart(2, 1, 0); { if (rf2 & RenderFlags.Create) { - Δtext(0, 'World'); + ɵɵtext(0, 'World'); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } const fixture = new TemplateFixture(createTemplate, updateTemplate, 1); @@ -231,32 +231,32 @@ describe('JS control flow', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); if (ctx.condition1) { - const rf1 = ΔembeddedViewStart(1, 1, 0); + const rf1 = ɵɵembeddedViewStart(1, 1, 0); if (rf1 & RenderFlags.Create) { - Δtext(0, '1'); + ɵɵtext(0, '1'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } // can't have ; here due linting rules if (ctx.condition2) { - const rf2 = ΔembeddedViewStart(2, 1, 0); + const rf2 = ɵɵembeddedViewStart(2, 1, 0); if (rf2 & RenderFlags.Create) { - Δtext(0, '2'); + ɵɵtext(0, '2'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } // can't have ; here due linting rules if (ctx.condition3) { - const rf3 = ΔembeddedViewStart(3, 1, 0); + const rf3 = ɵɵembeddedViewStart(3, 1, 0); if (rf3 & RenderFlags.Create) { - Δtext(0, '3'); + ɵɵtext(0, '3'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1); @@ -275,40 +275,40 @@ describe('JS control flow', () => { it('should work with containers with views as parents', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - { Δtext(1, 'hello'); } - ΔelementEnd(); - Δcontainer(2); + ɵɵelementStart(0, 'div'); + { ɵɵtext(1, 'hello'); } + ɵɵelementEnd(); + ɵɵcontainer(2); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(2); + ɵɵcontainerRefreshStart(2); { if (ctx.condition1) { - let rf0 = ΔembeddedViewStart(0, 1, 0); + let rf0 = ɵɵembeddedViewStart(0, 1, 0); { if (rf0 & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf0 & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.condition2) { - let rf0 = ΔembeddedViewStart(0, 1, 0); + let rf0 = ɵɵembeddedViewStart(0, 1, 0); { if (rf0 & RenderFlags.Create) { - Δtext(0, 'world'); + ɵɵtext(0, 'world'); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 3); @@ -328,29 +328,29 @@ describe('JS control flow', () => { let data: string[] = ['a', 'b', 'c']; const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'ul'); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'ul'); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { for (let i = 0; i < data.length; i++) { - let rf1 = ΔembeddedViewStart(1, 2, 1); + let rf1 = ɵɵembeddedViewStart(1, 2, 1); { if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'li'); - { Δtext(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'li'); + { ɵɵtext(1); } + ɵɵelementEnd(); } if (rf1 & RenderFlags.Update) { - ΔtextBinding(1, Δbind(data[i])); + ɵɵtextBinding(1, ɵɵbind(data[i])); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 2); @@ -384,42 +384,42 @@ describe('JS control flow', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'ul'); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'ul'); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { for (let i = 0; i < data[0].length; i++) { - let rf1 = ΔembeddedViewStart(1, 2, 0); + let rf1 = ɵɵembeddedViewStart(1, 2, 0); { if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'li'); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'li'); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } if (rf1 & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { data[1].forEach((value: string, ind: number) => { - let rf2 = ΔembeddedViewStart(2, 1, 1); + let rf2 = ɵɵembeddedViewStart(2, 1, 1); if (rf2 & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf2 & RenderFlags.Update) { - ΔtextBinding(0, Δbind(data[0][i] + value)); + ɵɵtextBinding(0, ɵɵbind(data[0][i] + value)); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); }); } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 2); @@ -453,49 +453,49 @@ describe('JS control flow', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); + ɵɵelementStart(0, 'div'); { - Δtext(1, 'Before'); - Δcontainer(2); - Δtext(3, 'After'); + ɵɵtext(1, 'Before'); + ɵɵcontainer(2); + ɵɵtext(3, 'After'); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(2); + ɵɵcontainerRefreshStart(2); { for (let i = 0; i < cafes.length; i++) { - let rf1 = ΔembeddedViewStart(1, 4, 1); + let rf1 = ɵɵembeddedViewStart(1, 4, 1); { if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'h2'); - { Δtext(1); } - ΔelementEnd(); - Δcontainer(2); - Δtext(3, '-'); + ɵɵelementStart(0, 'h2'); + { ɵɵtext(1); } + ɵɵelementEnd(); + ɵɵcontainer(2); + ɵɵtext(3, '-'); } if (rf1 & RenderFlags.Update) { - ΔtextBinding(1, Δbind(cafes[i].name)); - ΔcontainerRefreshStart(2); + ɵɵtextBinding(1, ɵɵbind(cafes[i].name)); + ɵɵcontainerRefreshStart(2); { for (let j = 0; j < cafes[i].entrees.length; j++) { - let rf2 = ΔembeddedViewStart(2, 1, 1); + let rf2 = ɵɵembeddedViewStart(2, 1, 1); if (rf2 & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf2 & RenderFlags.Update) { - ΔtextBinding(0, Δbind(cafes[i].entrees[j])); + ɵɵtextBinding(0, ɵɵbind(cafes[i].entrees[j])); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 4); @@ -548,68 +548,68 @@ describe('JS control flow', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); + ɵɵelementStart(0, 'div'); { - Δtext(1, 'Before'); - Δcontainer(2); - Δtext(3, 'After'); + ɵɵtext(1, 'Before'); + ɵɵcontainer(2); + ɵɵtext(3, 'After'); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(2); + ɵɵcontainerRefreshStart(2); { for (let i = 0; i < cafes.length; i++) { - let rf1 = ΔembeddedViewStart(1, 4, 1); + let rf1 = ɵɵembeddedViewStart(1, 4, 1); { if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'h2'); - { Δtext(1); } - ΔelementEnd(); - Δcontainer(2); - Δtext(3, '-'); + ɵɵelementStart(0, 'h2'); + { ɵɵtext(1); } + ɵɵelementEnd(); + ɵɵcontainer(2); + ɵɵtext(3, '-'); } if (rf1 & RenderFlags.Update) { - ΔtextBinding(1, Δbind(cafes[i].name)); - ΔcontainerRefreshStart(2); + ɵɵtextBinding(1, ɵɵbind(cafes[i].name)); + ɵɵcontainerRefreshStart(2); { for (let j = 0; j < cafes[i].entrees.length; j++) { - let rf1 = ΔembeddedViewStart(1, 3, 1); + let rf1 = ɵɵembeddedViewStart(1, 3, 1); { if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'h3'); - { Δtext(1); } - ΔelementEnd(); - Δcontainer(2); + ɵɵelementStart(0, 'h3'); + { ɵɵtext(1); } + ɵɵelementEnd(); + ɵɵcontainer(2); } if (rf1 & RenderFlags.Update) { - ΔtextBinding(1, Δbind(cafes[i].entrees[j].name)); - ΔcontainerRefreshStart(2); + ɵɵtextBinding(1, ɵɵbind(cafes[i].entrees[j].name)); + ɵɵcontainerRefreshStart(2); { for (let k = 0; k < cafes[i].entrees[j].foods.length; k++) { - let rf2 = ΔembeddedViewStart(1, 1, 1); + let rf2 = ɵɵembeddedViewStart(1, 1, 1); if (rf2 & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf2 & RenderFlags.Update) { - ΔtextBinding(0, Δbind(cafes[i].entrees[j].foods[k])); + ɵɵtextBinding(0, ɵɵbind(cafes[i].entrees[j].foods[k])); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 4); @@ -632,36 +632,36 @@ describe('JS control flow', () => { it('should work with if/else blocks', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { if (ctx.condition) { - let rf1 = ΔembeddedViewStart(1, 2, 0); + let rf1 = ɵɵembeddedViewStart(1, 2, 0); { if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'span'); - { Δtext(1, 'Hello'); } - ΔelementEnd(); + ɵɵelementStart(0, 'span'); + { ɵɵtext(1, 'Hello'); } + ɵɵelementEnd(); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } else { - let rf2 = ΔembeddedViewStart(2, 2, 0); + let rf2 = ɵɵembeddedViewStart(2, 2, 0); { if (rf2) { - ΔelementStart(0, 'div'); - { Δtext(1, 'Goodbye'); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵtext(1, 'Goodbye'); } + ɵɵelementEnd(); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 2); @@ -685,7 +685,7 @@ describe('JS control flow', () => { // Intentionally duplicating the templates in test below so we are // testing the behavior on firstTemplatePass for each of these tests class Comp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Comp, selectors: [['comp']], consts: 0, @@ -702,7 +702,7 @@ describe('JS control flow', () => { condition = true; condition2 = true; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: App, selectors: [['app']], factory: () => new App(), @@ -710,33 +710,33 @@ describe('JS control flow', () => { vars: 0, template: function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div'); - Δcontainer(1); - Δcontainer(2); + ɵɵelement(0, 'div'); + ɵɵcontainer(1); + ɵɵcontainer(2); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { if (ctx.condition) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); - ΔcontainerRefreshStart(2); + ɵɵcontainerRefreshEnd(); + ɵɵcontainerRefreshStart(2); { if (ctx.condition2) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, directives: () => [Comp] @@ -753,7 +753,7 @@ describe('JS control flow', () => { // Intentionally duplicating the templates from above so we are // testing the behavior on firstTemplatePass for each of these tests class Comp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Comp, selectors: [['comp']], consts: 0, @@ -770,7 +770,7 @@ describe('JS control flow', () => { condition = false; condition2 = true; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: App, selectors: [['app']], factory: () => new App(), @@ -778,33 +778,33 @@ describe('JS control flow', () => { vars: 0, template: function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div'); - Δcontainer(1); - Δcontainer(2); + ɵɵelement(0, 'div'); + ɵɵcontainer(1); + ɵɵcontainer(2); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { if (ctx.condition) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); - ΔcontainerRefreshStart(2); + ɵɵcontainerRefreshEnd(); + ɵɵcontainerRefreshStart(2); { if (ctx.condition2) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, directives: () => [Comp] @@ -835,35 +835,35 @@ describe('JS for loop', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { for (let i = 0; i < config.data1.length; i++) { - let rf2 = ΔembeddedViewStart(1, 1, 1); + let rf2 = ɵɵembeddedViewStart(1, 1, 1); if (rf2 & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf2 & RenderFlags.Update) { - ΔtextBinding(0, Δbind(config.data1[i])); + ɵɵtextBinding(0, ɵɵbind(config.data1[i])); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } for (let j = 0; j < config.data2.length; j++) { - let rf2 = ΔembeddedViewStart(1, 1, 1); + let rf2 = ɵɵembeddedViewStart(1, 1, 1); if (rf2 & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf2 & RenderFlags.Update) { - ΔtextBinding(0, Δbind(config.data2[j])); + ɵɵtextBinding(0, ɵɵbind(config.data2[j])); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 2); @@ -891,41 +891,41 @@ describe('function calls', () => { function spanify(rf: RenderFlags, ctx: {message: string | null}) { const message = ctx.message; if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span'); - { Δtext(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'span'); + { ɵɵtext(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔtextBinding(1, Δbind(message)); + ɵɵtextBinding(1, ɵɵbind(message)); } } const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); + ɵɵelementStart(0, 'div'); { - Δtext(1, 'Before'); - Δcontainer(2); - Δcontainer(3); - Δtext(4, 'After'); + ɵɵtext(1, 'Before'); + ɵɵcontainer(2); + ɵɵcontainer(3); + ɵɵtext(4, 'After'); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(2); + ɵɵcontainerRefreshStart(2); { - let rf0 = ΔembeddedViewStart(0, 2, 1); + let rf0 = ɵɵembeddedViewStart(0, 2, 1); { spanify(rf0, {message: data[0]}); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } - ΔcontainerRefreshEnd(); - ΔcontainerRefreshStart(3); + ɵɵcontainerRefreshEnd(); + ɵɵcontainerRefreshStart(3); { - let rf0 = ΔembeddedViewStart(0, 2, 1); + let rf0 = ɵɵembeddedViewStart(0, 2, 1); { spanify(rf0, {message: data[1]}); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 5); diff --git a/packages/core/test/render3/debug_spec.ts b/packages/core/test/render3/debug_spec.ts index e1c15ab002..794dfb9d56 100644 --- a/packages/core/test/render3/debug_spec.ts +++ b/packages/core/test/render3/debug_spec.ts @@ -8,14 +8,14 @@ import {getLContext} from '../../src/render3/context_discovery'; import {LViewDebug, toDebug} from '../../src/render3/debug'; -import {RenderFlags, ΔdefineComponent, ΔelementEnd, ΔelementStart, Δtext} from '../../src/render3/index'; +import {RenderFlags, ɵɵdefineComponent, ɵɵelementEnd, ɵɵelementStart, ɵɵtext} from '../../src/render3/index'; import {ComponentFixture} from './render_util'; describe('Debug Representation', () => { it('should generate a human readable version', () => { class MyComponent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComponent, selectors: [['my-comp']], vars: 0, @@ -23,9 +23,9 @@ describe('Debug Representation', () => { factory: () => new MyComponent(), template: function(rf: RenderFlags, ctx: MyComponent) { if (rf == RenderFlags.Create) { - ΔelementStart(0, 'div', ['id', '123']); - Δtext(1, 'Hello World'); - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['id', '123']); + ɵɵtext(1, 'Hello World'); + ɵɵelementEnd(); } } }); diff --git a/packages/core/test/render3/di_spec.ts b/packages/core/test/render3/di_spec.ts index 1e6f1fc260..07082bb508 100644 --- a/packages/core/test/render3/di_spec.ts +++ b/packages/core/test/render3/di_spec.ts @@ -6,14 +6,14 @@ * found in the LICENSE file at https://angular.io/license */ -import {Attribute, ChangeDetectorRef, ElementRef, Host, INJECTOR, Inject, InjectFlags, Injector, Optional, Renderer2, Self, SkipSelf, TemplateRef, ViewContainerRef, ΔdefineInjectable, ΔdefineInjector} from '@angular/core'; +import {Attribute, ChangeDetectorRef, ElementRef, Host, INJECTOR, Inject, InjectFlags, Injector, Optional, Renderer2, Self, SkipSelf, TemplateRef, ViewContainerRef, ɵɵdefineInjectable, ɵɵdefineInjector} from '@angular/core'; import {createLView, createNodeAtIndex, createTView} from '@angular/core/src/render3/instructions/shared'; import {ComponentType, RenderFlags} from '@angular/core/src/render3/interfaces/definition'; import {createInjector} from '../../src/di/r3_injector'; -import {ΔdefineComponent} from '../../src/render3/definition'; +import {ɵɵdefineComponent} from '../../src/render3/definition'; import {bloomAdd, bloomHasToken, bloomHashBitOrFactory as bloomHash, getOrCreateNodeInjectorForNode} from '../../src/render3/di'; -import {ΔProvidersFeature, ΔallocHostVars, Δbind, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, ΔdefineDirective, ΔdirectiveInject, Δelement, ΔelementContainerEnd, ΔelementContainerStart, ΔelementEnd, ΔelementProperty, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, ΔinjectAttribute, Δinterpolation2, Δload, Δprojection, ΔprojectionDef, Δreference, Δtemplate, ΔtemplateRefExtractor, Δtext, ΔtextBinding} from '../../src/render3/index'; +import {ɵɵProvidersFeature, ɵɵallocHostVars, ɵɵbind, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵdefineDirective, ɵɵdirectiveInject, ɵɵelement, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵinjectAttribute, ɵɵinterpolation2, ɵɵload, ɵɵprojection, ɵɵprojectionDef, ɵɵreference, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextBinding} from '../../src/render3/index'; import {LContainer, NATIVE} from '../../src/render3/interfaces/container'; import {TNODE} from '../../src/render3/interfaces/injector'; import {AttributeMarker, TNodeType} from '../../src/render3/interfaces/node'; @@ -32,7 +32,7 @@ describe('di', () => { it('should create directive with no deps', () => { class Directive { value: string = 'Created'; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Directive, selectors: [['', 'dir', '']], factory: () => new Directive, @@ -43,13 +43,13 @@ describe('di', () => { /**
{{ dir.value }}
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['dir', ''], ['dir', 'dir']); - { Δtext(2); } - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['dir', ''], ['dir', 'dir']); + { ɵɵtext(2); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - const tmp = Δreference(1) as any; - ΔtextBinding(2, Δbind(tmp.value)); + const tmp = ɵɵreference(1) as any; + ɵɵtextBinding(2, ɵɵbind(tmp.value)); } }, 3, 1, [Directive]); @@ -65,7 +65,7 @@ describe('di', () => { value = 'DirB'; constructor() { log.push(this.value); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ selectors: [['', 'dirB', '']], type: DirB, factory: () => new DirB(), @@ -78,17 +78,17 @@ describe('di', () => { it('should create directive with intra view dependencies', () => { class DirA { value: string = 'DirA'; - static ngDirectiveDef = ΔdefineDirective( + static ngDirectiveDef = ɵɵdefineDirective( {type: DirA, selectors: [['', 'dirA', '']], factory: () => new DirA()}); } class DirC { value: string; constructor(a: DirA, b: DirB) { this.value = a.value + b.value; } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirC, selectors: [['', 'dirC', '']], - factory: () => new DirC(ΔdirectiveInject(DirA), ΔdirectiveInject(DirB)), + factory: () => new DirC(ɵɵdirectiveInject(DirA), ɵɵdirectiveInject(DirB)), exportAs: ['dirC'] }); } @@ -100,17 +100,17 @@ describe('di', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['dirA', '']); + ɵɵelementStart(0, 'div', ['dirA', '']); { - ΔelementStart(1, 'span', ['dirB', '', 'dirC', ''], ['dir', 'dirC']); - { Δtext(3); } - ΔelementEnd(); + ɵɵelementStart(1, 'span', ['dirB', '', 'dirC', ''], ['dir', 'dirC']); + { ɵɵtext(3); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - const tmp = Δreference(2) as any; - ΔtextBinding(3, Δbind(tmp.value)); + const tmp = ɵɵreference(2) as any; + ɵɵtextBinding(3, ɵɵbind(tmp.value)); } }, 4, 1, [DirA, DirB, DirC]); @@ -122,17 +122,17 @@ describe('di', () => { class DirA { constructor(dir: DirB) { log.push(`DirA (dep: ${dir.value})`); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ selectors: [['', 'dirA', '']], type: DirA, - factory: () => new DirA(ΔdirectiveInject(DirB)), + factory: () => new DirA(ɵɵdirectiveInject(DirB)), }); } /**
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dirA', '', 'dirB', '']); + ɵɵelement(0, 'div', ['dirA', '', 'dirB', '']); } }, 1, 0, [DirA, DirB]); @@ -144,10 +144,10 @@ describe('di', () => { class DirA { constructor(dir: DirB) { log.push(`DirA (dep: ${dir.value})`); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ selectors: [['', 'dirA', '']], type: DirA, - factory: () => new DirA(ΔdirectiveInject(DirB)), + factory: () => new DirA(ɵɵdirectiveInject(DirB)), }); } @@ -157,8 +157,8 @@ describe('di', () => { // - if not found, it will check the module injector tree const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dirB', '']); - Δelement(1, 'div', ['dirA', '']); + ɵɵelement(0, 'div', ['dirB', '']); + ɵɵelement(1, 'div', ['dirA', '']); } }, 2, 0, [DirA, DirB]); @@ -177,12 +177,12 @@ describe('di', () => { class Comp { constructor(dir: DirB) { log.push(`Comp (dep: ${dir.value})`); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ selectors: [['comp']], type: Comp, consts: 0, vars: 0, - factory: () => new Comp(ΔdirectiveInject(DirB)), + factory: () => new Comp(ɵɵdirectiveInject(DirB)), template: (rf: RenderFlags, ctx: Comp) => {} }); } @@ -190,7 +190,7 @@ describe('di', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp', ['dirB', '']); + ɵɵelement(0, 'comp', ['dirB', '']); } }, 1, 0, [Comp, DirB]); @@ -202,10 +202,10 @@ describe('di', () => { class DirA { constructor(dir: DirB) { log.push(`DirA (dep: ${dir.value})`); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ selectors: [['', 'dirA', '']], type: DirA, - factory: () => new DirA(ΔdirectiveInject(DirB)) + factory: () => new DirA(ɵɵdirectiveInject(DirB)) }); } @@ -216,19 +216,19 @@ describe('di', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { for (let i = 0; i < 3; i++) { - if (ΔembeddedViewStart(0, 1, 0)) { - Δelement(0, 'div', ['dirA', '', 'dirB', '']); + if (ɵɵembeddedViewStart(0, 1, 0)) { + ɵɵelement(0, 'div', ['dirA', '', 'dirB', '']); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1, 0, [DirA, DirB]); @@ -242,7 +242,7 @@ describe('di', () => { value = 'DirA'; constructor() { log.push(this.value); } - static ngDirectiveDef = ΔdefineDirective( + static ngDirectiveDef = ɵɵdefineDirective( {selectors: [['', 'dirA', '']], type: DirA, factory: () => new DirA()}); } @@ -251,10 +251,10 @@ describe('di', () => { log.push(`DirB (deps: ${dirA.value} and ${dirC.value})`); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ selectors: [['', 'dirB', '']], type: DirB, - factory: () => new DirB(ΔdirectiveInject(DirA), ΔdirectiveInject(DirC)) + factory: () => new DirB(ɵɵdirectiveInject(DirA), ɵɵdirectiveInject(DirC)) }); } @@ -262,14 +262,14 @@ describe('di', () => { value = 'DirC'; constructor() { log.push(this.value); } - static ngDirectiveDef = ΔdefineDirective( + static ngDirectiveDef = ɵɵdefineDirective( {selectors: [['', 'dirC', '']], type: DirC, factory: () => new DirC()}); } /**
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dirA', '', 'dirB', '', 'dirC', '']); + ɵɵelement(0, 'div', ['dirA', '', 'dirB', '', 'dirC', '']); } }, 1, 0, [DirA, DirB, DirC]); @@ -281,12 +281,12 @@ describe('di', () => { class Comp { constructor(dir: DirD) { log.push(`Comp (dep: ${dir.value})`); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ selectors: [['comp']], type: Comp, consts: 0, vars: 0, - factory: () => new Comp(ΔdirectiveInject(DirD)), + factory: () => new Comp(ɵɵdirectiveInject(DirD)), template: (ctx: any, fm: boolean) => {} }); } @@ -295,10 +295,10 @@ describe('di', () => { value = 'DirA'; constructor(dir: DirC) { log.push(`DirA (dep: ${dir.value})`); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ selectors: [['', 'dirA', '']], type: DirA, - factory: () => new DirA(ΔdirectiveInject(DirC)) + factory: () => new DirA(ɵɵdirectiveInject(DirC)) }); } @@ -306,10 +306,10 @@ describe('di', () => { value = 'DirC'; constructor(dir: DirB) { log.push(`DirC (dep: ${dir.value})`); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ selectors: [['', 'dirC', '']], type: DirC, - factory: () => new DirC(ΔdirectiveInject(DirB)) + factory: () => new DirC(ɵɵdirectiveInject(DirB)) }); } @@ -317,17 +317,17 @@ describe('di', () => { value = 'DirD'; constructor(dir: DirA) { log.push(`DirD (dep: ${dir.value})`); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ selectors: [['', 'dirD', '']], type: DirD, - factory: () => new DirD(ΔdirectiveInject(DirA)) + factory: () => new DirD(ɵɵdirectiveInject(DirA)) }); } /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp', ['dirA', '', 'dirB', '', 'dirC', '', 'dirD', '']); + ɵɵelement(0, 'comp', ['dirA', '', 'dirB', '', 'dirC', '', 'dirD', '']); } }, 1, 0, [Comp, DirA, DirB, DirC, DirD]); @@ -342,17 +342,17 @@ describe('di', () => { log.push(`DirA (deps: ${dirB.value} and ${app.value})`); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ selectors: [['', 'dirA', '']], type: DirA, - factory: () => new DirA(ΔdirectiveInject(DirB), ΔdirectiveInject(App)), + factory: () => new DirA(ɵɵdirectiveInject(DirB), ɵɵdirectiveInject(App)), }); } class App { value = 'App'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ selectors: [['app']], type: App, factory: () => new App(), @@ -361,7 +361,7 @@ describe('di', () => { /**
*/ template: (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dirA', '', 'dirB', '', 'dirC', 'dirC']); + ɵɵelement(0, 'div', ['dirA', '', 'dirB', '', 'dirC', 'dirC']); } }, directives: [DirA, DirB] @@ -378,10 +378,10 @@ describe('di', () => { class DirA { constructor(dirB: DirB) { log.push(`DirA (dep: DirB - ${dirB.count})`); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ selectors: [['', 'dirA', '']], type: DirA, - factory: () => new DirA(ΔdirectiveInject(DirB)), + factory: () => new DirA(ɵɵdirectiveInject(DirB)), }); } @@ -393,21 +393,21 @@ describe('di', () => { this.count = count++; } - static ngDirectiveDef = ΔdefineDirective( + static ngDirectiveDef = ɵɵdefineDirective( {selectors: [['', 'dirB', '']], type: DirB, factory: () => new DirB()}); } /**
*/ const Parent = createComponent('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dirA', '', 'dirB', '']); + ɵɵelement(0, 'div', ['dirA', '', 'dirB', '']); } }, 1, 0, [DirA, DirB]); /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'parent', ['dirB', '']); + ɵɵelement(0, 'parent', ['dirB', '']); } }, 1, 0, [Parent, DirB]); @@ -423,11 +423,11 @@ describe('di', () => { this.injector = vcr.injector; } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirA, selectors: [['', 'dirA', '']], - factory: () => - new DirA(ΔdirectiveInject(DirB), ΔdirectiveInject(ViewContainerRef as any)), + factory: + () => new DirA(ɵɵdirectiveInject(DirB), ɵɵdirectiveInject(ViewContainerRef as any)), exportAs: ['dirA'] }); } @@ -439,13 +439,13 @@ describe('di', () => { */ const Comp = createComponent('comp', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['dirA', ''], ['dir', 'dirA']); - { Δtext(2); } - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['dirA', ''], ['dir', 'dirA']); + { ɵɵtext(2); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - const dir = Δreference(1) as DirA; - ΔtextBinding(2, Δbind(dir.dirB.value)); + const dir = ɵɵreference(1) as DirA; + ɵɵtextBinding(2, ɵɵbind(dir.dirB.value)); } }, 3, 1, [DirA]); @@ -453,7 +453,7 @@ describe('di', () => { /** /comp> */ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'comp', ['dirB', '']); + ɵɵelement(0, 'comp', ['dirB', '']); } }, 1, 0, [Comp, DirB]); @@ -465,18 +465,18 @@ describe('di', () => { function IfTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); + ɵɵelementStart(0, 'div'); { - ΔelementStart(1, 'div', ['dirA', ''], ['dir', 'dirA']); - { Δtext(3); } - ΔelementEnd(); + ɵɵelementStart(1, 'div', ['dirA', ''], ['dir', 'dirA']); + { ɵɵtext(3); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - const dir = Δreference(2) as DirA; - ΔtextBinding(3, Δbind(dir.dirB.value)); + const dir = ɵɵreference(2) as DirA; + ɵɵtextBinding(3, ɵɵbind(dir.dirB.value)); } } @@ -489,12 +489,12 @@ describe('di', () => { */ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['dirB', '']); - { Δtemplate(1, IfTemplate, 4, 1, 'div', [AttributeMarker.Template, 'ngIf']); } - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['dirB', '']); + { ɵɵtemplate(1, IfTemplate, 4, 1, 'div', [AttributeMarker.Template, 'ngIf']); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(1, 'ngIf', Δbind(ctx.showing)); + ɵɵelementProperty(1, 'ngIf', ɵɵbind(ctx.showing)); } }, 2, 1, [DirA, DirB, NgIf]); @@ -517,45 +517,45 @@ describe('di', () => { */ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['dirB', '']); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['dirB', '']); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { if (!ctx.skipContent) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); { if (rf1 & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf1 & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (!ctx.skipContent2) { - let rf2 = ΔembeddedViewStart(0, 3, 1); + let rf2 = ɵɵembeddedViewStart(0, 3, 1); { if (rf2 & RenderFlags.Create) { - ΔelementStart(0, 'div', ['dirA', ''], ['dir', 'dirA']); - { Δtext(2); } - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['dirA', ''], ['dir', 'dirA']); + { ɵɵtext(2); } + ɵɵelementEnd(); } if (rf2 & RenderFlags.Update) { - const dir = Δreference(1) as DirA; - ΔtextBinding(2, Δbind(dir.dirB.value)); + const dir = ɵɵreference(1) as DirA; + ɵɵtextBinding(2, ɵɵbind(dir.dirB.value)); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 2, 0, [DirA, DirB]); @@ -574,24 +574,24 @@ describe('di', () => { create() { this.vcr.createEmbeddedView(this.tmp); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: StructuralDir, selectors: [['', 'structuralDir', '']], factory: () => structuralDir = - new StructuralDir(ΔdirectiveInject(ViewContainerRef as any)), + new StructuralDir(ɵɵdirectiveInject(ViewContainerRef as any)), inputs: {tmp: 'tmp'} }); } function FooTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['dirA', ''], ['dir', 'dirA']); - { Δtext(2); } - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['dirA', ''], ['dir', 'dirA']); + { ɵɵtext(2); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - const dir = Δreference(1) as DirA; - ΔtextBinding(2, Δbind(dir.dirB.value)); + const dir = ɵɵreference(1) as DirA; + ɵɵtextBinding(2, ɵɵbind(dir.dirB.value)); } } @@ -609,19 +609,19 @@ describe('di', () => { */ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['dirB', '', 'value', 'declaration']); + ɵɵelementStart(0, 'div', ['dirB', '', 'value', 'declaration']); { - Δtemplate( - 1, FooTemplate, 3, 1, 'ng-template', null, ['foo', ''], ΔtemplateRefExtractor); + ɵɵtemplate( + 1, FooTemplate, 3, 1, 'ng-template', null, ['foo', ''], ɵɵtemplateRefExtractor); } - ΔelementEnd(); - ΔelementStart(3, 'div', ['dirB', '', 'value', 'insertion']); - { Δelement(4, 'div', ['structuralDir', '']); } - ΔelementEnd(); + ɵɵelementEnd(); + ɵɵelementStart(3, 'div', ['dirB', '', 'value', 'insertion']); + { ɵɵelement(4, 'div', ['structuralDir', '']); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - const foo = Δreference(2) as any; - ΔelementProperty(4, 'tmp', Δbind(foo)); + const foo = ɵɵreference(2) as any; + ɵɵelementProperty(4, 'tmp', ɵɵbind(foo)); } }, 5, 1, [DirA, DirB, StructuralDir]); @@ -638,8 +638,8 @@ describe('di', () => { */ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'comp', ['dirB', '']); - Δelement(1, 'comp', ['dirB', '']); + ɵɵelement(0, 'comp', ['dirB', '']); + ɵɵelement(1, 'comp', ['dirB', '']); } }, 2, 0, [Comp, DirB]); @@ -654,16 +654,16 @@ describe('di', () => { // @HostBinding('id') id = 'foo'; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: HostBindingDir, selectors: [['', 'hostBindingDir', '']], factory: () => hostBindingDir = new HostBindingDir(), hostBindings: (rf: RenderFlags, ctx: any, elementIndex: number) => { if (rf & RenderFlags.Create) { - ΔallocHostVars(1); + ɵɵallocHostVars(1); } if (rf & RenderFlags.Update) { - ΔelementProperty(elementIndex, 'id', Δbind(ctx.id)); + ɵɵelementProperty(elementIndex, 'id', ɵɵbind(ctx.id)); } } }); @@ -679,22 +679,22 @@ describe('di', () => { */ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', [ + ɵɵelementStart(0, 'div', [ 'dirB', '', 'hostBindingDir', '', ]); { - ΔelementStart(1, 'p', ['dirA', ''], ['dir', 'dirA']); - { Δtext(3); } - ΔelementEnd(); + ɵɵelementStart(1, 'p', ['dirA', ''], ['dir', 'dirA']); + { ɵɵtext(3); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - dir = Δreference(2) as DirA; - ΔtextBinding(3, Δbind(dir.dirB.value)); + dir = ɵɵreference(2) as DirA; + ɵɵtextBinding(3, ɵɵbind(dir.dirB.value)); } }, 4, 1, [HostBindingDir, DirA, DirB]); @@ -715,23 +715,23 @@ describe('di', () => { class MyService { value = 'MyService'; static ngInjectableDef = - ΔdefineInjectable({providedIn: 'root', factory: () => new MyService()}); + ɵɵdefineInjectable({providedIn: 'root', factory: () => new MyService()}); } class MyComponent { constructor(public myService: MyService) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComponent, selectors: [['my-component']], consts: 1, vars: 1, - factory: () => new MyComponent(ΔdirectiveInject(MyService)), + factory: () => new MyComponent(ɵɵdirectiveInject(MyService)), template: function(rf: RenderFlags, ctx: MyComponent) { if (rf & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.myService.value)); + ɵɵtextBinding(0, ɵɵbind(ctx.myService.value)); } } }); @@ -746,22 +746,22 @@ describe('di', () => { class Dir { constructor(siblingDir: OtherDir) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ selectors: [['', 'dir', '']], type: Dir, - factory: () => new Dir(ΔdirectiveInject(OtherDir)) + factory: () => new Dir(ɵɵdirectiveInject(OtherDir)) }); } class OtherDir { - static ngDirectiveDef = ΔdefineDirective( + static ngDirectiveDef = ɵɵdefineDirective( {selectors: [['', 'other', '']], type: OtherDir, factory: () => new OtherDir()}); } /**
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dir', '']); + ɵɵelement(0, 'div', ['dir', '']); } }, 1, 0, [Dir, OtherDir]); @@ -772,15 +772,15 @@ describe('di', () => { class Dir { constructor(siblingDir: OtherDir) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ selectors: [['', 'dir', '']], type: Dir, - factory: () => new Dir(ΔdirectiveInject(OtherDir)) + factory: () => new Dir(ɵɵdirectiveInject(OtherDir)) }); } class OtherDir { - static ngDirectiveDef = ΔdefineDirective( + static ngDirectiveDef = ɵɵdefineDirective( {selectors: [['', 'other', '']], type: OtherDir, factory: () => new OtherDir()}); } @@ -790,8 +790,8 @@ describe('di', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['other', '']); - Δelement(1, 'div', ['dir', '']); + ɵɵelement(0, 'div', ['other', '']); + ɵɵelement(1, 'div', ['dir', '']); } }, 2, 0, [Dir, OtherDir]); @@ -803,27 +803,27 @@ describe('di', () => { class DirA { constructor(dir: DirB) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ selectors: [['', 'dirA', '']], type: DirA, - factory: () => new DirA(ΔdirectiveInject(DirB)) + factory: () => new DirA(ɵɵdirectiveInject(DirB)) }); } class DirB { constructor(dir: DirA) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ selectors: [['', 'dirB', '']], type: DirB, - factory: () => new DirB(ΔdirectiveInject(DirA)) + factory: () => new DirB(ɵɵdirectiveInject(DirA)) }); } /**
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dirA', '', 'dirB', '']); + ɵɵelement(0, 'div', ['dirA', '', 'dirB', '']); } }, 1, 0, [DirA, DirB]); @@ -834,17 +834,17 @@ describe('di', () => { class Dir { constructor(dir: Dir) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ selectors: [['', 'dir', '']], type: Dir, - factory: () => new Dir(ΔdirectiveInject(Dir)) + factory: () => new Dir(ɵɵdirectiveInject(Dir)) }); } /**
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dir', '']); + ɵɵelement(0, 'div', ['dir', '']); } }, 1, 0, [Dir]); @@ -857,7 +857,7 @@ describe('di', () => { // TODO(issue/24571): remove '!'. value !: string; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirB, selectors: [['', 'dirB', '']], factory: () => new DirB(), @@ -871,10 +871,10 @@ describe('di', () => { class DirA { constructor(@Optional() public dirB: DirB|null) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirA, selectors: [['', 'dirA', '']], - factory: () => dirA = new DirA(ΔdirectiveInject(DirB, InjectFlags.Optional)) + factory: () => dirA = new DirA(ɵɵdirectiveInject(DirB, InjectFlags.Optional)) }); } @@ -885,7 +885,7 @@ describe('di', () => { /**
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dirA', '']); + ɵɵelement(0, 'div', ['dirA', '']); } }, 1, 0, [DirA, DirB]); @@ -895,13 +895,13 @@ describe('di', () => { it('should not throw if dependency is @Optional (module injector)', () => { class SomeModule { - static ngInjectorDef = ΔdefineInjector({factory: () => new SomeModule()}); + static ngInjectorDef = ɵɵdefineInjector({factory: () => new SomeModule()}); } /**
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dirA', '']); + ɵɵelement(0, 'div', ['dirA', '']); } }, 1, 0, [DirA, DirB]); @@ -918,18 +918,18 @@ describe('di', () => { class DirC { constructor(@Optional() @Self() public dirB: DirB|null) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirC, selectors: [['', 'dirC', '']], factory: () => dirC = - new DirC(ΔdirectiveInject(DirB, InjectFlags.Optional|InjectFlags.Self)) + new DirC(ɵɵdirectiveInject(DirB, InjectFlags.Optional|InjectFlags.Self)) }); } /**
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dirC', '']); + ɵɵelement(0, 'div', ['dirC', '']); } }, 1, 0, [DirC, DirB]); @@ -943,10 +943,10 @@ describe('di', () => { class DirA { constructor(@Optional() public dirB: DirB|null) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirA, selectors: [['', 'dirA', '']], - factory: () => dirA = new DirA(ΔdirectiveInject(DirB, InjectFlags.Optional)) + factory: () => dirA = new DirA(ɵɵdirectiveInject(DirB, InjectFlags.Optional)) }); } @@ -956,8 +956,8 @@ describe('di', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dirB', '']); - Δelement(1, 'div', ['dirA', '']); + ɵɵelement(0, 'div', ['dirB', '']); + ɵɵelement(1, 'div', ['dirA', '']); } }, 2, 0, [DirA, DirB]); @@ -974,24 +974,24 @@ describe('di', () => { class DirA { constructor(@SkipSelf() public dirB: DirB) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirA, selectors: [['', 'dirA', '']], - factory: () => dirA = new DirA(ΔdirectiveInject(DirB, InjectFlags.SkipSelf)) + factory: () => dirA = new DirA(ɵɵdirectiveInject(DirB, InjectFlags.SkipSelf)) }); } /**
*/ const Comp = createComponent('comp', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dirA', '', 'dirB', 'self']); + ɵɵelement(0, 'div', ['dirA', '', 'dirB', 'self']); } }, 1, 0, [DirA, DirB]); /* */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp', ['dirB', 'parent']); + ɵɵelement(0, 'comp', ['dirB', 'parent']); } }, 1, 0, [Comp, DirB]); @@ -1005,10 +1005,10 @@ describe('di', () => { class DirA { constructor(@Self() public dirB: DirB) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirA, selectors: [['', 'dirA', '']], - factory: () => dirA = new DirA(ΔdirectiveInject(DirB, InjectFlags.Self)) + factory: () => dirA = new DirA(ɵɵdirectiveInject(DirB, InjectFlags.Self)) }); } @@ -1019,9 +1019,9 @@ describe('di', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['dirB', '']); - Δelement(1, 'div', ['dirA', '']); - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['dirB', '']); + ɵɵelement(1, 'div', ['dirA', '']); + ɵɵelementEnd(); } }, 2, 0, [DirA, DirB]); @@ -1036,10 +1036,10 @@ describe('di', () => { class DirA { constructor(@Self() public dirB: DirB) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirA, selectors: [['', 'dirA', '']], - factory: () => dirA = new DirA(ΔdirectiveInject(DirB, InjectFlags.Self)) + factory: () => dirA = new DirA(ɵɵdirectiveInject(DirB, InjectFlags.Self)) }); } @@ -1052,9 +1052,9 @@ describe('di', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['dirB', '']); - Δelement(1, 'div', ['dirA', '', 'dirC', '']); - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['dirB', '']); + ɵɵelement(1, 'div', ['dirA', '', 'dirC', '']); + ɵɵelementEnd(); } }, 2, 0, [DirA, DirB, DirC]); @@ -1077,20 +1077,20 @@ describe('di', () => { class DirA { constructor(@Host() public dirB: DirB) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirA, selectors: [['', 'dirA', '']], - factory: () => dirA = new DirA(ΔdirectiveInject(DirB, InjectFlags.Host)) + factory: () => dirA = new DirA(ɵɵdirectiveInject(DirB, InjectFlags.Host)) }); } class DirString { constructor(@Host() public s: String) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirString, selectors: [['', 'dirString', '']], - factory: () => dirString = new DirString(ΔdirectiveInject(String, InjectFlags.Host)) + factory: () => dirString = new DirString(ɵɵdirectiveInject(String, InjectFlags.Host)) }); } @@ -1098,14 +1098,14 @@ describe('di', () => { /**
*/ const Comp = createComponent('comp', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dirString', '']); + ɵɵelement(0, 'div', ['dirString', '']); } }, 1, 0, [DirString], [], null, [], [{provide: String, useValue: 'Foo'}]); /* */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } }, 1, 0, [Comp]); @@ -1119,24 +1119,24 @@ describe('di', () => { class DirComp { constructor(@Host() public comp: any) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirComp, selectors: [['', 'dirCmp', '']], - factory: () => dirComp = new DirComp(ΔdirectiveInject(Comp, InjectFlags.Host)) + factory: () => dirComp = new DirComp(ɵɵdirectiveInject(Comp, InjectFlags.Host)) }); } /**
*/ const Comp = createComponent('comp', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dirCmp', '']); + ɵɵelement(0, 'div', ['dirCmp', '']); } }, 1, 0, [DirComp]); /* */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } }, 1, 0, [Comp]); @@ -1148,14 +1148,14 @@ describe('di', () => { /**
*/ const Comp = createComponent('comp', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dirString', '']); + ɵɵelement(0, 'div', ['dirString', '']); } }, 1, 0, [DirString], [], null, [{provide: String, useValue: 'Foo'}]); /* */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } }, 1, 0, [Comp]); @@ -1168,14 +1168,14 @@ describe('di', () => { /**
*/ const Comp = createComponent('comp', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dirA', '']); + ɵɵelement(0, 'div', ['dirA', '']); } }, 1, 0, [DirA]); /* */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp', ['dirB', '']); + ɵɵelement(0, 'comp', ['dirB', '']); } }, 1, 0, [Comp, DirB]); @@ -1194,27 +1194,27 @@ describe('di', () => { */ const Comp = createComponent('comp', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.showing) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - Δelement(0, 'div', ['dirA', '']); + ɵɵelement(0, 'div', ['dirA', '']); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1, 0, [DirA, DirB]); /* */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp', ['dirB', '']); + ɵɵelement(0, 'comp', ['dirB', '']); } if (rf & RenderFlags.Update) { comp = getDirectiveOnNode(0); @@ -1233,7 +1233,7 @@ describe('di', () => { function IfTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dirA', '']); + ɵɵelement(0, 'div', ['dirA', '']); } } @@ -1244,15 +1244,15 @@ describe('di', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['dirB', '']); + ɵɵelementStart(0, 'div', ['dirB', '']); { - Δtemplate( + ɵɵtemplate( 1, IfTemplate, 1, 0, 'div', ['dirA', '', AttributeMarker.Template, 'ngIf']); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(1, 'ngIf', Δbind(ctx.showing)); + ɵɵelementProperty(1, 'ngIf', ɵɵbind(ctx.showing)); // testing only dirB = getDirectiveOnNode(0); @@ -1272,23 +1272,23 @@ describe('di', () => { class DirComp { constructor(@Host() public comp: any) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirComp, selectors: [['', 'dirCmp', '']], - factory: () => dirComp = new DirComp(ΔdirectiveInject(App, InjectFlags.Host)) + factory: () => dirComp = new DirComp(ɵɵdirectiveInject(App, InjectFlags.Host)) }); } /**
*/ const Comp = createComponent('comp', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dirCmp', '']); + ɵɵelement(0, 'div', ['dirCmp', '']); } }, 1, 0, [DirComp]); /* */ class App { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: App, selectors: [['app']], consts: 1, @@ -1296,7 +1296,7 @@ describe('di', () => { factory: () => new App, template: function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } }, directives: [Comp], @@ -1326,11 +1326,11 @@ describe('di', () => { class GroupDirective { constructor() { controlContainers.push(this); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: GroupDirective, selectors: [['', 'group', '']], factory: () => new GroupDirective(), - features: [ΔProvidersFeature( + features: [ɵɵProvidersFeature( [{provide: ControlContainer, useExisting: GroupDirective}])], }); } @@ -1342,10 +1342,10 @@ describe('di', () => { injectedControlContainer = parent; } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: ControlNameDirective, selectors: [['', 'controlName', '']], - factory: () => new ControlNameDirective(ΔdirectiveInject( + factory: () => new ControlNameDirective(ɵɵdirectiveInject( ControlContainer, InjectFlags.Host|InjectFlags.SkipSelf)) }); } @@ -1360,7 +1360,7 @@ describe('di', () => { }) */ class ChildComponent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ChildComponent, selectors: [['child']], consts: 1, @@ -1368,11 +1368,11 @@ describe('di', () => { factory: () => new ChildComponent(), template: function(rf: RenderFlags, ctx: ChildComponent) { if (rf & RenderFlags.Create) { - Δelement(0, 'input', ['controlName', '', 'type', 'text']); + ɵɵelement(0, 'input', ['controlName', '', 'type', 'text']); } }, directives: [ControlNameDirective], - features: [ΔProvidersFeature( + features: [ɵɵProvidersFeature( [], [{provide: ControlContainer, useExisting: GroupDirective}])], }); } @@ -1387,7 +1387,7 @@ describe('di', () => { }) */ class AppComponent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: AppComponent, selectors: [['my-app']], consts: 2, @@ -1395,9 +1395,9 @@ describe('di', () => { factory: () => new AppComponent(), template: function(rf: RenderFlags, ctx: AppComponent) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['group', '']); - Δelement(1, 'child'); - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['group', '']); + ɵɵelement(1, 'child'); + ɵɵelementEnd(); } }, directives: [ChildComponent, GroupDirective] @@ -1429,21 +1429,21 @@ describe('di', () => { class InjectorDir { constructor(public injector: Injector) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: InjectorDir, selectors: [['', 'injectorDir', '']], - factory: () => injectorDir = new InjectorDir(ΔdirectiveInject(Injector as any)) + factory: () => injectorDir = new InjectorDir(ɵɵdirectiveInject(Injector as any)) }); } class OtherInjectorDir { constructor(public otherDir: InjectorDir, public injector: Injector) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: OtherInjectorDir, selectors: [['', 'otherInjectorDir', '']], factory: () => otherInjectorDir = new OtherInjectorDir( - ΔdirectiveInject(InjectorDir), ΔdirectiveInject(Injector as any)) + ɵɵdirectiveInject(InjectorDir), ɵɵdirectiveInject(Injector as any)) }); } @@ -1451,10 +1451,10 @@ describe('di', () => { /**
*/ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['injectorDir', '', 'otherInjectorDir', '']); + ɵɵelement(0, 'div', ['injectorDir', '', 'otherInjectorDir', '']); } // testing only - divElement = Δload(0); + divElement = ɵɵload(0); }, 1, 0, [InjectorDir, OtherInjectorDir]); const fixture = new ComponentFixture(App); @@ -1471,10 +1471,10 @@ describe('di', () => { class INJECTORDir { constructor(public injector: Injector) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: INJECTORDir, selectors: [['', 'injectorDir', '']], - factory: () => injectorDir = new INJECTORDir(ΔdirectiveInject(INJECTOR as any)) + factory: () => injectorDir = new INJECTORDir(ɵɵdirectiveInject(INJECTOR as any)) }); } @@ -1482,10 +1482,10 @@ describe('di', () => { /**
*/ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['injectorDir', '']); + ɵɵelement(0, 'div', ['injectorDir', '']); } // testing only - divElement = Δload(0); + divElement = ɵɵload(0); }, 1, 0, [INJECTORDir]); const fixture = new ComponentFixture(App); @@ -1508,10 +1508,10 @@ describe('di', () => { constructor(public elementRef: ElementRef) { this.value = (elementRef.constructor as any).name; } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Directive, selectors: [['', 'dir', '']], - factory: () => dir = new Directive(ΔdirectiveInject(ElementRef)), + factory: () => dir = new Directive(ɵɵdirectiveInject(ElementRef)), exportAs: ['dir'] }); } @@ -1521,11 +1521,11 @@ describe('di', () => { constructor(public elementRef: ElementRef, directive: Directive) { this.isSameInstance = elementRef === directive.elementRef; } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirectiveSameInstance, selectors: [['', 'dirSame', '']], factory: () => dirSameInstance = new DirectiveSameInstance( - ΔdirectiveInject(ElementRef), ΔdirectiveInject(Directive)), + ɵɵdirectiveInject(ElementRef), ɵɵdirectiveInject(Directive)), exportAs: ['dirSame'] }); } @@ -1533,8 +1533,8 @@ describe('di', () => { /**
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['dir', '', 'dirSame', '']); - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['dir', '', 'dirSame', '']); + ɵɵelementEnd(); div = getNativeByIndex(0, getLView()) as RElement; } }, 1, 0, [Directive, DirectiveSameInstance]); @@ -1558,10 +1558,10 @@ describe('di', () => { constructor(public elementRef: ElementRef) { this.value = (elementRef.constructor as any).name; } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Directive, selectors: [['', 'dir', '']], - factory: () => dir = new Directive(ΔdirectiveInject(ElementRef)), + factory: () => dir = new Directive(ɵɵdirectiveInject(ElementRef)), exportAs: ['dir'] }); } @@ -1569,8 +1569,8 @@ describe('di', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate(0, () => {}, 0, 0, 'ng-template', ['dir', '']); - lContainer = Δload(0) as any; + ɵɵtemplate(0, () => {}, 0, 0, 'ng-template', ['dir', '']); + lContainer = ɵɵload(0) as any; } }, 1, 0, [Directive]); @@ -1586,10 +1586,10 @@ describe('di', () => { constructor(public templateRef: TemplateRef) { this.value = (templateRef.constructor as any).name; } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Directive, selectors: [['', 'dir', '']], - factory: () => new Directive(ΔdirectiveInject(TemplateRef as any)), + factory: () => new Directive(ɵɵdirectiveInject(TemplateRef as any)), exportAs: ['dir'] }); } @@ -1600,11 +1600,11 @@ describe('di', () => { constructor(templateRef: TemplateRef, directive: Directive) { this.isSameInstance = templateRef === directive.templateRef; } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirectiveSameInstance, selectors: [['', 'dirSame', '']], factory: () => new DirectiveSameInstance( - ΔdirectiveInject(TemplateRef as any), ΔdirectiveInject(Directive)), + ɵɵdirectiveInject(TemplateRef as any), ɵɵdirectiveInject(Directive)), exportAs: ['dirSame'] }); } @@ -1616,15 +1616,15 @@ describe('di', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, function() {}, 0, 0, 'ng-template', ['dir', '', 'dirSame', ''], ['dir', 'dir', 'dirSame', 'dirSame']); - Δtext(3); + ɵɵtext(3); } if (rf & RenderFlags.Update) { - const tmp1 = Δreference(1) as any; - const tmp2 = Δreference(2) as any; - ΔtextBinding(3, Δinterpolation2('', tmp1.value, '-', tmp2.isSameInstance, '')); + const tmp1 = ɵɵreference(1) as any; + const tmp2 = ɵɵreference(2) as any; + ɵɵtextBinding(3, ɵɵinterpolation2('', tmp1.value, '-', tmp2.isSameInstance, '')); } }, 4, 2, [Directive, DirectiveSameInstance]); @@ -1638,7 +1638,7 @@ describe('di', () => { /**
*/ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dir', '']); + ɵɵelement(0, 'div', ['dir', '']); } }, 1, 0, [Directive]); @@ -1649,8 +1649,8 @@ describe('di', () => { /** */ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔelementContainerStart(0, ['dir', '']); - ΔelementContainerEnd(); + ɵɵelementContainerStart(0, ['dir', '']); + ɵɵelementContainerEnd(); } }, 1, 0, [Directive]); @@ -1662,11 +1662,11 @@ describe('di', () => { class OptionalDirective { constructor(@Optional() public templateRef: TemplateRef) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: OptionalDirective, selectors: [['', 'dir', '']], factory: () => dir = new OptionalDirective( - ΔdirectiveInject(TemplateRef as any, InjectFlags.Optional)), + ɵɵdirectiveInject(TemplateRef as any, InjectFlags.Optional)), exportAs: ['dir'] }); } @@ -1674,7 +1674,7 @@ describe('di', () => { /**
*/ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dir', '']); + ɵɵelement(0, 'div', ['dir', '']); } }, 1, 0, [OptionalDirective]); @@ -1691,10 +1691,10 @@ describe('di', () => { constructor(public viewContainerRef: ViewContainerRef) { this.value = (viewContainerRef.constructor as any).name; } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Directive, selectors: [['', 'dir', '']], - factory: () => new Directive(ΔdirectiveInject(ViewContainerRef as any)), + factory: () => new Directive(ɵɵdirectiveInject(ViewContainerRef as any)), exportAs: ['dir'] }); } @@ -1704,11 +1704,11 @@ describe('di', () => { constructor(viewContainerRef: ViewContainerRef, directive: Directive) { this.isSameInstance = viewContainerRef === directive.viewContainerRef; } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirectiveSameInstance, selectors: [['', 'dirSame', '']], factory: () => new DirectiveSameInstance( - ΔdirectiveInject(ViewContainerRef as any), ΔdirectiveInject(Directive)), + ɵɵdirectiveInject(ViewContainerRef as any), ɵɵdirectiveInject(Directive)), exportAs: ['dirSame'] }); } @@ -1720,15 +1720,15 @@ describe('di', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart( + ɵɵelementStart( 0, 'div', ['dir', '', 'dirSame', ''], ['dir', 'dir', 'dirSame', 'dirSame']); - { Δtext(3); } - ΔelementEnd(); + { ɵɵtext(3); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - const tmp1 = Δreference(1) as any; - const tmp2 = Δreference(2) as any; - ΔtextBinding(3, Δinterpolation2('', tmp1.value, '-', tmp2.isSameInstance, '')); + const tmp1 = ɵɵreference(1) as any; + const tmp2 = ɵɵreference(2) as any; + ɵɵtextBinding(3, ɵɵinterpolation2('', tmp1.value, '-', tmp2.isSameInstance, '')); } }, 4, 2, [Directive, DirectiveSameInstance]); @@ -1747,16 +1747,16 @@ describe('di', () => { class MyComp { constructor(public cdr: ChangeDetectorRef) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComp, selectors: [['my-comp']], - factory: () => comp = new MyComp(ΔdirectiveInject(ChangeDetectorRef as any)), + factory: () => comp = new MyComp(ɵɵdirectiveInject(ChangeDetectorRef as any)), consts: 1, vars: 0, template: function(rf: RenderFlags, ctx: MyComp) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δprojection(0); + ɵɵprojectionDef(); + ɵɵprojection(0); } } }); @@ -1767,10 +1767,10 @@ describe('di', () => { constructor(public cdr: ChangeDetectorRef) { this.value = (cdr.constructor as any).name; } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Directive, selectors: [['', 'dir', '']], - factory: () => dir = new Directive(ΔdirectiveInject(ChangeDetectorRef as any)), + factory: () => dir = new Directive(ɵɵdirectiveInject(ChangeDetectorRef as any)), exportAs: ['dir'] }); } @@ -1778,11 +1778,11 @@ describe('di', () => { class DirectiveSameInstance { constructor(public cdr: ChangeDetectorRef) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirectiveSameInstance, selectors: [['', 'dirSame', '']], factory: () => dirSameInstance = - new DirectiveSameInstance(ΔdirectiveInject(ChangeDetectorRef as any)) + new DirectiveSameInstance(ɵɵdirectiveInject(ChangeDetectorRef as any)) }); } @@ -1793,12 +1793,12 @@ describe('di', () => { /** {{ dir.value }} */ const MyApp = createComponent('my-app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'my-comp', ['dir', '', 'dirSame', ''], ['dir', 'dir']); - Δtext(2); + ɵɵelement(0, 'my-comp', ['dir', '', 'dirSame', ''], ['dir', 'dir']); + ɵɵtext(2); } if (rf & RenderFlags.Update) { - const tmp = Δreference(1) as any; - ΔtextBinding(2, Δbind(tmp.value)); + const tmp = ɵɵreference(1) as any; + ɵɵtextBinding(2, ɵɵbind(tmp.value)); } }, 3, 1, directives); @@ -1818,22 +1818,22 @@ describe('di', () => { class MyApp { constructor(public cdr: ChangeDetectorRef) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, selectors: [['my-app']], consts: 3, vars: 1, - factory: () => new MyApp(ΔdirectiveInject(ChangeDetectorRef as any)), + factory: () => new MyApp(ɵɵdirectiveInject(ChangeDetectorRef as any)), /**
{{ dir.value }}
*/ template: function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['dir', '', 'dirSame', ''], ['dir', 'dir']); - { Δtext(2); } - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['dir', '', 'dirSame', ''], ['dir', 'dir']); + { ɵɵtext(2); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - const tmp = Δreference(1) as any; - ΔtextBinding(2, Δbind(tmp.value)); + const tmp = ɵɵreference(1) as any; + ɵɵtextBinding(2, ɵɵbind(tmp.value)); } }, directives: directives @@ -1854,12 +1854,12 @@ describe('di', () => { class MyApp { constructor(public cdr: ChangeDetectorRef) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, selectors: [['my-app']], consts: 4, vars: 1, - factory: () => new MyApp(ΔdirectiveInject(ChangeDetectorRef as any)), + factory: () => new MyApp(ɵɵdirectiveInject(ChangeDetectorRef as any)), /** * *
@@ -1868,14 +1868,14 @@ describe('di', () => { */ template: function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'my-comp'); - { Δelement(1, 'div', ['dir', '', 'dirSame', ''], ['dir', 'dir']); } - ΔelementEnd(); - Δtext(3); + ɵɵelementStart(0, 'my-comp'); + { ɵɵelement(1, 'div', ['dir', '', 'dirSame', ''], ['dir', 'dir']); } + ɵɵelementEnd(); + ɵɵtext(3); } if (rf & RenderFlags.Update) { - const tmp = Δreference(2) as any; - ΔtextBinding(3, Δbind(tmp.value)); + const tmp = ɵɵreference(2) as any; + ɵɵtextBinding(3, ɵɵbind(tmp.value)); } }, directives: directives @@ -1898,10 +1898,10 @@ describe('di', () => { constructor(public cdr: ChangeDetectorRef) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, selectors: [['my-app']], - factory: () => new MyApp(ΔdirectiveInject(ChangeDetectorRef as any)), + factory: () => new MyApp(ɵɵdirectiveInject(ChangeDetectorRef as any)), consts: 1, vars: 0, /** @@ -1911,26 +1911,26 @@ describe('di', () => { */ template: function(rf: RenderFlags, ctx: MyApp) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.showing) { - let rf1 = ΔembeddedViewStart(0, 3, 1); + let rf1 = ɵɵembeddedViewStart(0, 3, 1); if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'div', ['dir', '', 'dirSame', ''], ['dir', 'dir']); - { Δtext(2); } - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['dir', '', 'dirSame', ''], ['dir', 'dir']); + { ɵɵtext(2); } + ɵɵelementEnd(); } if (rf1 & RenderFlags.Update) { - const tmp = Δreference(1) as any; - ΔtextBinding(2, Δbind(tmp.value)); + const tmp = ɵɵreference(1) as any; + ɵɵtextBinding(2, ɵɵbind(tmp.value)); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, directives: directives @@ -1949,13 +1949,13 @@ describe('di', () => { it('should inject host component ChangeDetectorRef into directives on containers', () => { function C1(rf1: RenderFlags, ctx1: any) { if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'div', ['dir', '', 'dirSame', ''], ['dir', 'dir']); - { Δtext(2); } - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['dir', '', 'dirSame', ''], ['dir', 'dir']); + { ɵɵtext(2); } + ɵɵelementEnd(); } if (rf1 & RenderFlags.Update) { - const tmp = Δreference(1) as any; - ΔtextBinding(2, Δbind(tmp.value)); + const tmp = ɵɵreference(1) as any; + ɵɵtextBinding(2, ɵɵbind(tmp.value)); } } @@ -1964,21 +1964,21 @@ describe('di', () => { constructor(public cdr: ChangeDetectorRef) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, selectors: [['my-app']], - factory: () => new MyApp(ΔdirectiveInject(ChangeDetectorRef as any)), + factory: () => new MyApp(ɵɵdirectiveInject(ChangeDetectorRef as any)), consts: 1, vars: 0, /**
{{ dir.value }}
*/ template: function(rf: RenderFlags, ctx: MyApp) { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, C1, 3, 1, 'div', ['dir', '', 'dirSame', '', AttributeMarker.Template, 'ngIf']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'ngIf', Δbind(ctx.showing)); + ɵɵelementProperty(0, 'ngIf', ɵɵbind(ctx.showing)); } }, directives: directives @@ -2004,21 +2004,21 @@ describe('di', () => { class InjectorDir { constructor(public value: string) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: InjectorDir, selectors: [['', 'injectorDir', '']], - factory: () => injectorDir = new InjectorDir(ΔdirectiveInject('test' as any)), - features: [ΔProvidersFeature([{provide: 'test', useValue: 'provided'}])], + factory: () => injectorDir = new InjectorDir(ɵɵdirectiveInject('test' as any)), + features: [ɵɵProvidersFeature([{provide: 'test', useValue: 'provided'}])], }); } /**
*/ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['injectorDir', '']); + ɵɵelement(0, 'div', ['injectorDir', '']); } // testing only - divElement = Δload(0); + divElement = ɵɵload(0); }, 1, 0, [InjectorDir]); const fixture = new ComponentFixture(App); @@ -2030,15 +2030,15 @@ describe('di', () => { class MyComp { constructor(public renderer: Renderer2) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComp, selectors: [['my-comp']], - factory: () => new MyComp(ΔdirectiveInject(Renderer2 as any)), + factory: () => new MyComp(ɵɵdirectiveInject(Renderer2 as any)), consts: 1, vars: 0, template: function(rf: RenderFlags, ctx: MyComp) { if (rf & RenderFlags.Create) { - Δtext(0, 'Foo'); + ɵɵtext(0, 'Foo'); } } }); @@ -2067,11 +2067,11 @@ describe('di', () => { this.myDirective = myDirectiveAttrValue; } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: MyDirective, selectors: [['', 'myDirective', '']], factory: () => myDirectiveInstance = - new MyDirective(ΔinjectAttribute('exist'), ΔinjectAttribute('myDirective')) + new MyDirective(ɵɵinjectAttribute('exist'), ɵɵinjectAttribute('myDirective')) }); } @@ -2083,9 +2083,9 @@ describe('di', () => { const MyApp = createComponent('my-app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['exist', 'existValue', 'other', 'ignore']); - exist = ΔinjectAttribute('exist'); - nonExist = ΔinjectAttribute('nonExist'); + ɵɵelementStart(0, 'div', ['exist', 'existValue', 'other', 'ignore']); + exist = ɵɵinjectAttribute('exist'); + nonExist = ɵɵinjectAttribute('nonExist'); } }, 1); @@ -2101,7 +2101,7 @@ describe('di', () => { /* */ const MyApp = createComponent('my-app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, null, 0, 0, 'ng-template', ['myDirective', 'initial', 'exist', 'existValue', 'other', 'ignore']); } @@ -2122,9 +2122,9 @@ describe('di', () => { /* */ const MyApp = createComponent('my-app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementContainerStart( + ɵɵelementContainerStart( 0, ['myDirective', 'initial', 'exist', 'existValue', 'other', 'ignore']); - ΔelementContainerEnd(); + ɵɵelementContainerEnd(); } if (rf & RenderFlags.Update) { myDirectiveInstance = getDirectiveOnNode(0); @@ -2143,9 +2143,9 @@ describe('di', () => { const MyApp = createComponent('my-app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['exist', 'existValue', AttributeMarker.Bindings, 'nonExist']); - exist = ΔinjectAttribute('exist'); - nonExist = ΔinjectAttribute('nonExist'); + ɵɵelementStart(0, 'div', ['exist', 'existValue', AttributeMarker.Bindings, 'nonExist']); + exist = ɵɵinjectAttribute('exist'); + nonExist = ɵɵinjectAttribute('nonExist'); } }, 1); @@ -2160,11 +2160,11 @@ describe('di', () => { const MyApp = createComponent('my-app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', [ + ɵɵelementStart(0, 'div', [ 'exist', 'existValue', AttributeMarker.Bindings, 'binding1', 'nonExist', 'binding2' ]); - exist = ΔinjectAttribute('exist'); - nonExist = ΔinjectAttribute('nonExist'); + exist = ɵɵinjectAttribute('exist'); + nonExist = ɵɵinjectAttribute('nonExist'); } }, 1); @@ -2174,7 +2174,7 @@ describe('di', () => { }); }); - describe('Δinject', () => { + describe('ɵɵinject', () => { describe('bloom filter', () => { let mockTView: any; beforeEach(() => { @@ -2258,10 +2258,10 @@ describe('di', () => { class ChildDirective { value: string; constructor(public parent: any) { this.value = (parent.constructor as any).name; } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: ChildDirective, selectors: [['', 'childDir', '']], - factory: () => new ChildDirective(ΔdirectiveInject(ParentDirective)), + factory: () => new ChildDirective(ɵɵdirectiveInject(ParentDirective)), exportAs: ['childDir'] }); } @@ -2269,11 +2269,11 @@ describe('di', () => { class Child2Directive { value: boolean; constructor(parent: any, child: ChildDirective) { this.value = parent === child.parent; } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ selectors: [['', 'child2Dir', '']], type: Child2Directive, factory: () => new Child2Directive( - ΔdirectiveInject(ParentDirective), ΔdirectiveInject(ChildDirective)), + ɵɵdirectiveInject(ParentDirective), ɵɵdirectiveInject(ChildDirective)), exportAs: ['child2Dir'] }); } @@ -2289,29 +2289,29 @@ describe('di', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['parentDir', '']); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['parentDir', '']); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { - let rf1 = ΔembeddedViewStart(0, 4, 2); + let rf1 = ɵɵembeddedViewStart(0, 4, 2); if (rf1 & RenderFlags.Create) { - ΔelementStart( + ɵɵelementStart( 0, 'span', ['childDir', '', 'child2Dir', ''], ['child1', 'childDir', 'child2', 'child2Dir']); - { Δtext(3); } - ΔelementEnd(); + { ɵɵtext(3); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - const tmp1 = Δreference(1) as any; - const tmp2 = Δreference(2) as any; - ΔtextBinding(3, Δinterpolation2('', tmp1.value, '-', tmp2.value, '')); + const tmp1 = ɵɵreference(1) as any; + const tmp2 = ɵɵreference(2) as any; + ɵɵtextBinding(3, ɵɵinterpolation2('', tmp1.value, '-', tmp2.value, '')); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 2, 0, [ChildDirective, Child2Directive, ParentDirective]); diff --git a/packages/core/test/render3/directive_spec.ts b/packages/core/test/render3/directive_spec.ts index cc9acd7f80..b5bd88b269 100644 --- a/packages/core/test/render3/directive_spec.ts +++ b/packages/core/test/render3/directive_spec.ts @@ -8,8 +8,8 @@ import {EventEmitter, TemplateRef, ViewContainerRef} from '@angular/core'; -import {AttributeMarker, RenderFlags, ΔdefineComponent, ΔdefineDirective, ΔdirectiveInject} from '../../src/render3/index'; -import {Δbind, Δelement, ΔelementContainerEnd, ΔelementContainerStart, ΔelementEnd, ΔelementProperty, ΔelementStart, Δlistener, Δtemplate, Δtext} from '../../src/render3/instructions/all'; +import {AttributeMarker, RenderFlags, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdirectiveInject} from '../../src/render3/index'; +import {ɵɵbind, ɵɵelement, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵlistener, ɵɵtemplate, ɵɵtext} from '../../src/render3/instructions/all'; import {NgIf} from './common_with_def'; import {ComponentFixture, TemplateFixture, createComponent} from './render_util'; @@ -22,7 +22,7 @@ describe('directive', () => { let directiveInstance: Directive; class Directive { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Directive, selectors: [['', 'test', '']], factory: () => directiveInstance = new Directive, @@ -52,10 +52,10 @@ describe('directive', () => { */ function createTemplate() { // using 2 bindings to show example shape of attributes array - Δelement(0, 'span', ['class', 'fade', AttributeMarker.Bindings, 'test', 'other']); + ɵɵelement(0, 'span', ['class', 'fade', AttributeMarker.Bindings, 'test', 'other']); } - function updateTemplate() { ΔelementProperty(0, 'test', Δbind(false)); } + function updateTemplate() { ɵɵelementProperty(0, 'test', ɵɵbind(false)); } const fixture = new TemplateFixture(createTemplate, updateTemplate, 1, 1, [Directive]); @@ -70,7 +70,7 @@ describe('directive', () => { let directiveInstance: Directive; class Directive { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Directive, selectors: [['', 'test', '']], factory: () => directiveInstance = new Directive, @@ -103,14 +103,14 @@ describe('directive', () => { */ function createTemplate() { // putting name (test) in the "usual" value position - Δelement( + ɵɵelement( 0, 'span', ['class', 'fade', AttributeMarker.Bindings, 'prop1', 'test', 'prop2']); } function updateTemplate() { - ΔelementProperty(0, 'prop1', Δbind(true)); - ΔelementProperty(0, 'test', Δbind(false)); - ΔelementProperty(0, 'prop2', Δbind(true)); + ɵɵelementProperty(0, 'prop1', ɵɵbind(true)); + ɵɵelementProperty(0, 'test', ɵɵbind(false)); + ɵɵelementProperty(0, 'prop2', ɵɵbind(true)); } const fixture = new TemplateFixture(createTemplate, updateTemplate, 1, 3, [Directive]); @@ -133,20 +133,20 @@ describe('directive', () => { let tmplRef: any; class DirectiveA { constructor(public templateRef: any) { tmplRef = templateRef; } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirectiveA, selectors: [['ng-template', 'directiveA', '']], - factory: () => new DirectiveA(ΔdirectiveInject(TemplateRef as any)) + factory: () => new DirectiveA(ɵɵdirectiveInject(TemplateRef as any)) }); } function MyComponent_ng_template_Template_0(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtext(0, 'Some content'); + ɵɵtext(0, 'Some content'); } } class MyComponent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComponent, selectors: [['my-component']], factory: () => new MyComponent(), @@ -155,7 +155,7 @@ describe('directive', () => { // Some content template: function MyComponent_Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, MyComponent_ng_template_Template_0, 1, 0, 'ng-template', ['directiveA', '']); } }, @@ -179,24 +179,24 @@ describe('directive', () => { let vcRef: any; class DirectiveA { constructor(public viewContainerRef: any) { vcRef = viewContainerRef; } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirectiveA, selectors: [['ng-container', 'directiveA', '']], - factory: () => new DirectiveA(ΔdirectiveInject(ViewContainerRef as any)) + factory: () => new DirectiveA(ɵɵdirectiveInject(ViewContainerRef as any)) }); } function MyComponent_ng_container_Template_0(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementContainerStart(0, ['directiveA', '']); - Δtext(1, 'Some content'); - ΔelementContainerEnd(); + ɵɵelementContainerStart(0, ['directiveA', '']); + ɵɵtext(1, 'Some content'); + ɵɵelementContainerEnd(); } } class MyComponent { visible = true; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComponent, selectors: [['my-component']], factory: () => new MyComponent(), @@ -205,12 +205,12 @@ describe('directive', () => { // Some content template: function MyComponent_Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, MyComponent_ng_container_Template_0, 2, 0, 'ng-container', ['directiveA', '', AttributeMarker.Template, 'ngIf']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'ngIf', Δbind(ctx.visible)); + ɵɵelementProperty(0, 'ngIf', ɵɵbind(ctx.visible)); } }, directives: [DirectiveA, NgIf] @@ -225,7 +225,7 @@ describe('directive', () => { let directiveInstance: Directive; class Directive { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Directive, selectors: [['', 'out', '']], factory: () => directiveInstance = new Directive, @@ -239,9 +239,9 @@ describe('directive', () => { * */ function createTemplate() { - ΔelementStart(0, 'span', [AttributeMarker.Bindings, 'out']); - { Δlistener('out', () => {}); } - ΔelementEnd(); + ɵɵelementStart(0, 'span', [AttributeMarker.Bindings, 'out']); + { ɵɵlistener('out', () => {}); } + ɵɵelementEnd(); } const fixture = new TemplateFixture(createTemplate, () => {}, 1, 0, [Directive]); @@ -257,7 +257,7 @@ describe('directive', () => { let directiveInstance: Directive; class Directive { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Directive, selectors: [['', 'out', '']], factory: () => directiveInstance = new Directive, @@ -273,8 +273,8 @@ describe('directive', () => { */ const Cmpt = createComponent('Cmpt', function(rf: RenderFlags, ctx: {value: any}) { if (rf & RenderFlags.Create) { - Δtemplate(0, null, 0, 0, 'ng-template', [AttributeMarker.Bindings, 'out']); - Δlistener('out', () => { ctx.value = true; }); + ɵɵtemplate(0, null, 0, 0, 'ng-template', [AttributeMarker.Bindings, 'out']); + ɵɵlistener('out', () => { ctx.value = true; }); } }, 1, 0, [Directive]); @@ -294,11 +294,11 @@ describe('directive', () => { */ const Cmpt = createComponent('Cmpt', function(rf: RenderFlags, ctx: {value: any}) { if (rf & RenderFlags.Create) { - ΔelementContainerStart(0, [AttributeMarker.Bindings, 'out']); + ɵɵelementContainerStart(0, [AttributeMarker.Bindings, 'out']); { - Δlistener('out', () => { ctx.value = true; }); + ɵɵlistener('out', () => { ctx.value = true; }); } - ΔelementContainerEnd(); + ɵɵelementContainerEnd(); } }, 1, 0, [Directive]); diff --git a/packages/core/test/render3/discovery_utils_spec.ts b/packages/core/test/render3/discovery_utils_spec.ts index a1afbf3217..dee57144f3 100644 --- a/packages/core/test/render3/discovery_utils_spec.ts +++ b/packages/core/test/render3/discovery_utils_spec.ts @@ -7,8 +7,8 @@ */ import {StaticInjector} from '../../src/di/injector'; import {createInjector} from '../../src/di/r3_injector'; -import {AttributeMarker, RenderFlags, getHostElement, ΔProvidersFeature, ΔdefineComponent, ΔdefineDirective, ΔelementContainerEnd, ΔelementContainerStart, Δi18n, Δi18nApply, Δi18nExp} from '../../src/render3/index'; -import {markDirty, Δbind, Δelement, ΔelementEnd, ΔelementProperty, ΔelementStart, ΔelementStyling, ΔelementStylingApply, Δlistener, Δtemplate, Δtext, ΔtextBinding} from '../../src/render3/instructions/all'; +import {AttributeMarker, RenderFlags, getHostElement, ɵɵProvidersFeature, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵi18n, ɵɵi18nApply, ɵɵi18nExp} from '../../src/render3/index'; +import {markDirty, ɵɵbind, ɵɵelement, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵelementStyling, ɵɵelementStylingApply, ɵɵlistener, ɵɵtemplate, ɵɵtext, ɵɵtextBinding} from '../../src/render3/instructions/all'; import {getComponent, getContext, getDirectives, getInjectionTokens, getInjector, getListeners, getLocalRefs, getRootComponents, getViewComponent, loadLContext} from '../../src/render3/util/discovery_utils'; import {NgIf} from './common_with_def'; @@ -68,7 +68,7 @@ describe('discovery utils', () => { class Child { constructor() { childComponent.push(this); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Child, selectors: [['child']], factory: () => new Child(), @@ -76,17 +76,17 @@ describe('discovery utils', () => { vars: 0, template: (rf: RenderFlags, ctx: Child) => { if (rf & RenderFlags.Create) { - Δelement(0, 'p'); + ɵɵelement(0, 'p'); } }, - features: [ΔProvidersFeature([{provide: String, useValue: 'Child'}])] + features: [ɵɵProvidersFeature([{provide: String, useValue: 'Child'}])] }); } class DirectiveA { constructor() { dirA.push(this); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirectiveA, selectors: [['', 'dirA', '']], exportAs: ['dirA'], @@ -102,7 +102,7 @@ describe('discovery utils', () => { text: string = 'INIT'; constructor() { myApp = this; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, selectors: [['my-app']], factory: () => new MyApp(), @@ -111,30 +111,30 @@ describe('discovery utils', () => { directives: [Child, DirectiveA, NgIf], template: (rf: RenderFlags, ctx: MyApp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span'); - Δlistener('click', $event => log.push($event)); - Δtext(1); - ΔelementEnd(); - Δelement(2, 'div', ['dirA', ''], ['div', '', 'foo', 'dirA']); - Δelement(5, 'child'); - Δelement(6, 'child', ['dirA', ''], ['child', '']); - Δtemplate(8, function(rf: RenderFlags, ctx: never) { + ɵɵelementStart(0, 'span'); + ɵɵlistener('click', $event => log.push($event)); + ɵɵtext(1); + ɵɵelementEnd(); + ɵɵelement(2, 'div', ['dirA', ''], ['div', '', 'foo', 'dirA']); + ɵɵelement(5, 'child'); + ɵɵelement(6, 'child', ['dirA', ''], ['child', '']); + ɵɵtemplate(8, function(rf: RenderFlags, ctx: never) { if (rf & RenderFlags.Create) { - Δelement(0, 'child'); + ɵɵelement(0, 'child'); } }, 1, 0, 'child', ['dirA', AttributeMarker.Template, 'ngIf']); - ΔelementStart(9, 'i18n'); - Δi18n(10, MSG_DIV); - ΔelementEnd(); - ΔelementContainerStart(11); - { Δtext(12, 'content'); } - ΔelementContainerEnd(); + ɵɵelementStart(9, 'i18n'); + ɵɵi18n(10, MSG_DIV); + ɵɵelementEnd(); + ɵɵelementContainerStart(11); + { ɵɵtext(12, 'content'); } + ɵɵelementContainerEnd(); } if (rf & RenderFlags.Update) { - ΔtextBinding(1, Δbind(ctx.text)); - ΔelementProperty(8, 'ngIf', Δbind(true)); - Δi18nExp(Δbind(ctx.text)); - Δi18nApply(10); + ɵɵtextBinding(1, ɵɵbind(ctx.text)); + ɵɵelementProperty(8, 'ngIf', ɵɵbind(true)); + ɵɵi18nExp(ɵɵbind(ctx.text)); + ɵɵi18nApply(10); } } }); @@ -348,7 +348,7 @@ describe('discovery utils deprecated', () => { let innerComp: InnerComp; class InnerComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: InnerComp, selectors: [['inner-comp']], factory: () => innerComp = new InnerComp(), @@ -356,14 +356,14 @@ describe('discovery utils deprecated', () => { vars: 0, template: (rf: RenderFlags, ctx: InnerComp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div'); + ɵɵelement(0, 'div'); } } }); } class Comp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Comp, selectors: [['comp']], factory: () => new Comp(), @@ -371,7 +371,7 @@ describe('discovery utils deprecated', () => { vars: 0, template: (rf: RenderFlags, ctx: Comp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'inner-comp'); + ɵɵelement(0, 'inner-comp'); } }, directives: [InnerComp] @@ -399,7 +399,7 @@ describe('discovery utils deprecated', () => { let myDir3Instance: MyDir2|null = null; class MyDir1 { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: MyDir1, selectors: [['', 'my-dir-1', '']], factory: () => myDir1Instance = new MyDir1() @@ -407,7 +407,7 @@ describe('discovery utils deprecated', () => { } class MyDir2 { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: MyDir2, selectors: [['', 'my-dir-2', '']], factory: () => myDir2Instance = new MyDir2() @@ -415,7 +415,7 @@ describe('discovery utils deprecated', () => { } class MyDir3 { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: MyDir3, selectors: [['', 'my-dir-3', '']], factory: () => myDir3Instance = new MyDir2() @@ -423,7 +423,7 @@ describe('discovery utils deprecated', () => { } class Comp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Comp, selectors: [['comp']], factory: () => new Comp(), @@ -431,8 +431,8 @@ describe('discovery utils deprecated', () => { vars: 0, template: (rf: RenderFlags, ctx: Comp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['my-dir-1', '', 'my-dir-2', '']); - Δelement(1, 'div', ['my-dir-3']); + ɵɵelement(0, 'div', ['my-dir-1', '', 'my-dir-2', '']); + ɵɵelement(1, 'div', ['my-dir-3']); } }, directives: [MyDir1, MyDir2, MyDir3] @@ -461,7 +461,7 @@ describe('discovery utils deprecated', () => { it('should return an injector that can return directive instances', () => { class Comp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Comp, selectors: [['comp']], factory: () => new Comp(), @@ -481,7 +481,7 @@ describe('discovery utils deprecated', () => { it('should return an injector that falls-back to a module injector', () => { class Comp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Comp, selectors: [['comp']], factory: () => new Comp(), @@ -506,7 +506,7 @@ describe('discovery utils deprecated', () => { it('should return a map of local refs for an element', () => { class MyDir { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: MyDir, selectors: [['', 'myDir', '']], exportAs: ['myDir'], @@ -515,7 +515,7 @@ describe('discovery utils deprecated', () => { } class Comp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Comp, selectors: [['comp']], factory: () => new Comp(), @@ -524,7 +524,7 @@ describe('discovery utils deprecated', () => { template: (rf: RenderFlags, ctx: Comp) => { if (rf & RenderFlags.Create) { //
- Δelement(0, 'div', ['myDir'], ['elRef', '', 'dirRef', 'myDir']); + ɵɵelement(0, 'div', ['myDir'], ['elRef', '', 'dirRef', 'myDir']); } }, directives: [MyDir] @@ -543,7 +543,7 @@ describe('discovery utils deprecated', () => { it('should return a map of local refs for an element with styling context', () => { class Comp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Comp, selectors: [['comp']], factory: () => new Comp(), @@ -552,11 +552,11 @@ describe('discovery utils deprecated', () => { template: (rf: RenderFlags, ctx: Comp) => { if (rf & RenderFlags.Create) { //
- ΔelementStart(0, 'div', null, ['elRef', '']); - ΔelementEnd(); + ɵɵelementStart(0, 'div', null, ['elRef', '']); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementStylingApply(0); + ɵɵelementStylingApply(0); } } }); diff --git a/packages/core/test/render3/exports_spec.ts b/packages/core/test/render3/exports_spec.ts index 566f8bcd12..f669b34bd5 100644 --- a/packages/core/test/render3/exports_spec.ts +++ b/packages/core/test/render3/exports_spec.ts @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import {AttributeMarker, ΔdefineComponent, ΔdefineDirective} from '../../src/render3/index'; -import {Δbind, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, Δelement, ΔelementAttribute, ΔelementClassProp, ΔelementEnd, ΔelementProperty, ΔelementStart, ΔelementStyling, ΔelementStylingApply, ΔembeddedViewEnd, ΔembeddedViewStart, Δinterpolation2, ΔnextContext, Δreference, Δtemplate, Δtext, ΔtextBinding} from '../../src/render3/instructions/all'; +import {AttributeMarker, ɵɵdefineComponent, ɵɵdefineDirective} from '../../src/render3/index'; +import {ɵɵbind, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵelement, ɵɵelementAttribute, ɵɵelementClassProp, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵelementStyling, ɵɵelementStylingApply, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵinterpolation2, ɵɵnextContext, ɵɵreference, ɵɵtemplate, ɵɵtext, ɵɵtextBinding} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; import {NgIf} from './common_with_def'; @@ -21,12 +21,12 @@ describe('exports', () => { /** {{ myInput.value}} */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtext(0); - Δelement(1, 'input', ['value', 'one'], ['myInput', '']); + ɵɵtext(0); + ɵɵelement(1, 'input', ['value', 'one'], ['myInput', '']); } if (rf & RenderFlags.Update) { - const tmp = Δreference(2) as any; - ΔtextBinding(0, Δbind(tmp.value)); + const tmp = ɵɵreference(2) as any; + ɵɵtextBinding(0, ɵɵbind(tmp.value)); } }, 3, 1); @@ -39,12 +39,12 @@ describe('exports', () => { /**
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div'); - Δelement(1, 'input', ['value', 'one'], ['myInput', '']); + ɵɵelement(0, 'div'); + ɵɵelement(1, 'input', ['value', 'one'], ['myInput', '']); } if (rf & RenderFlags.Update) { - const tmp = Δreference(2) as any; - ΔelementProperty(0, 'title', Δbind(tmp.value)); + const tmp = ɵɵreference(2) as any; + ɵɵelementProperty(0, 'title', ɵɵbind(tmp.value)); } }, 3, 1); @@ -56,12 +56,12 @@ describe('exports', () => { /**
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div'); - Δelement(1, 'input', ['value', 'one'], ['myInput', '']); + ɵɵelement(0, 'div'); + ɵɵelement(1, 'input', ['value', 'one'], ['myInput', '']); } if (rf & RenderFlags.Update) { - const tmp = Δreference(2) as any; - ΔelementAttribute(0, 'aria-label', Δbind(tmp.value)); + const tmp = ɵɵreference(2) as any; + ɵɵelementAttribute(0, 'aria-label', ɵɵbind(tmp.value)); } }, 3, 1); @@ -73,15 +73,15 @@ describe('exports', () => { /**
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', [AttributeMarker.Classes, 'red']); - ΔelementStyling(['red']); - ΔelementEnd(); - Δelement(1, 'input', ['type', 'checkbox', 'checked', 'true'], ['myInput', '']); + ɵɵelementStart(0, 'div', [AttributeMarker.Classes, 'red']); + ɵɵelementStyling(['red']); + ɵɵelementEnd(); + ɵɵelement(1, 'input', ['type', 'checkbox', 'checked', 'true'], ['myInput', '']); } if (rf & RenderFlags.Update) { - const tmp = Δreference(2) as any; - ΔelementClassProp(0, 0, tmp.checked); - ΔelementStylingApply(0); + const tmp = ɵɵreference(2) as any; + ɵɵelementClassProp(0, 0, tmp.checked); + ɵɵelementStylingApply(0); } }, 3); @@ -97,7 +97,7 @@ describe('exports', () => { class MyComponent { constructor() { myComponent = this; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComponent, selectors: [['comp']], consts: 0, @@ -113,7 +113,7 @@ describe('exports', () => { constructor() { myDir = this; } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: MyDir, selectors: [['', 'myDir', '']], factory: () => new MyDir, @@ -124,12 +124,12 @@ describe('exports', () => { /**
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['myDir', '']); - Δelement(1, 'comp', null, ['myComp', '']); + ɵɵelement(0, 'div', ['myDir', '']); + ɵɵelement(1, 'comp', null, ['myComp', '']); } if (rf & RenderFlags.Update) { - const tmp = Δreference(2) as any; - ΔelementProperty(0, 'myDir', Δbind(tmp)); + const tmp = ɵɵreference(2) as any; + ɵɵelementProperty(0, 'myDir', ɵɵbind(tmp)); } }, 3, 1, [MyComponent, MyDir]); @@ -145,7 +145,7 @@ describe('exports', () => { constructor() { myComponent = this; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComponent, selectors: [['comp']], consts: 0, @@ -159,16 +159,16 @@ describe('exports', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtext(0); - Δtext(1); - Δelement(2, 'comp', null, ['myComp', '']); - Δelement(4, 'input', ['value', 'one'], ['myInput', '']); + ɵɵtext(0); + ɵɵtext(1); + ɵɵelement(2, 'comp', null, ['myComp', '']); + ɵɵelement(4, 'input', ['value', 'one'], ['myInput', '']); } if (rf & RenderFlags.Update) { - const tmp1 = Δreference(3) as any; - const tmp2 = Δreference(5) as any; - ΔtextBinding(0, Δbind(tmp2.value)); - ΔtextBinding(1, Δbind(tmp1.name)); + const tmp1 = ɵɵreference(3) as any; + const tmp2 = ɵɵreference(5) as any; + ɵɵtextBinding(0, ɵɵbind(tmp2.value)); + ɵɵtextBinding(1, ɵɵbind(tmp1.name)); } }, 6, 2, [MyComponent]); @@ -179,29 +179,29 @@ describe('exports', () => { it('should work inside a view container', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { if (ctx.condition) { - let rf1 = ΔembeddedViewStart(1, 2, 1); + let rf1 = ɵɵembeddedViewStart(1, 2, 1); { if (rf1 & RenderFlags.Create) { - Δtext(0); - Δelement(1, 'input', ['value', 'one'], ['myInput', '']); + ɵɵtext(0); + ɵɵelement(1, 'input', ['value', 'one'], ['myInput', '']); } if (rf1 & RenderFlags.Update) { - const tmp = Δreference(2) as any; - ΔtextBinding(0, Δbind(tmp.value)); + const tmp = ɵɵreference(2) as any; + ɵɵtextBinding(0, ɵɵbind(tmp.value)); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 2); @@ -230,48 +230,48 @@ describe('exports', () => { */ const App = createComponent('app', function(rf: RenderFlags, app: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'input', ['value', 'one'], ['outerInput', '']); - ΔelementEnd(); - Δtemplate(2, outerTemplate, 5, 2, 'div', [AttributeMarker.Template, 'ngIf']); + ɵɵelementStart(0, 'input', ['value', 'one'], ['outerInput', '']); + ɵɵelementEnd(); + ɵɵtemplate(2, outerTemplate, 5, 2, 'div', [AttributeMarker.Template, 'ngIf']); } if (rf & RenderFlags.Update) { - ΔelementProperty(2, 'ngIf', Δbind(app.outer)); + ɵɵelementProperty(2, 'ngIf', ɵɵbind(app.outer)); } }, 3, 1, [NgIf]); function outerTemplate(rf: RenderFlags, outer: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); + ɵɵelementStart(0, 'div'); { - Δtext(1); - ΔelementStart(2, 'input', ['value', 'two'], ['innerInput', '']); - ΔelementEnd(); - Δtemplate(4, innerTemplate, 2, 2, 'div', [AttributeMarker.Template, 'ngIf']); + ɵɵtext(1); + ɵɵelementStart(2, 'input', ['value', 'two'], ['innerInput', '']); + ɵɵelementEnd(); + ɵɵtemplate(4, innerTemplate, 2, 2, 'div', [AttributeMarker.Template, 'ngIf']); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - const app = ΔnextContext(); - const outerInput = Δreference(1) as any; - ΔtextBinding(1, Δbind(outerInput.value)); - ΔelementProperty(4, 'ngIf', Δbind(app.inner)); + const app = ɵɵnextContext(); + const outerInput = ɵɵreference(1) as any; + ɵɵtextBinding(1, ɵɵbind(outerInput.value)); + ɵɵelementProperty(4, 'ngIf', ɵɵbind(app.inner)); } } function innerTemplate(rf: RenderFlags, inner: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - { Δtext(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵtext(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔnextContext(); - const innerInput = Δreference(3) as any; - ΔnextContext(); - const outerInput = Δreference(1) as any; - ΔtextBinding(1, Δinterpolation2('', outerInput.value, ' - ', innerInput.value, '')); + ɵɵnextContext(); + const innerInput = ɵɵreference(3) as any; + ɵɵnextContext(); + const outerInput = ɵɵreference(1) as any; + ɵɵtextBinding(1, ɵɵinterpolation2('', outerInput.value, ' - ', innerInput.value, '')); } } diff --git a/packages/core/test/render3/host_binding_spec.ts b/packages/core/test/render3/host_binding_spec.ts index 7a6dbf0bba..7830beb205 100644 --- a/packages/core/test/render3/host_binding_spec.ts +++ b/packages/core/test/render3/host_binding_spec.ts @@ -8,13 +8,13 @@ import {ElementRef, QueryList, ViewContainerRef} from '@angular/core'; -import {AttributeMarker, ΔInheritDefinitionFeature, ΔNgOnChangesFeature, ΔProvidersFeature, ΔdefineComponent, ΔdefineDirective, Δtemplate} from '../../src/render3/index'; -import {ΔallocHostVars, Δbind, ΔdirectiveInject, Δelement, ΔelementAttribute, ΔelementEnd, ΔelementHostAttrs, ΔelementHostStyleProp, ΔelementHostStyling, ΔelementHostStylingApply, ΔelementProperty, ΔelementStart, ΔelementStyleProp, ΔelementStyling, ΔelementStylingApply, Δlistener, Δload, Δtext, ΔtextBinding} from '../../src/render3/instructions/all'; +import {AttributeMarker, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵtemplate} from '../../src/render3/index'; +import {ɵɵallocHostVars, ɵɵbind, ɵɵdirectiveInject, ɵɵelement, ɵɵelementAttribute, ɵɵelementEnd, ɵɵelementHostAttrs, ɵɵelementHostStyleProp, ɵɵelementHostStyling, ɵɵelementHostStylingApply, ɵɵelementProperty, ɵɵelementStart, ɵɵelementStyleProp, ɵɵelementStyling, ɵɵelementStylingApply, ɵɵlistener, ɵɵload, ɵɵtext, ɵɵtextBinding} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; -import {ΔpureFunction1, ΔpureFunction2} from '../../src/render3/pure_function'; -import {ΔcontentQuery, ΔloadContentQuery, ΔqueryRefresh} from '../../src/render3/query'; +import {ɵɵpureFunction1, ɵɵpureFunction2} from '../../src/render3/pure_function'; +import {ɵɵcontentQuery, ɵɵloadContentQuery, ɵɵqueryRefresh} from '../../src/render3/query'; import {bypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl, bypassSanitizationTrustUrl} from '../../src/sanitization/bypass'; -import {ΔsanitizeHtml, ΔsanitizeUrl, ΔsanitizeUrlOrResourceUrl} from '../../src/sanitization/sanitization'; +import {ɵɵsanitizeHtml, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl} from '../../src/sanitization/sanitization'; import {NgForOf} from './common_with_def'; import {ComponentFixture, TemplateFixture, createComponent, createDirective} from './render_util'; @@ -32,7 +32,7 @@ describe('host bindings', () => { class NameComp { names !: string[]; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: NameComp, selectors: [['name-comp']], factory: function NameComp_Factory() { return nameComp = new NameComp(); }, @@ -47,16 +47,16 @@ describe('host bindings', () => { // @HostBinding() id = 'foo'; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: HostBindingDir, selectors: [['', 'hostBindingDir', '']], factory: () => hostBindingDir = new HostBindingDir(), hostBindings: (rf: RenderFlags, ctx: any, elementIndex: number) => { if (rf & RenderFlags.Create) { - ΔallocHostVars(1); + ɵɵallocHostVars(1); } if (rf & RenderFlags.Update) { - ΔelementProperty(elementIndex, 'id', Δbind(ctx.id), null, true); + ɵɵelementProperty(elementIndex, 'id', ɵɵbind(ctx.id), null, true); } } }); @@ -66,7 +66,7 @@ describe('host bindings', () => { // @HostBinding() id = 'my-id'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: HostBindingComp, selectors: [['host-binding-comp']], factory: () => new HostBindingComp(), @@ -74,10 +74,10 @@ describe('host bindings', () => { vars: 0, hostBindings: (rf: RenderFlags, ctx: HostBindingComp, elIndex: number) => { if (rf & RenderFlags.Create) { - ΔallocHostVars(1); + ɵɵallocHostVars(1); } if (rf & RenderFlags.Update) { - ΔelementProperty(elIndex, 'id', Δbind(ctx.id), null, true); + ɵɵelementProperty(elIndex, 'id', ɵɵbind(ctx.id), null, true); } }, template: (rf: RenderFlags, ctx: HostBindingComp) => {} @@ -91,23 +91,23 @@ describe('host bindings', () => { // @HostBinding('className') klass = 'foo'; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Directive, selectors: [['', 'dir', '']], factory: () => directiveInstance = new Directive, hostBindings: (rf: RenderFlags, ctx: any, elementIndex: number) => { elementIndices.push(elementIndex); if (rf & RenderFlags.Create) { - ΔallocHostVars(1); + ɵɵallocHostVars(1); } if (rf & RenderFlags.Update) { - ΔelementProperty(elementIndex, 'className', Δbind(ctx.klass), null, true); + ɵɵelementProperty(elementIndex, 'className', ɵɵbind(ctx.klass), null, true); } } }); } - function Template() { Δelement(0, 'span', [AttributeMarker.Bindings, 'dir']); } + function Template() { ɵɵelement(0, 'span', [AttributeMarker.Bindings, 'dir']); } const fixture = new TemplateFixture(Template, () => {}, 1, 0, [Directive]); expect(fixture.html).toEqual(''); @@ -127,7 +127,7 @@ describe('host bindings', () => { // @HostBinding() id = 'my-id'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: HostBindingComp, selectors: [['host-binding-comp']], factory: () => new HostBindingComp(), @@ -136,10 +136,10 @@ describe('host bindings', () => { hostBindings: (rf: RenderFlags, ctx: HostBindingComp, elIndex: number) => { elementIndices.push(elIndex); if (rf & RenderFlags.Create) { - ΔallocHostVars(1); + ɵɵallocHostVars(1); } if (rf & RenderFlags.Update) { - ΔelementProperty(elIndex, 'id', Δbind(ctx.id), null, true); + ɵɵelementProperty(elIndex, 'id', ɵɵbind(ctx.id), null, true); } }, template: (rf: RenderFlags, ctx: HostBindingComp) => {} @@ -172,23 +172,23 @@ describe('host bindings', () => { constructor(public serviceOne: ServiceOne, public serviceTwo: ServiceTwo) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: CompWithProviders, selectors: [['comp-with-providers']], - factory: - () => new CompWithProviders(ΔdirectiveInject(ServiceOne), ΔdirectiveInject(ServiceTwo)), + factory: () => new CompWithProviders( + ɵɵdirectiveInject(ServiceOne), ɵɵdirectiveInject(ServiceTwo)), consts: 0, vars: 0, hostBindings: (rf: RenderFlags, ctx: CompWithProviders, elIndex: number) => { if (rf & RenderFlags.Create) { - ΔallocHostVars(1); + ɵɵallocHostVars(1); } if (rf & RenderFlags.Update) { - ΔelementProperty(elIndex, 'id', Δbind(ctx.id), null, true); + ɵɵelementProperty(elIndex, 'id', ɵɵbind(ctx.id), null, true); } }, template: (rf: RenderFlags, ctx: CompWithProviders) => {}, - features: [ΔProvidersFeature([[ServiceOne], [ServiceTwo]])] + features: [ɵɵProvidersFeature([[ServiceOne], [ServiceTwo]])] }); } @@ -209,7 +209,7 @@ describe('host bindings', () => { // @HostBinding() title = 'my-title'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: HostTitleComp, selectors: [['host-title-comp']], factory: () => new HostTitleComp(), @@ -217,10 +217,10 @@ describe('host bindings', () => { vars: 0, hostBindings: (rf: RenderFlags, ctx: HostTitleComp, elIndex: number) => { if (rf & RenderFlags.Create) { - ΔallocHostVars(1); + ɵɵallocHostVars(1); } if (rf & RenderFlags.Update) { - ΔelementProperty(elIndex, 'title', Δbind(ctx.title), null, true); + ɵɵelementProperty(elIndex, 'title', ɵɵbind(ctx.title), null, true); } }, template: (rf: RenderFlags, ctx: HostTitleComp) => {} @@ -234,9 +234,9 @@ describe('host bindings', () => { */ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['hostBindingDir', '']); - Δelement(1, 'div', ['someDir', '']); - Δelement(2, 'host-title-comp'); + ɵɵelement(0, 'div', ['hostBindingDir', '']); + ɵɵelement(1, 'div', ['someDir', '']); + ɵɵelement(2, 'host-title-comp'); } }, 3, 0, [HostBindingDir, SomeDir, HostTitleComp]); @@ -258,7 +258,7 @@ describe('host bindings', () => { // @HostBinding() id = 'blue'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: HostBindingComp, selectors: [['host-binding-comp']], factory: () => { @@ -270,10 +270,10 @@ describe('host bindings', () => { vars: 0, hostBindings: (rf: RenderFlags, ctx: HostBindingComp, elIndex: number) => { if (rf & RenderFlags.Create) { - ΔallocHostVars(1); + ɵɵallocHostVars(1); } if (rf & RenderFlags.Update) { - ΔelementProperty(elIndex, 'id', Δbind(ctx.id), null, true); + ɵɵelementProperty(elIndex, 'id', ɵɵbind(ctx.id), null, true); } }, template: (rf: RenderFlags, ctx: HostBindingComp) => {} @@ -286,8 +286,8 @@ describe('host bindings', () => { * */ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'host-binding-comp'); - Δelement(1, 'host-binding-comp'); + ɵɵelement(0, 'host-binding-comp'); + ɵɵelement(1, 'host-binding-comp'); } }, 2, 0, [HostBindingComp]); @@ -318,7 +318,7 @@ describe('host bindings', () => { /**
*/ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['someDir', '', 'hostBindingDir', '']); + ɵɵelement(0, 'div', ['someDir', '', 'hostBindingDir', '']); } }, 1, 0, [SomeDir, HostBindingDir]); @@ -350,20 +350,20 @@ describe('host bindings', () => { return `${this.inputValue}-${this.changesValue}-${this.initValue}-${this.checkValue}`; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: InitHookComp, selectors: [['init-hook-comp']], factory: () => new InitHookComp(), template: (rf: RenderFlags, ctx: InitHookComp) => {}, consts: 0, vars: 0, - features: [ΔNgOnChangesFeature()], + features: [ɵɵNgOnChangesFeature()], hostBindings: (rf: RenderFlags, ctx: InitHookComp, elIndex: number) => { if (rf & RenderFlags.Create) { - ΔallocHostVars(1); + ɵɵallocHostVars(1); } if (rf & RenderFlags.Update) { - ΔelementProperty(elIndex, 'title', Δbind(ctx.value), null, true); + ɵɵelementProperty(elIndex, 'title', ɵɵbind(ctx.value), null, true); } }, inputs: {inputValue: 'inputValue'} @@ -374,16 +374,16 @@ describe('host bindings', () => { class App { value = 'input'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: App, selectors: [['app']], factory: () => new App(), template: (rf: RenderFlags, ctx: App) => { if (rf & RenderFlags.Create) { - Δelement(0, 'init-hook-comp'); + ɵɵelement(0, 'init-hook-comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'inputValue', Δbind(ctx.value)); + ɵɵelementProperty(0, 'inputValue', ɵɵbind(ctx.value)); } }, consts: 1, @@ -411,16 +411,16 @@ describe('host bindings', () => { // @HostBinding('disabled') hostDisabled = false; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: HostBindingInputDir, selectors: [['', 'hostBindingDir', '']], factory: () => hostBindingInputDir = new HostBindingInputDir(), hostBindings: (rf: RenderFlags, ctx: HostBindingInputDir, elIndex: number) => { if (rf & RenderFlags.Create) { - ΔallocHostVars(1); + ɵɵallocHostVars(1); } if (rf & RenderFlags.Update) { - ΔelementProperty(elIndex, 'disabled', Δbind(ctx.hostDisabled), null, true); + ɵɵelementProperty(elIndex, 'disabled', ɵɵbind(ctx.hostDisabled), null, true); } }, inputs: {disabled: 'disabled'} @@ -431,16 +431,16 @@ describe('host bindings', () => { class App { isDisabled = true; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: App, selectors: [['app']], factory: () => new App(), template: (rf: RenderFlags, ctx: App) => { if (rf & RenderFlags.Create) { - Δelement(0, 'input', ['hostBindingDir', '']); + ɵɵelement(0, 'input', ['hostBindingDir', '']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'disabled', Δbind(ctx.isDisabled)); + ɵɵelementProperty(0, 'disabled', ɵɵbind(ctx.isDisabled)); } }, consts: 1, @@ -469,7 +469,7 @@ describe('host bindings', () => { /**
*/ const Parent = createComponent('parent', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['hostBindingDir', '']); + ɵɵelement(0, 'div', ['hostBindingDir', '']); } }, 1, 0, [HostBindingDir]); @@ -479,8 +479,8 @@ describe('host bindings', () => { */ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'parent'); - Δelement(1, 'parent'); + ɵɵelement(0, 'parent'); + ɵɵelement(1, 'parent'); } }, 2, 0, [Parent]); @@ -493,9 +493,9 @@ describe('host bindings', () => { it('should support host bindings in for loop', () => { function NgForTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - { Δelement(1, 'p', ['hostBindingDir', '']); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵelement(1, 'p', ['hostBindingDir', '']); } + ɵɵelementEnd(); } } @@ -506,10 +506,10 @@ describe('host bindings', () => { */ const App = createComponent('parent', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δtemplate(0, NgForTemplate, 2, 0, 'div', [AttributeMarker.Template, 'ngFor', 'ngForOf']); + ɵɵtemplate(0, NgForTemplate, 2, 0, 'div', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'ngForOf', Δbind(ctx.rows)); + ɵɵelementProperty(0, 'ngForOf', ɵɵbind(ctx.rows)); } }, 1, 1, [HostBindingDir, NgForOf]); @@ -532,11 +532,11 @@ describe('host bindings', () => { */ const AppComponent = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'name-comp'); - Δelement(1, 'host-binding-comp'); + ɵɵelement(0, 'name-comp'); + ɵɵelement(1, 'host-binding-comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'names', Δbind(ΔpureFunction1(1, ff, ctx.name))); + ɵɵelementProperty(0, 'names', ɵɵbind(ɵɵpureFunction1(1, ff, ctx.name))); } }, 2, 3, [HostBindingComp, NameComp]); @@ -584,7 +584,7 @@ describe('host bindings', () => { title = 'my title'; otherTitle = 'other title'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: HostBindingComp, selectors: [['host-binding-comp']], factory: () => hostBindingComp = new HostBindingComp(), @@ -593,13 +593,13 @@ describe('host bindings', () => { hostBindings: (rf: RenderFlags, ctx: HostBindingComp, elIndex: number) => { // LView: [..., id, dir, title, ctx.id, pf1, ctx.title, ctx.otherTitle, pf2] if (rf & RenderFlags.Create) { - ΔallocHostVars(8); + ɵɵallocHostVars(8); } if (rf & RenderFlags.Update) { - ΔelementProperty(elIndex, 'id', Δbind(ΔpureFunction1(3, ff, ctx.id)), null, true); - ΔelementProperty(elIndex, 'dir', Δbind(ctx.dir), null, true); - ΔelementProperty( - elIndex, 'title', Δbind(ΔpureFunction2(5, ff2, ctx.title, ctx.otherTitle)), null, + ɵɵelementProperty(elIndex, 'id', ɵɵbind(ɵɵpureFunction1(3, ff, ctx.id)), null, true); + ɵɵelementProperty(elIndex, 'dir', ɵɵbind(ctx.dir), null, true); + ɵɵelementProperty( + elIndex, 'title', ɵɵbind(ɵɵpureFunction2(5, ff2, ctx.title, ctx.otherTitle)), null, true); } }, @@ -613,11 +613,11 @@ describe('host bindings', () => { */ const AppComponent = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'name-comp'); - Δelement(1, 'host-binding-comp'); + ɵɵelement(0, 'name-comp'); + ɵɵelement(1, 'host-binding-comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'names', Δbind(ΔpureFunction2(1, ff3, ctx.name, ctx.otherName))); + ɵɵelementProperty(0, 'names', ɵɵbind(ɵɵpureFunction2(1, ff3, ctx.name, ctx.otherName))); } }, 2, 4, [HostBindingComp, NameComp]); @@ -663,7 +663,7 @@ describe('host bindings', () => { class HostBindingComp { id = 'blue'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: HostBindingComp, selectors: [['host-binding-comp']], factory: () => hostBindingComp = new HostBindingComp(), @@ -672,10 +672,10 @@ describe('host bindings', () => { hostBindings: (rf: RenderFlags, ctx: HostBindingComp, elIndex: number) => { // LView: [..., id, ctx.id, pf1] if (rf & RenderFlags.Create) { - ΔallocHostVars(3); + ɵɵallocHostVars(3); } if (rf & RenderFlags.Update) { - ΔelementProperty(elIndex, 'id', Δbind(ΔpureFunction1(1, ff, ctx.id)), null, true); + ɵɵelementProperty(elIndex, 'id', ɵɵbind(ɵɵpureFunction1(1, ff, ctx.id)), null, true); } }, template: (rf: RenderFlags, ctx: HostBindingComp) => {} @@ -696,18 +696,18 @@ describe('host bindings', () => { class HostBindingDir { title = 'my title'; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: HostBindingDir, selectors: [['', 'hostDir', '']], factory: () => hostBindingDir = new HostBindingDir(), hostBindings: (rf: RenderFlags, ctx: HostBindingDir, elIndex: number) => { // LView: [..., title, ctx.title, pf1] if (rf & RenderFlags.Create) { - ΔallocHostVars(3); + ɵɵallocHostVars(3); } if (rf & RenderFlags.Update) { - ΔelementProperty( - elIndex, 'title', Δbind(ΔpureFunction1(1, ff1, ctx.title)), null, true); + ɵɵelementProperty( + elIndex, 'title', ɵɵbind(ɵɵpureFunction1(1, ff1, ctx.title)), null, true); } } }); @@ -719,7 +719,7 @@ describe('host bindings', () => { */ const AppComponent = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'host-binding-comp', ['hostDir', '']); + ɵɵelement(0, 'host-binding-comp', ['hostDir', '']); } }, 1, 0, [HostBindingComp, HostBindingDir]); @@ -754,18 +754,18 @@ describe('host bindings', () => { class HostBindingDir { title = 'my title'; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: HostBindingDir, selectors: [['', 'hostDir', '']], factory: () => new HostBindingDir(), hostBindings: (rf: RenderFlags, ctx: HostBindingDir, elIndex: number) => { // LView [..., title, ctx.title, pf1] if (rf & RenderFlags.Create) { - ΔallocHostVars(3); + ɵɵallocHostVars(3); } if (rf & RenderFlags.Update) { - ΔelementProperty( - elIndex, 'title', Δbind(ΔpureFunction1(1, ff1, ctx.title)), null, true); + ɵɵelementProperty( + elIndex, 'title', ɵɵbind(ɵɵpureFunction1(1, ff1, ctx.title)), null, true); } } }); @@ -775,14 +775,14 @@ describe('host bindings', () => { /* @HostListener('click') */ onClick() { events.push('click!'); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: HostListenerDir, selectors: [['', 'hostListenerDir', '']], factory: function HostListenerDir_Factory() { return new HostListenerDir(); }, hostBindings: function HostListenerDir_HostBindings( rf: RenderFlags, ctx: any, elIndex: number) { if (rf & RenderFlags.Create) { - Δlistener('click', function() { return ctx.onClick(); }); + ɵɵlistener('click', function() { return ctx.onClick(); }); } } }); @@ -790,9 +790,9 @@ describe('host bindings', () => { // const fixture = new TemplateFixture(() => { - ΔelementStart(0, 'button', ['hostListenerDir', '', 'hostDir', '']); - Δtext(1, 'Click'); - ΔelementEnd(); + ɵɵelementStart(0, 'button', ['hostListenerDir', '', 'hostDir', '']); + ɵɵtext(1, 'Click'); + ɵɵelementEnd(); }, () => {}, 2, 0, [HostListenerDir, HostBindingDir]); const button = fixture.hostElement.querySelector('button') !; @@ -823,7 +823,7 @@ describe('host bindings', () => { id = 'blue'; title = 'blue'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: HostBindingComp, selectors: [['host-binding-comp']], factory: () => hostBindingComp = new HostBindingComp(), @@ -832,16 +832,16 @@ describe('host bindings', () => { hostBindings: (rf: RenderFlags, ctx: HostBindingComp, elIndex: number) => { // LView: [..., id, title, ctx.id, pf1, ctx.title, pf1] if (rf & RenderFlags.Create) { - ΔallocHostVars(6); + ɵɵallocHostVars(6); } if (rf & RenderFlags.Update) { - ΔelementProperty( - elIndex, 'id', Δbind(ctx.condition ? ΔpureFunction1(2, ff, ctx.id) : 'green'), null, - true); - ΔelementProperty( + ɵɵelementProperty( + elIndex, 'id', ɵɵbind(ctx.condition ? ɵɵpureFunction1(2, ff, ctx.id) : 'green'), + null, true); + ɵɵelementProperty( elIndex, 'title', - Δbind(ctx.otherCondition ? ΔpureFunction1(4, ff1, ctx.title) : 'other title'), null, - true); + ɵɵbind(ctx.otherCondition ? ɵɵpureFunction1(4, ff1, ctx.title) : 'other title'), + null, true); } }, template: (rf: RenderFlags, ctx: HostBindingComp) => {} @@ -854,11 +854,11 @@ describe('host bindings', () => { */ const AppComponent = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'host-binding-comp'); - Δtext(1); + ɵɵelement(0, 'host-binding-comp'); + ɵɵtext(1); } if (rf & RenderFlags.Update) { - ΔtextBinding(1, Δbind(ctx.name)); + ɵɵtextBinding(1, ɵɵbind(ctx.name)); } }, 2, 1, [HostBindingComp]); @@ -890,15 +890,15 @@ describe('host bindings', () => { class SuperDirective { id = 'my-id'; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: SuperDirective, selectors: [['', 'superDir', '']], hostBindings: (rf: RenderFlags, ctx: SuperDirective, elementIndex: number) => { if (rf & RenderFlags.Create) { - ΔallocHostVars(1); + ɵɵallocHostVars(1); } if (rf & RenderFlags.Update) { - ΔelementProperty(elementIndex, 'id', Δbind(ctx.id), null, true); + ɵɵelementProperty(elementIndex, 'id', ɵɵbind(ctx.id), null, true); } }, factory: () => superDir = new SuperDirective(), @@ -908,26 +908,26 @@ describe('host bindings', () => { class SubDirective extends SuperDirective { title = 'my-title'; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: SubDirective, selectors: [['', 'subDir', '']], hostBindings: (rf: RenderFlags, ctx: SubDirective, elementIndex: number) => { if (rf & RenderFlags.Create) { - ΔallocHostVars(1); + ɵɵallocHostVars(1); } if (rf & RenderFlags.Update) { - ΔelementProperty(elementIndex, 'title', Δbind(ctx.title), null, true); + ɵɵelementProperty(elementIndex, 'title', ɵɵbind(ctx.title), null, true); } }, factory: () => subDir = new SubDirective(), - features: [ΔInheritDefinitionFeature] + features: [ɵɵInheritDefinitionFeature] }); } const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['subDir', '']); - Δelement(1, 'div', ['superDir', '']); + ɵɵelement(0, 'div', ['subDir', '']); + ɵɵelement(1, 'div', ['superDir', '']); } }, 2, 0, [SubDirective, SuperDirective]); @@ -964,13 +964,13 @@ describe('host bindings', () => { // 'role': 'listbox' // } class HostAttributeDir { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ selectors: [['', 'hostAttributeDir', '']], type: HostAttributeDir, factory: () => new HostAttributeDir(), hostBindings: function(rf, ctx, elIndex) { if (rf & RenderFlags.Create) { - ΔelementHostAttrs(['role', 'listbox']); + ɵɵelementHostAttrs(['role', 'listbox']); } } }); @@ -979,7 +979,7 @@ describe('host bindings', () => { //
const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['hostAttributeDir', '']); + ɵɵelement(0, 'div', ['hostAttributeDir', '']); } }, 1, 0, [HostAttributeDir]); @@ -997,7 +997,7 @@ describe('host bindings', () => { // @ContentChildren('foo') foos !: QueryList; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: HostBindingWithContentChildren, selectors: [['host-binding-comp']], factory: () => new HostBindingWithContentChildren(), @@ -1005,19 +1005,19 @@ describe('host bindings', () => { vars: 0, hostBindings: (rf: RenderFlags, ctx: HostBindingWithContentChildren, elIndex: number) => { if (rf & RenderFlags.Create) { - ΔallocHostVars(1); + ɵɵallocHostVars(1); } if (rf & RenderFlags.Update) { - ΔelementProperty(elIndex, 'id', Δbind(ctx.foos.length), null, true); + ɵɵelementProperty(elIndex, 'id', ɵɵbind(ctx.foos.length), null, true); } }, contentQueries: (rf: RenderFlags, ctx: any, dirIndex: number) => { if (rf & RenderFlags.Create) { - ΔcontentQuery(dirIndex, ['foo'], false, null); + ɵɵcontentQuery(dirIndex, ['foo'], false, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadContentQuery()) && (ctx.foos = tmp); + ɵɵqueryRefresh(tmp = ɵɵloadContentQuery()) && (ctx.foos = tmp); } }, template: (rf: RenderFlags, cmp: HostBindingWithContentChildren) => {} @@ -1032,12 +1032,12 @@ describe('host bindings', () => { */ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'host-binding-comp'); + ɵɵelementStart(0, 'host-binding-comp'); { - Δelement(1, 'div', null, ['foo', '']); - Δelement(3, 'div', null, ['foo', '']); + ɵɵelement(1, 'div', null, ['foo', '']); + ɵɵelement(3, 'div', null, ['foo', '']); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 5, 0, [HostBindingWithContentChildren]); @@ -1059,7 +1059,7 @@ describe('host bindings', () => { ngAfterViewInit() { this.myValue = 'after-view'; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: HostBindingWithContentHooks, selectors: [['host-binding-comp']], factory: () => new HostBindingWithContentHooks(), @@ -1067,10 +1067,10 @@ describe('host bindings', () => { vars: 0, hostBindings: (rf: RenderFlags, ctx: HostBindingWithContentHooks, elIndex: number) => { if (rf & RenderFlags.Create) { - ΔallocHostVars(1); + ɵɵallocHostVars(1); } if (rf & RenderFlags.Update) { - ΔelementProperty(elIndex, 'id', Δbind(ctx.myValue), null, true); + ɵɵelementProperty(elIndex, 'id', ɵɵbind(ctx.myValue), null, true); } }, template: (rf: RenderFlags, cmp: HostBindingWithContentHooks) => {} @@ -1080,7 +1080,7 @@ describe('host bindings', () => { /** */ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'host-binding-comp'); + ɵɵelement(0, 'host-binding-comp'); } }, 1, 0, [HostBindingWithContentHooks]); @@ -1101,7 +1101,7 @@ describe('host bindings', () => { class HostBindingToStyles { width = 2; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: HostBindingToStyles, selectors: [['host-binding-to-styles']], factory: () => hostBindingDir = new HostBindingToStyles(), @@ -1109,11 +1109,11 @@ describe('host bindings', () => { vars: 0, hostBindings: (rf: RenderFlags, ctx: HostBindingToStyles, elIndex: number) => { if (rf & RenderFlags.Create) { - ΔelementHostStyling(null, ['width']); + ɵɵelementHostStyling(null, ['width']); } if (rf & RenderFlags.Update) { - ΔelementHostStyleProp(0, ctx.width, 'px'); - ΔelementHostStylingApply(); + ɵɵelementHostStyleProp(0, ctx.width, 'px'); + ɵɵelementHostStylingApply(); } }, template: (rf: RenderFlags, cmp: HostBindingToStyles) => {} @@ -1123,7 +1123,7 @@ describe('host bindings', () => { /** */ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'host-binding-to-styles'); + ɵɵelement(0, 'host-binding-to-styles'); } }, 1, 0, [HostBindingToStyles]); @@ -1147,17 +1147,17 @@ describe('host bindings', () => { class HostBindingToStyles { width = 2; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: HostBindingToStyles, selectors: [['', 'hostStyles', '']], factory: () => hostBindingDir = new HostBindingToStyles(), hostBindings: (rf: RenderFlags, ctx: HostBindingToStyles, elIndex: number) => { if (rf & RenderFlags.Create) { - ΔelementHostStyling(null, ['width']); + ɵɵelementHostStyling(null, ['width']); } if (rf & RenderFlags.Update) { - ΔelementHostStyleProp(0, ctx.width, 'px'); - ΔelementHostStylingApply(); + ɵɵelementHostStyleProp(0, ctx.width, 'px'); + ɵɵelementHostStylingApply(); } } }); @@ -1166,17 +1166,17 @@ describe('host bindings', () => { class ContainerDir { constructor(public vcr: ViewContainerRef) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: ContainerDir, selectors: [['', 'containerDir', '']], - factory: () => new ContainerDir(ΔdirectiveInject(ViewContainerRef as any)), + factory: () => new ContainerDir(ɵɵdirectiveInject(ViewContainerRef as any)), }); } /**
*/ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['containerDir', '', 'hostStyles', '']); + ɵɵelement(0, 'div', ['containerDir', '', 'hostStyles', '']); } }, 1, 0, [ContainerDir, HostBindingToStyles]); @@ -1196,7 +1196,7 @@ describe('host bindings', () => { * } */ class StaticHostClass { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: StaticHostClass, selectors: [['static-host-class']], factory: () => new StaticHostClass(), @@ -1204,11 +1204,11 @@ describe('host bindings', () => { vars: 0, hostBindings: (rf: RenderFlags, ctx: StaticHostClass, elIndex: number) => { if (rf & RenderFlags.Create) { - ΔelementHostAttrs([AttributeMarker.Classes, 'mat-toolbar']); - ΔelementHostStyling(['mat-toolbar']); + ɵɵelementHostAttrs([AttributeMarker.Classes, 'mat-toolbar']); + ɵɵelementHostStyling(['mat-toolbar']); } if (rf & RenderFlags.Update) { - ΔelementHostStylingApply(); + ɵɵelementHostStylingApply(); } }, template: (rf: RenderFlags, cmp: StaticHostClass) => {} @@ -1218,7 +1218,7 @@ describe('host bindings', () => { /** */ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'static-host-class'); + ɵɵelement(0, 'static-host-class'); } }, 1, 0, [StaticHostClass]); @@ -1236,24 +1236,24 @@ describe('host bindings', () => { let hostBindingDir: UnsafeUrlHostBindingDir; class UnsafeUrlHostBindingDir { // val: any = value; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: UnsafeUrlHostBindingDir, selectors: [['', 'unsafeUrlHostBindingDir', '']], factory: () => hostBindingDir = new UnsafeUrlHostBindingDir(), hostBindings: (rf: RenderFlags, ctx: any, elementIndex: number) => { if (rf & RenderFlags.Create) { - ΔallocHostVars(1); + ɵɵallocHostVars(1); } if (rf & RenderFlags.Update) { - const fn = isAttribute ? ΔelementAttribute : ΔelementProperty; - (fn as any)(elementIndex, prop, Δbind(ctx[prop]), sanitizeFn, true); + const fn = isAttribute ? ɵɵelementAttribute : ɵɵelementProperty; + (fn as any)(elementIndex, prop, ɵɵbind(ctx[prop]), sanitizeFn, true); } } }); } const fixture = new TemplateFixture(() => { - Δelement(0, tag, ['unsafeUrlHostBindingDir', '']); + ɵɵelement(0, tag, ['unsafeUrlHostBindingDir', '']); }, () => {}, 1, 0, [UnsafeUrlHostBindingDir]); const el = fixture.hostElement.querySelector(tag) !; @@ -1270,17 +1270,17 @@ describe('host bindings', () => { } verify( - 'a', 'href', 'javascript:alert(1)', 'unsafe:javascript:alert(1)', ΔsanitizeUrlOrResourceUrl, - bypassSanitizationTrustUrl); + 'a', 'href', 'javascript:alert(1)', 'unsafe:javascript:alert(1)', + ɵɵsanitizeUrlOrResourceUrl, bypassSanitizationTrustUrl); verify( 'script', 'src', bypassSanitizationTrustResourceUrl('javascript:alert(2)'), - 'javascript:alert(2)', ΔsanitizeUrlOrResourceUrl, bypassSanitizationTrustResourceUrl); + 'javascript:alert(2)', ɵɵsanitizeUrlOrResourceUrl, bypassSanitizationTrustResourceUrl); verify( - 'blockquote', 'cite', 'javascript:alert(3)', 'unsafe:javascript:alert(3)', ΔsanitizeUrl, + 'blockquote', 'cite', 'javascript:alert(3)', 'unsafe:javascript:alert(3)', ɵɵsanitizeUrl, bypassSanitizationTrustUrl); verify( 'b', 'innerHTML', '', - '', ΔsanitizeHtml, bypassSanitizationTrustHtml, + '', ɵɵsanitizeHtml, bypassSanitizationTrustHtml, /* isAttribute */ false); }); }); diff --git a/packages/core/test/render3/i18n_spec.ts b/packages/core/test/render3/i18n_spec.ts index 79d6ac7c5a..8f47b2509a 100644 --- a/packages/core/test/render3/i18n_spec.ts +++ b/packages/core/test/render3/i18n_spec.ts @@ -10,9 +10,9 @@ import {NgForOfContext} from '@angular/common'; import {noop} from '../../../compiler/src/render3/view/util'; import {Component as _Component} from '../../src/core'; -import {ΔdefineComponent, ΔdefineDirective} from '../../src/render3/definition'; -import {getTranslationForTemplate, Δi18n, Δi18nApply, Δi18nAttributes, Δi18nEnd, Δi18nExp, Δi18nPostprocess, Δi18nStart} from '../../src/render3/i18n'; -import {ΔallocHostVars, Δbind, Δelement, ΔelementContainerEnd, ΔelementContainerStart, ΔelementEnd, ΔelementProperty, ΔelementStart, ΔnextContext, Δprojection, ΔprojectionDef, Δtemplate, Δtext, ΔtextBinding} from '../../src/render3/instructions/all'; +import {ɵɵdefineComponent, ɵɵdefineDirective} from '../../src/render3/definition'; +import {getTranslationForTemplate, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart} from '../../src/render3/i18n'; +import {ɵɵallocHostVars, ɵɵbind, ɵɵelement, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵnextContext, ɵɵprojection, ɵɵprojectionDef, ɵɵtemplate, ɵɵtext, ɵɵtextBinding} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; import {COMMENT_MARKER, ELEMENT_MARKER, I18nMutateOpCode, I18nUpdateOpCode, I18nUpdateOpCodes, IcuType, TI18n} from '../../src/render3/interfaces/i18n'; import {AttributeMarker} from '../../src/render3/interfaces/node'; @@ -81,7 +81,7 @@ describe('Runtime i18n', () => { const MSG_DIV = `simple text`; const nbConsts = 1; const index = 0; - const opCodes = getOpCodes(() => { Δi18nStart(index, MSG_DIV); }, null, nbConsts, index); + const opCodes = getOpCodes(() => { ɵɵi18nStart(index, MSG_DIV); }, null, nbConsts, index); // Check debug @@ -113,7 +113,7 @@ describe('Runtime i18n', () => { const index = 1; const elementIndex = 2; const elementIndex2 = 3; - const opCodes = getOpCodes(() => { Δi18nStart(index, MSG_DIV); }, null, nbConsts, index); + const opCodes = getOpCodes(() => { ɵɵi18nStart(index, MSG_DIV); }, null, nbConsts, index); expect(opCodes).toEqual({ vars: 5, @@ -149,7 +149,7 @@ describe('Runtime i18n', () => { const MSG_DIV = `Hello �0�!`; const nbConsts = 2; const index = 1; - const opCodes = getOpCodes(() => { Δi18nStart(index, MSG_DIV); }, null, nbConsts, index); + const opCodes = getOpCodes(() => { ɵɵi18nStart(index, MSG_DIV); }, null, nbConsts, index); expect((opCodes as any).update.debug.operations).toEqual([ {__raw_opCode: 8, checkBit: 1, type: 'Text', nodeIndex: 2, text: 'Hello �0�!'} @@ -174,7 +174,7 @@ describe('Runtime i18n', () => { const MSG_DIV = `Hello �0� and �1�, again �0�!`; const nbConsts = 2; const index = 1; - const opCodes = getOpCodes(() => { Δi18nStart(index, MSG_DIV); }, null, nbConsts, index); + const opCodes = getOpCodes(() => { ɵɵi18nStart(index, MSG_DIV); }, null, nbConsts, index); expect(opCodes).toEqual({ vars: 1, @@ -207,7 +207,7 @@ describe('Runtime i18n', () => { let nbConsts = 3; let index = 1; const firstTextNode = 3; - let opCodes = getOpCodes(() => { Δi18nStart(index, MSG_DIV); }, null, nbConsts, index); + let opCodes = getOpCodes(() => { ɵɵi18nStart(index, MSG_DIV); }, null, nbConsts, index); expect(opCodes).toEqual({ vars: 2, @@ -237,7 +237,7 @@ describe('Runtime i18n', () => { index = 0; const spanElement = 1; const bElementSubTemplate = 2; - opCodes = getOpCodes(() => { Δi18nStart(index, MSG_DIV, 1); }, null, nbConsts, index); + opCodes = getOpCodes(() => { ɵɵi18nStart(index, MSG_DIV, 1); }, null, nbConsts, index); expect(opCodes).toEqual({ vars: 2, @@ -264,7 +264,7 @@ describe('Runtime i18n', () => { nbConsts = 2; index = 0; const bElement = 1; - opCodes = getOpCodes(() => { Δi18nStart(index, MSG_DIV, 2); }, null, nbConsts, index); + opCodes = getOpCodes(() => { ɵɵi18nStart(index, MSG_DIV, 2); }, null, nbConsts, index); expect(opCodes).toEqual({ vars: 1, @@ -289,7 +289,7 @@ describe('Runtime i18n', () => { }`; const nbConsts = 1; const index = 0; - const opCodes = getOpCodes(() => { Δi18nStart(index, MSG_DIV); }, null, nbConsts, index); + const opCodes = getOpCodes(() => { ɵɵi18nStart(index, MSG_DIV); }, null, nbConsts, index); const tIcuIndex = 0; const icuCommentNodeIndex = index + 1; const firstTextNodeIndex = index + 2; @@ -477,7 +477,7 @@ describe('Runtime i18n', () => { }`; const nbConsts = 1; const index = 0; - const opCodes = getOpCodes(() => { Δi18nStart(index, MSG_DIV); }, null, nbConsts, index); + const opCodes = getOpCodes(() => { ɵɵi18nStart(index, MSG_DIV); }, null, nbConsts, index); const icuCommentNodeIndex = index + 1; const firstTextNodeIndex = index + 2; const nestedIcuCommentNodeIndex = index + 3; @@ -590,9 +590,9 @@ describe('Runtime i18n', () => { it('for text', () => { const MSG_DIV = `simple text`; const fixture = prepareFixture(() => { - ΔelementStart(0, 'div'); - Δi18n(1, MSG_DIV); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵi18n(1, MSG_DIV); + ɵɵelementEnd(); }, null, 2); expect(fixture.html).toEqual(`
${MSG_DIV}
`); @@ -601,9 +601,9 @@ describe('Runtime i18n', () => { it('for bindings', () => { const MSG_DIV = `Hello �0�!`; const fixture = prepareFixture(() => { - ΔelementStart(0, 'div'); - Δi18n(1, MSG_DIV); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵi18n(1, MSG_DIV); + ɵɵelementEnd(); }, null, 2); // Template should be empty because there is no update template function @@ -617,12 +617,12 @@ describe('Runtime i18n', () => { it('for elements', () => { const MSG_DIV = `Hello �#3�world�/#3� and �#2�universe�/#2�!`; let fixture = prepareFixture(() => { - ΔelementStart(0, 'div'); - Δi18nStart(1, MSG_DIV); - Δelement(2, 'div'); - Δelement(3, 'span'); - Δi18nEnd(); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵi18nStart(1, MSG_DIV); + ɵɵelement(2, 'div'); + ɵɵelement(3, 'span'); + ɵɵi18nEnd(); + ɵɵelementEnd(); }, null, 4); expect(fixture.html).toEqual('
Hello world and
universe
!
'); @@ -631,25 +631,25 @@ describe('Runtime i18n', () => { it('for translations without top level element', () => { // When it's the first node let MSG_DIV = `Hello world`; - let fixture = prepareFixture(() => { Δi18n(0, MSG_DIV); }, null, 1); + let fixture = prepareFixture(() => { ɵɵi18n(0, MSG_DIV); }, null, 1); expect(fixture.html).toEqual('Hello world'); // When the first node is a text node MSG_DIV = ` world`; fixture = prepareFixture(() => { - Δtext(0, 'Hello'); - Δi18n(1, MSG_DIV); + ɵɵtext(0, 'Hello'); + ɵɵi18n(1, MSG_DIV); }, null, 2); expect(fixture.html).toEqual('Hello world'); // When the first node is an element fixture = prepareFixture(() => { - ΔelementStart(0, 'div'); - Δtext(1, 'Hello'); - ΔelementEnd(); - Δi18n(2, MSG_DIV); + ɵɵelementStart(0, 'div'); + ɵɵtext(1, 'Hello'); + ɵɵelementEnd(); + ɵɵi18n(2, MSG_DIV); }, null, 3); expect(fixture.html).toEqual('
Hello
world'); @@ -657,8 +657,8 @@ describe('Runtime i18n', () => { // When there is a node after MSG_DIV = `Hello `; fixture = prepareFixture(() => { - Δi18n(0, MSG_DIV); - Δtext(1, 'world'); + ɵɵi18n(0, MSG_DIV); + ɵɵtext(1, 'world'); }, null, 2); expect(fixture.html).toEqual('Hello world'); @@ -667,19 +667,19 @@ describe('Runtime i18n', () => { it('for deleted placeholders', () => { const MSG_DIV = `Hello �#3�world�/#3�`; let fixture = prepareFixture(() => { - ΔelementStart(0, 'div'); + ɵɵelementStart(0, 'div'); { - Δi18nStart(1, MSG_DIV); + ɵɵi18nStart(1, MSG_DIV); { - Δelement(2, 'div'); // Will be removed - Δelement(3, 'span'); + ɵɵelement(2, 'div'); // Will be removed + ɵɵelement(3, 'span'); } - Δi18nEnd(); + ɵɵi18nEnd(); } - ΔelementEnd(); - ΔelementStart(4, 'div'); - { Δtext(5, '!'); } - ΔelementEnd(); + ɵɵelementEnd(); + ɵɵelementStart(4, 'div'); + { ɵɵtext(5, '!'); } + ɵɵelementEnd(); }, null, 6); expect(fixture.html).toEqual('
Hello world
!
'); @@ -692,27 +692,27 @@ describe('Runtime i18n', () => { function subTemplate_1(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δi18nStart(0, MSG_DIV, 1); - ΔelementStart(1, 'div'); - Δtemplate(2, subTemplate_2, 2, 0, 'span', [AttributeMarker.Template, 'ngIf']); - ΔelementEnd(); - Δi18nEnd(); + ɵɵi18nStart(0, MSG_DIV, 1); + ɵɵelementStart(1, 'div'); + ɵɵtemplate(2, subTemplate_2, 2, 0, 'span', [AttributeMarker.Template, 'ngIf']); + ɵɵelementEnd(); + ɵɵi18nEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(2, 'ngIf', Δbind(true)); + ɵɵelementProperty(2, 'ngIf', ɵɵbind(true)); } } function subTemplate_2(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δi18nStart(0, MSG_DIV, 2); - Δelement(1, 'span'); - Δi18nEnd(); + ɵɵi18nStart(0, MSG_DIV, 2); + ɵɵelement(1, 'span'); + ɵɵi18nEnd(); } } class MyApp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, selectors: [['my-app']], directives: [NgIf], @@ -721,14 +721,14 @@ describe('Runtime i18n', () => { vars: 1, template: (rf: RenderFlags, ctx: MyApp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - Δi18nStart(1, MSG_DIV); - Δtemplate(2, subTemplate_1, 3, 1, 'div', [AttributeMarker.Template, 'ngIf']); - Δi18nEnd(); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵi18nStart(1, MSG_DIV); + ɵɵtemplate(2, subTemplate_1, 3, 1, 'div', [AttributeMarker.Template, 'ngIf']); + ɵɵi18nEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(2, 'ngIf', true); + ɵɵelementProperty(2, 'ngIf', true); } } }); @@ -746,9 +746,9 @@ describe('Runtime i18n', () => { other {�0� emails} }`; const fixture = prepareFixture(() => { - ΔelementStart(0, 'div'); - Δi18n(1, MSG_DIV); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵi18n(1, MSG_DIV); + ɵɵelementEnd(); }, null, 2); // Template should be empty because there is no update template function @@ -764,9 +764,9 @@ describe('Runtime i18n', () => { other {(�0�)} }`; const fixture = prepareFixture(() => { - ΔelementStart(0, 'div'); - Δi18n(1, MSG_DIV); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵi18n(1, MSG_DIV); + ɵɵelementEnd(); }, null, 2); // Template should be empty because there is no update template function @@ -782,12 +782,12 @@ describe('Runtime i18n', () => { other {(�0�)} }�/#3�`; const fixture = prepareFixture(() => { - ΔelementStart(0, 'div'); - Δi18nStart(1, MSG_DIV); - Δelement(2, 'span'); - Δelement(3, 'span'); - Δi18nEnd(); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵi18nStart(1, MSG_DIV); + ɵɵelement(2, 'span'); + ɵɵelement(3, 'span'); + ɵɵi18nEnd(); + ɵɵelementEnd(); }, null, 4); // Template should be empty because there is no update template function @@ -803,15 +803,15 @@ describe('Runtime i18n', () => { function subTemplate_1(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δi18nStart(0, MSG_DIV, 1); - Δelement(1, 'span'); - Δi18nEnd(); + ɵɵi18nStart(0, MSG_DIV, 1); + ɵɵelement(1, 'span'); + ɵɵi18nEnd(); } if (rf & RenderFlags.Update) { - const ctx = ΔnextContext(); - Δi18nExp(Δbind(ctx.value0)); - Δi18nExp(Δbind(ctx.value1)); - Δi18nApply(0); + const ctx = ɵɵnextContext(); + ɵɵi18nExp(ɵɵbind(ctx.value0)); + ɵɵi18nExp(ɵɵbind(ctx.value1)); + ɵɵi18nApply(0); } } @@ -819,7 +819,7 @@ describe('Runtime i18n', () => { value0 = 0; value1 = 'emails label'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, selectors: [['my-app']], directives: [NgIf], @@ -828,14 +828,14 @@ describe('Runtime i18n', () => { vars: 1, template: (rf: RenderFlags, ctx: MyApp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - Δi18nStart(1, MSG_DIV); - Δtemplate(2, subTemplate_1, 2, 2, 'span', [AttributeMarker.Template, 'ngIf']); - Δi18nEnd(); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵi18nStart(1, MSG_DIV); + ɵɵtemplate(2, subTemplate_1, 2, 2, 'span', [AttributeMarker.Template, 'ngIf']); + ɵɵi18nEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(2, 'ngIf', true); + ɵɵelementProperty(2, 'ngIf', true); } } }); @@ -861,18 +861,18 @@ describe('Runtime i18n', () => { }`; const fixture = prepareFixture( () => { - ΔelementStart(0, 'div'); + ɵɵelementStart(0, 'div'); { - ΔelementContainerStart(1); - { Δi18n(2, MSG_DIV); } - ΔelementContainerEnd(); + ɵɵelementContainerStart(1); + { ɵɵi18n(2, MSG_DIV); } + ɵɵelementContainerEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); }, () => { - Δi18nExp(Δbind(0)); - Δi18nExp(Δbind('more than one')); - Δi18nApply(2); + ɵɵi18nExp(ɵɵbind(0)); + ɵɵi18nExp(ɵɵbind('more than one')); + ɵɵi18nApply(2); }, 3, 2); @@ -889,9 +889,9 @@ describe('Runtime i18n', () => { }!} }`; const fixture = prepareFixture(() => { - ΔelementStart(0, 'div'); - Δi18n(1, MSG_DIV); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵi18n(1, MSG_DIV); + ɵɵelementEnd(); }, null, 2); // Template should be empty because there is no update template function @@ -906,9 +906,9 @@ describe('Runtime i18n', () => { const nbConsts = 2; const index = 1; const fixture = prepareFixture(() => { - ΔelementStart(0, 'div'); - Δi18nAttributes(index, MSG_div_attr); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵi18nAttributes(index, MSG_div_attr); + ɵɵelementEnd(); }, null, nbConsts, index); const tView = fixture.hostView[TVIEW]; const opCodes = tView.data[index + HEADER_OFFSET] as I18nUpdateOpCodes; @@ -925,7 +925,7 @@ describe('Runtime i18n', () => { const nbConsts = 2; const index = 1; const opCodes = - getOpCodes(() => { Δi18nAttributes(index, MSG_div_attr); }, null, nbConsts, index); + getOpCodes(() => { ɵɵi18nAttributes(index, MSG_div_attr); }, null, nbConsts, index); expect(opCodes).toEqual([ 0b1, // bindings mask @@ -942,7 +942,7 @@ describe('Runtime i18n', () => { const nbConsts = 2; const index = 1; const opCodes = - getOpCodes(() => { Δi18nAttributes(index, MSG_div_attr); }, null, nbConsts, index); + getOpCodes(() => { ɵɵi18nAttributes(index, MSG_div_attr); }, null, nbConsts, index); expect(opCodes).toEqual([ 0b11, // bindings mask @@ -958,7 +958,7 @@ describe('Runtime i18n', () => { const nbConsts = 2; const index = 1; const opCodes = - getOpCodes(() => { Δi18nAttributes(index, MSG_div_attr); }, null, nbConsts, index); + getOpCodes(() => { ɵɵi18nAttributes(index, MSG_div_attr); }, null, nbConsts, index); expect(opCodes).toEqual([ 0b1, // bindings mask @@ -982,13 +982,13 @@ describe('Runtime i18n', () => { const fixture = prepareFixture( () => { - ΔelementStart(0, 'div'); - Δi18n(1, MSG_DIV); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵi18n(1, MSG_DIV); + ɵɵelementEnd(); }, () => { - Δi18nExp(Δbind(ctx.value)); - Δi18nApply(1); + ɵɵi18nExp(ɵɵbind(ctx.value)); + ɵɵi18nApply(1); }, 2, 1); @@ -1003,13 +1003,13 @@ describe('Runtime i18n', () => { const fixture = prepareFixture( () => { - ΔelementStart(0, 'div'); - Δi18nAttributes(1, MSG_div_attr); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵi18nAttributes(1, MSG_div_attr); + ɵɵelementEnd(); }, () => { - Δi18nExp(Δbind(ctx.value)); - Δi18nApply(1); + ɵɵi18nExp(ɵɵbind(ctx.value)); + ɵɵi18nApply(1); }, 2, 1); @@ -1030,11 +1030,11 @@ describe('Runtime i18n', () => { const fixture = prepareFixture( () => { - ΔelementStart(0, 'div'); - Δi18nAttributes(1, MSG_div_attr); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵi18nAttributes(1, MSG_div_attr); + ɵɵelementEnd(); }, - () => { Δi18nApply(1); }, 2, 1); + () => { ɵɵi18nApply(1); }, 2, 1); expect(fixture.html).toEqual('
'); @@ -1050,14 +1050,14 @@ describe('Runtime i18n', () => { const fixture = prepareFixture( () => { - ΔelementStart(0, 'div'); - Δi18nAttributes(1, MSG_div_attr); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵi18nAttributes(1, MSG_div_attr); + ɵɵelementEnd(); }, () => { - Δi18nExp(Δbind(ctx.value0)); - Δi18nExp(Δbind(ctx.value1)); - Δi18nApply(1); + ɵɵi18nExp(ɵɵbind(ctx.value0)); + ɵɵi18nExp(ɵɵbind(ctx.value1)); + ɵɵi18nApply(1); }, 2, 2); @@ -1085,13 +1085,13 @@ describe('Runtime i18n', () => { const fixture = prepareFixture( () => { - ΔelementStart(0, 'div'); - Δi18nAttributes(1, MSG_div_attr); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵi18nAttributes(1, MSG_div_attr); + ɵɵelementEnd(); }, () => { - Δi18nExp(Δbind(ctx.value)); - Δi18nApply(1); + ɵɵi18nExp(ɵɵbind(ctx.value)); + ɵɵi18nApply(1); }, 2, 1); @@ -1117,14 +1117,14 @@ describe('Runtime i18n', () => { const fixture = prepareFixture( () => { - ΔelementStart(0, 'div'); - Δi18n(1, MSG_DIV); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵi18n(1, MSG_DIV); + ɵɵelementEnd(); }, () => { - Δi18nExp(Δbind(ctx.value0)); - Δi18nExp(Δbind(ctx.value1)); - Δi18nApply(1); + ɵɵi18nExp(ɵɵbind(ctx.value0)); + ɵɵi18nExp(ɵɵbind(ctx.value1)); + ɵɵi18nApply(1); }, 2, 2); expect(fixture.html).toEqual('
no emails!
'); @@ -1164,14 +1164,14 @@ describe('Runtime i18n', () => { const fixture = prepareFixture( () => { - ΔelementStart(0, 'div'); - Δi18n(1, MSG_DIV); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵi18n(1, MSG_DIV); + ɵɵelementEnd(); }, () => { - Δi18nExp(Δbind(ctx.value0)); - Δi18nExp(Δbind(ctx.value1)); - Δi18nApply(1); + ɵɵi18nExp(ɵɵbind(ctx.value0)); + ɵɵi18nExp(ɵɵbind(ctx.value1)); + ɵɵi18nApply(1); }, 2, 2); expect(fixture.html) @@ -1216,17 +1216,17 @@ describe('Runtime i18n', () => { const fixture = prepareFixture( () => { - ΔelementStart(0, 'div'); - Δi18nStart(1, MSG_DIV); - Δelement(2, 'span'); - Δelement(3, 'span'); - Δi18nEnd(); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵi18nStart(1, MSG_DIV); + ɵɵelement(2, 'span'); + ɵɵelement(3, 'span'); + ɵɵi18nEnd(); + ɵɵelementEnd(); }, () => { - Δi18nExp(Δbind(ctx.value0)); - Δi18nExp(Δbind(ctx.value1)); - Δi18nApply(1); + ɵɵi18nExp(ɵɵbind(ctx.value0)); + ɵɵi18nExp(ɵɵbind(ctx.value1)); + ɵɵi18nApply(1); }, 4, 2); expect(fixture.html) @@ -1277,14 +1277,14 @@ describe('Runtime i18n', () => { const fixture = prepareFixture( () => { - ΔelementStart(0, 'div'); - Δi18n(1, MSG_DIV); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵi18n(1, MSG_DIV); + ɵɵelementEnd(); }, () => { - Δi18nExp(Δbind(ctx.value0)); - Δi18nExp(Δbind(ctx.value1)); - Δi18nApply(1); + ɵɵi18nExp(ɵɵbind(ctx.value0)); + ɵɵi18nExp(ɵɵbind(ctx.value1)); + ɵɵi18nApply(1); }, 2, 2); @@ -1330,7 +1330,7 @@ describe('Runtime i18n', () => { exp1 = '1'; exp2 = '2'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, selectors: [['my-app']], factory: () => new MyApp(), @@ -1338,33 +1338,33 @@ describe('Runtime i18n', () => { vars: 2, template: (rf: RenderFlags, ctx: MyApp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); + ɵɵelementStart(0, 'div'); { - ΔelementStart(1, 'a'); - { Δi18n(2, MSG_DIV_1); } - ΔelementEnd(); - Δtext(3, 'hello'); - ΔelementStart(4, 'b'); + ɵɵelementStart(1, 'a'); + { ɵɵi18n(2, MSG_DIV_1); } + ɵɵelementEnd(); + ɵɵtext(3, 'hello'); + ɵɵelementStart(4, 'b'); { - Δi18nAttributes(5, MSG_DIV_2_ATTR); - Δi18nStart(6, MSG_DIV_2); + ɵɵi18nAttributes(5, MSG_DIV_2_ATTR); + ɵɵi18nStart(6, MSG_DIV_2); { - Δelement(7, 'c'); - Δelement(8, 'd'); // will be removed - Δelement(9, 'e'); // will be moved before `c` + ɵɵelement(7, 'c'); + ɵɵelement(8, 'd'); // will be removed + ɵɵelement(9, 'e'); // will be moved before `c` } - Δi18nEnd(); + ɵɵi18nEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - Δi18nExp(Δbind(ctx.exp1)); - Δi18nApply(2); - Δi18nExp(Δbind(ctx.exp1)); - Δi18nExp(Δbind(ctx.exp2)); - Δi18nApply(5); + ɵɵi18nExp(ɵɵbind(ctx.exp1)); + ɵɵi18nApply(2); + ɵɵi18nExp(ɵɵbind(ctx.exp1)); + ɵɵi18nExp(ɵɵbind(ctx.exp2)); + ɵɵi18nApply(5); } } }); @@ -1389,7 +1389,7 @@ describe('Runtime i18n', () => { const MSG_DIV_3 = `Section 3`; class MyApp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, selectors: [['my-app']], factory: () => new MyApp(), @@ -1397,24 +1397,24 @@ describe('Runtime i18n', () => { vars: 0, template: (rf: RenderFlags, ctx: MyApp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); + ɵɵelementStart(0, 'div'); { - ΔelementStart(1, 'div'); - { Δi18n(2, MSG_DIV_1); } - ΔelementEnd(); - ΔelementStart(3, 'div'); - { Δi18n(4, MSG_DIV_2); } - ΔelementEnd(); - ΔelementStart(5, 'div'); - { Δi18n(6, MSG_DIV_3); } - ΔelementEnd(); + ɵɵelementStart(1, 'div'); + { ɵɵi18n(2, MSG_DIV_1); } + ɵɵelementEnd(); + ɵɵelementStart(3, 'div'); + { ɵɵi18n(4, MSG_DIV_2); } + ɵɵelementEnd(); + ɵɵelementStart(5, 'div'); + { ɵɵi18n(6, MSG_DIV_3); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - Δi18nApply(2); - Δi18nApply(4); - Δi18nApply(6); + ɵɵi18nApply(2); + ɵɵi18nApply(4); + ɵɵi18nApply(6); } } }); @@ -1439,29 +1439,29 @@ describe('Runtime i18n', () => { function liTemplate(rf: RenderFlags, ctx: NgForOfContext) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'ul'); - ΔelementStart(1, 'li'); - { Δi18n(2, MSG_DIV_1); } - ΔelementEnd(); - ΔelementStart(3, 'li'); - { Δi18n(4, MSG_DIV_2); } - ΔelementEnd(); - ΔelementStart(5, 'li'); - { Δi18n(6, MSG_DIV_3); } - ΔelementEnd(); - ΔelementEnd(); + ɵɵelementStart(0, 'ul'); + ɵɵelementStart(1, 'li'); + { ɵɵi18n(2, MSG_DIV_1); } + ɵɵelementEnd(); + ɵɵelementStart(3, 'li'); + { ɵɵi18n(4, MSG_DIV_2); } + ɵɵelementEnd(); + ɵɵelementStart(5, 'li'); + { ɵɵi18n(6, MSG_DIV_3); } + ɵɵelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - Δi18nApply(2); - Δi18nApply(4); - Δi18nApply(6); + ɵɵi18nApply(2); + ɵɵi18nApply(4); + ɵɵi18nApply(6); } } class MyApp { items: string[] = ['1', '2', '3']; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, selectors: [['my-app']], factory: () => new MyApp(), @@ -1469,15 +1469,15 @@ describe('Runtime i18n', () => { vars: 1, template: (rf: RenderFlags, ctx: MyApp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); + ɵɵelementStart(0, 'div'); { - Δtemplate( + ɵɵtemplate( 1, liTemplate, 7, 0, 'ul', [AttributeMarker.Template, 'ngFor', 'ngForOf']); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(1, 'ngForOf', Δbind(ctx.items)); + ɵɵelementProperty(1, 'ngForOf', ɵɵbind(ctx.items)); } }, directives: () => [NgForOf] @@ -1503,7 +1503,7 @@ describe('Runtime i18n', () => { exp1 = '1'; exp2 = '2'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, selectors: [['my-app']], factory: () => new MyApp(), @@ -1511,28 +1511,28 @@ describe('Runtime i18n', () => { vars: 5, template: (rf: RenderFlags, ctx: MyApp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); + ɵɵelementStart(0, 'div'); { - Δi18nAttributes(1, MSG_DIV_1_ATTR_1); - Δi18nStart(2, MSG_DIV_1); + ɵɵi18nAttributes(1, MSG_DIV_1_ATTR_1); + ɵɵi18nStart(2, MSG_DIV_1); { - ΔelementStart(3, 'b'); // Will be removed - { Δi18nAttributes(4, MSG_DIV_1_ATTR_1); } - ΔelementEnd(); + ɵɵelementStart(3, 'b'); // Will be removed + { ɵɵi18nAttributes(4, MSG_DIV_1_ATTR_1); } + ɵɵelementEnd(); } - Δi18nEnd(); + ɵɵi18nEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - Δi18nExp(Δbind(ctx.exp1)); - Δi18nExp(Δbind(ctx.exp2)); - Δi18nApply(1); - Δi18nExp(Δbind(ctx.exp1)); - Δi18nApply(2); - Δi18nExp(Δbind(ctx.exp1)); - Δi18nExp(Δbind(ctx.exp2)); - Δi18nApply(4); + ɵɵi18nExp(ɵɵbind(ctx.exp1)); + ɵɵi18nExp(ɵɵbind(ctx.exp2)); + ɵɵi18nApply(1); + ɵɵi18nExp(ɵɵbind(ctx.exp1)); + ɵɵi18nApply(2); + ɵɵi18nExp(ɵɵbind(ctx.exp1)); + ɵɵi18nExp(ɵɵbind(ctx.exp2)); + ɵɵi18nApply(4); } } }); @@ -1549,7 +1549,7 @@ describe('Runtime i18n', () => { // @HostBinding('className') klass = 'foo'; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Directive, selectors: [['', 'dir', '']], factory: () => { @@ -1559,10 +1559,10 @@ describe('Runtime i18n', () => { }, hostBindings: (rf: RenderFlags, ctx: any, elementIndex: number) => { if (rf & RenderFlags.Create) { - ΔallocHostVars(1); + ɵɵallocHostVars(1); } if (rf & RenderFlags.Update) { - ΔelementProperty(elementIndex, 'className', Δbind(ctx.klass), null, true); + ɵɵelementProperty(elementIndex, 'className', ɵɵbind(ctx.klass), null, true); } } }); @@ -1588,7 +1588,7 @@ describe('Runtime i18n', () => { exp1 = 1; exp2 = 2; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, selectors: [['my-app']], factory: () => new MyApp(), @@ -1597,29 +1597,29 @@ describe('Runtime i18n', () => { directives: [Directive], template: (rf: RenderFlags, ctx: MyApp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', [AttributeMarker.Bindings, 'dir']); + ɵɵelementStart(0, 'div', [AttributeMarker.Bindings, 'dir']); { - Δi18nAttributes(1, MSG_DIV_1_ATTR_1); - Δi18nStart(2, MSG_DIV_1); + ɵɵi18nAttributes(1, MSG_DIV_1_ATTR_1); + ɵɵi18nStart(2, MSG_DIV_1); { - ΔelementStart(3, 'b', [AttributeMarker.Bindings, 'dir']); // Will be removed - { Δi18nAttributes(4, MSG_DIV_1_ATTR_1); } - ΔelementEnd(); + ɵɵelementStart(3, 'b', [AttributeMarker.Bindings, 'dir']); // Will be removed + { ɵɵi18nAttributes(4, MSG_DIV_1_ATTR_1); } + ɵɵelementEnd(); } - Δi18nEnd(); + ɵɵi18nEnd(); } - ΔelementEnd(); - Δelement(5, 'div', [AttributeMarker.Bindings, 'dir']); + ɵɵelementEnd(); + ɵɵelement(5, 'div', [AttributeMarker.Bindings, 'dir']); } if (rf & RenderFlags.Update) { - Δi18nExp(Δbind(ctx.exp1)); - Δi18nExp(Δbind(ctx.exp2)); - Δi18nApply(1); - Δi18nExp(Δbind(ctx.exp1)); - Δi18nApply(2); - Δi18nExp(Δbind(ctx.exp1)); - Δi18nExp(Δbind(ctx.exp2)); - Δi18nApply(4); + ɵɵi18nExp(ɵɵbind(ctx.exp1)); + ɵɵi18nExp(ɵɵbind(ctx.exp2)); + ɵɵi18nApply(1); + ɵɵi18nExp(ɵɵbind(ctx.exp1)); + ɵɵi18nApply(2); + ɵɵi18nExp(ɵɵbind(ctx.exp1)); + ɵɵi18nExp(ɵɵbind(ctx.exp2)); + ɵɵi18nApply(4); } } }); @@ -1644,21 +1644,21 @@ describe('Runtime i18n', () => { it('should fix the links when adding/moving/removing nodes', () => { const MSG_DIV = `�#2��/#2��#8��/#8��#4��/#4��#5��/#5�Hello World�#3��/#3��#7��/#7�`; let fixture = prepareFixture(() => { - ΔelementStart(0, 'div'); + ɵɵelementStart(0, 'div'); { - Δi18nStart(1, MSG_DIV); + ɵɵi18nStart(1, MSG_DIV); { - Δelement(2, 'div2'); - Δelement(3, 'div3'); - Δelement(4, 'div4'); - Δelement(5, 'div5'); - Δelement(6, 'div6'); - Δelement(7, 'div7'); - Δelement(8, 'div8'); + ɵɵelement(2, 'div2'); + ɵɵelement(3, 'div3'); + ɵɵelement(4, 'div4'); + ɵɵelement(5, 'div5'); + ɵɵelement(6, 'div6'); + ɵɵelement(7, 'div7'); + ɵɵelement(8, 'div8'); } - Δi18nEnd(); + ɵɵi18nEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); }, null, 9); expect(fixture.html) @@ -1688,7 +1688,7 @@ describe('Runtime i18n', () => { it('should project the translations', () => { @Component({selector: 'child', template: '

'}) class Child { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Child, selectors: [['child']], factory: () => new Child(), @@ -1696,10 +1696,10 @@ describe('Runtime i18n', () => { vars: 0, template: (rf: RenderFlags, cmp: Child) => { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'p'); - { Δprojection(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'p'); + { ɵɵprojection(1); } + ɵɵelementEnd(); } } }); @@ -1732,7 +1732,7 @@ describe('Runtime i18n', () => { }) class Parent { name: string = 'Parent'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Parent, selectors: [['parent']], directives: [Child], @@ -1741,32 +1741,32 @@ describe('Runtime i18n', () => { vars: 2, template: (rf: RenderFlags, cmp: Parent) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); + ɵɵelementStart(0, 'div'); { - Δi18nStart(1, MSG_DIV_SECTION_1); + ɵɵi18nStart(1, MSG_DIV_SECTION_1); { - ΔelementStart(2, 'child'); + ɵɵelementStart(2, 'child'); { - ΔelementStart(3, 'b'); + ɵɵelementStart(3, 'b'); { - Δi18nAttributes(4, MSG_ATTR_1); - Δelement(5, 'remove-me-1'); + ɵɵi18nAttributes(4, MSG_ATTR_1); + ɵɵelement(5, 'remove-me-1'); } - ΔelementEnd(); - Δelement(6, 'remove-me-2'); + ɵɵelementEnd(); + ɵɵelement(6, 'remove-me-2'); } - ΔelementEnd(); - Δelement(7, 'remove-me-3'); + ɵɵelementEnd(); + ɵɵelement(7, 'remove-me-3'); } - Δi18nEnd(); + ɵɵi18nEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - Δi18nExp(Δbind(cmp.name)); - Δi18nApply(1); - Δi18nExp(Δbind(cmp.name)); - Δi18nApply(4); + ɵɵi18nExp(ɵɵbind(cmp.name)); + ɵɵi18nApply(1); + ɵɵi18nExp(ɵɵbind(cmp.name)); + ɵɵi18nApply(4); } } }); @@ -1784,7 +1784,7 @@ describe('Runtime i18n', () => { it('should project a translated i18n block', () => { @Component({selector: 'child', template: '

'}) class Child { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Child, selectors: [['child']], factory: () => new Child(), @@ -1792,10 +1792,10 @@ describe('Runtime i18n', () => { vars: 0, template: (rf: RenderFlags, cmp: Child) => { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'p'); - { Δprojection(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'p'); + { ɵɵprojection(1); } + ɵɵelementEnd(); } } }); @@ -1825,7 +1825,7 @@ describe('Runtime i18n', () => { }) class Parent { name: string = 'Parent'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Parent, selectors: [['parent']], directives: [Child], @@ -1834,28 +1834,28 @@ describe('Runtime i18n', () => { vars: 2, template: (rf: RenderFlags, cmp: Parent) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); + ɵɵelementStart(0, 'div'); { - ΔelementStart(1, 'child'); + ɵɵelementStart(1, 'child'); { - Δelement(2, 'any'); - ΔelementStart(3, 'b'); + ɵɵelement(2, 'any'); + ɵɵelementStart(3, 'b'); { - Δi18nAttributes(4, MSG_ATTR_1); - Δi18n(5, MSG_DIV_SECTION_1); + ɵɵi18nAttributes(4, MSG_ATTR_1); + ɵɵi18n(5, MSG_DIV_SECTION_1); } - ΔelementEnd(); - Δelement(6, 'any'); + ɵɵelementEnd(); + ɵɵelement(6, 'any'); } - ΔelementEnd(); + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - Δi18nExp(Δbind(cmp.name)); - Δi18nApply(4); - Δi18nExp(Δbind(cmp.name)); - Δi18nApply(5); + ɵɵi18nExp(ɵɵbind(cmp.name)); + ɵɵi18nApply(4); + ɵɵi18nExp(ɵɵbind(cmp.name)); + ɵɵi18nApply(5); } } }); @@ -1887,7 +1887,7 @@ describe('Runtime i18n', () => { it('should re-project translations when multiple projections', () => { @Component({selector: 'grand-child', template: '
'}) class GrandChild { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: GrandChild, selectors: [['grand-child']], factory: () => new GrandChild(), @@ -1895,10 +1895,10 @@ describe('Runtime i18n', () => { vars: 0, template: (rf: RenderFlags, cmp: Child) => { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'div'); - { Δprojection(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'div'); + { ɵɵprojection(1); } + ɵɵelementEnd(); } } }); @@ -1907,7 +1907,7 @@ describe('Runtime i18n', () => { @Component( {selector: 'child', template: ''}) class Child { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Child, selectors: [['child']], directives: [GrandChild], @@ -1916,10 +1916,10 @@ describe('Runtime i18n', () => { vars: 0, template: (rf: RenderFlags, cmp: Child) => { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'grand-child'); - { Δprojection(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'grand-child'); + { ɵɵprojection(1); } + ɵɵelementEnd(); } } }); @@ -1935,7 +1935,7 @@ describe('Runtime i18n', () => { }) class Parent { name: string = 'Parent'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Parent, selectors: [['parent']], directives: [Child], @@ -1944,13 +1944,13 @@ describe('Runtime i18n', () => { vars: 0, template: (rf: RenderFlags, cmp: Parent) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - Δi18nStart(1, MSG_DIV_SECTION_1); - { Δelement(2, 'b'); } - Δi18nEnd(); + ɵɵi18nStart(1, MSG_DIV_SECTION_1); + { ɵɵelement(2, 'b'); } + ɵɵi18nEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } } }); @@ -1966,7 +1966,7 @@ describe('Runtime i18n', () => { xit('should re-project translations when removed placeholders', () => { @Component({selector: 'grand-child', template: '
'}) class GrandChild { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: GrandChild, selectors: [['grand-child']], factory: () => new GrandChild(), @@ -1974,10 +1974,10 @@ describe('Runtime i18n', () => { vars: 0, template: (rf: RenderFlags, cmp: Child) => { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'div'); - { Δprojection(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'div'); + { ɵɵprojection(1); } + ɵɵelementEnd(); } } }); @@ -1986,7 +1986,7 @@ describe('Runtime i18n', () => { @Component( {selector: 'child', template: ''}) class Child { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Child, selectors: [['child']], directives: [GrandChild], @@ -1995,10 +1995,10 @@ describe('Runtime i18n', () => { vars: 0, template: (rf: RenderFlags, cmp: Child) => { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'grand-child'); - { Δprojection(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'grand-child'); + { ɵɵprojection(1); } + ɵɵelementEnd(); } } }); @@ -2014,7 +2014,7 @@ describe('Runtime i18n', () => { }) class Parent { name: string = 'Parent'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Parent, selectors: [['parent']], directives: [Child], @@ -2023,15 +2023,15 @@ describe('Runtime i18n', () => { vars: 0, template: (rf: RenderFlags, cmp: Parent) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - Δi18nStart(1, MSG_DIV_SECTION_1); + ɵɵi18nStart(1, MSG_DIV_SECTION_1); { - Δelement(2, 'b'); // will be removed + ɵɵelement(2, 'b'); // will be removed } - Δi18nEnd(); + ɵɵi18nEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } } }); @@ -2050,7 +2050,7 @@ describe('Runtime i18n', () => { ` }) class Child { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Child, selectors: [['child']], factory: () => new Child(), @@ -2058,8 +2058,8 @@ describe('Runtime i18n', () => { vars: 0, template: (rf: RenderFlags, cmp: Child) => { if (rf & RenderFlags.Create) { - ΔprojectionDef([[['span']]]); - Δprojection(0, 1); + ɵɵprojectionDef([[['span']]]); + ɵɵprojection(0, 1); } } }); @@ -2079,7 +2079,7 @@ describe('Runtime i18n', () => { // Contenu }) class Parent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Parent, selectors: [['parent']], directives: [Child], @@ -2088,16 +2088,16 @@ describe('Runtime i18n', () => { vars: 0, template: (rf: RenderFlags, cmp: Parent) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); + ɵɵelementStart(0, 'child'); { - Δi18nStart(1, MSG_DIV_SECTION_1); + ɵɵi18nStart(1, MSG_DIV_SECTION_1); { - Δelement(2, 'span', ['title', 'keepMe']); - Δelement(3, 'span', ['title', 'deleteMe']); + ɵɵelement(2, 'span', ['title', 'keepMe']); + ɵɵelement(3, 'span', ['title', 'deleteMe']); } - Δi18nEnd(); + ɵɵi18nEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } } }); @@ -2185,7 +2185,7 @@ describe('Runtime i18n', () => { ], ]; cases.forEach(([input, replacements, output]) => { - expect(Δi18nPostprocess(input as string, replacements as any)).toEqual(output as string); + expect(ɵɵi18nPostprocess(input as string, replacements as any)).toEqual(output as string); }); }); @@ -2237,7 +2237,7 @@ describe('Runtime i18n', () => { �/*3:1� �#4� Bonjour - 5 �/#4� `; - expect(Δi18nPostprocess(generated.replace(/\s+/g, ''))).toEqual(final.replace(/\s+/g, '')); + expect(ɵɵi18nPostprocess(generated.replace(/\s+/g, ''))).toEqual(final.replace(/\s+/g, '')); }); it('should throw in case we have invalid string', () => { @@ -2255,7 +2255,7 @@ describe('Runtime i18n', () => { ['My ICU #1: �I18N_EXP_ICU�, My ICU #2: �I18N_EXP_ICU�', {ICU: ['ICU_VALUE_1']}] ]; cases.forEach(([input, replacements, output]) => { - expect(() => Δi18nPostprocess(input as string, replacements as any)).toThrowError(); + expect(() => ɵɵi18nPostprocess(input as string, replacements as any)).toThrowError(); }); }); }); diff --git a/packages/core/test/render3/inherit_definition_feature_spec.ts b/packages/core/test/render3/inherit_definition_feature_spec.ts index 0f9757351e..910878d2ff 100644 --- a/packages/core/test/render3/inherit_definition_feature_spec.ts +++ b/packages/core/test/render3/inherit_definition_feature_spec.ts @@ -7,7 +7,7 @@ */ import {ElementRef, Inject, InjectionToken, QueryList, ɵAttributeMarker as AttributeMarker} from '../../src/core'; -import {ΔallocHostVars, Δbind, ComponentDef, ΔcontentQuery, ΔdefineBase, ΔdefineComponent, ΔdefineDirective, DirectiveDef, ΔdirectiveInject, Δelement, ΔelementEnd, ΔelementProperty, ΔelementStart, ΔInheritDefinitionFeature, Δload, ΔloadContentQuery, ΔloadViewQuery, ΔNgOnChangesFeature, ΔProvidersFeature, ΔqueryRefresh, RenderFlags, ΔviewQuery,} from '../../src/render3/index'; +import {ɵɵallocHostVars, ɵɵbind, ComponentDef, ɵɵcontentQuery, ɵɵdefineBase, ɵɵdefineComponent, ɵɵdefineDirective, DirectiveDef, ɵɵdirectiveInject, ɵɵelement, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵInheritDefinitionFeature, ɵɵload, ɵɵloadContentQuery, ɵɵloadViewQuery, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵqueryRefresh, RenderFlags, ɵɵviewQuery,} from '../../src/render3/index'; import {ComponentFixture, createComponent, getDirectiveOnNode} from './render_util'; @@ -28,11 +28,11 @@ describe('InheritDefinitionFeature', () => { ngAfterViewChecked() {} ngDoCheck() {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: SubDirective, selectors: [['', 'subDir', '']], factory: () => new SubDirective(), - features: [ΔInheritDefinitionFeature] + features: [ɵɵInheritDefinitionFeature] }); } @@ -50,7 +50,7 @@ describe('InheritDefinitionFeature', () => { it('should inherit inputs', () => { class SuperDirective { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ inputs: { superFoo: ['foo', 'declaredFoo'], superBar: 'bar', @@ -63,7 +63,7 @@ describe('InheritDefinitionFeature', () => { } class SubDirective extends SuperDirective { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: SubDirective, inputs: { subBaz: 'baz', @@ -71,7 +71,7 @@ describe('InheritDefinitionFeature', () => { }, selectors: [['', 'subDir', '']], factory: () => new SubDirective(), - features: [ΔInheritDefinitionFeature] + features: [ɵɵInheritDefinitionFeature] }); } @@ -93,7 +93,7 @@ describe('InheritDefinitionFeature', () => { it('should inherit outputs', () => { class SuperDirective { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ outputs: { superFoo: 'foo', superBar: 'bar', @@ -106,7 +106,7 @@ describe('InheritDefinitionFeature', () => { } class SubDirective extends SuperDirective { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: SubDirective, outputs: { subBaz: 'baz', @@ -114,7 +114,7 @@ describe('InheritDefinitionFeature', () => { }, selectors: [['', 'subDir', '']], factory: () => new SubDirective(), - features: [ΔInheritDefinitionFeature] + features: [ɵɵInheritDefinitionFeature] }); } @@ -130,7 +130,7 @@ describe('InheritDefinitionFeature', () => { it('should detect EMPTY inputs and outputs', () => { class SuperDirective { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ inputs: { testIn: 'testIn', }, @@ -144,11 +144,11 @@ describe('InheritDefinitionFeature', () => { } class SubDirective extends SuperDirective { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: SubDirective, selectors: [['', 'subDir', '']], factory: () => new SubDirective(), - features: [ΔInheritDefinitionFeature] + features: [ɵɵInheritDefinitionFeature] }); } @@ -167,7 +167,7 @@ describe('InheritDefinitionFeature', () => { class Class5 { input5 = 'data, so data'; - static ngBaseDef = ΔdefineBase({ + static ngBaseDef = ɵɵdefineBase({ inputs: { input5: 'input5', }, @@ -177,14 +177,14 @@ describe('InheritDefinitionFeature', () => { class Class4 extends Class5 { input4 = 'hehe'; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ inputs: { input4: 'input4', }, type: Class4, selectors: [['', 'superDir', '']], factory: () => new Class4(), - features: [ΔInheritDefinitionFeature], + features: [ɵɵInheritDefinitionFeature], }); } @@ -193,7 +193,7 @@ describe('InheritDefinitionFeature', () => { class Class2 extends Class3 { input3 = 'wee'; - static ngBaseDef = ΔdefineBase({ + static ngBaseDef = ɵɵdefineBase({ inputs: { input3: ['alias3', 'input3'], } @@ -204,7 +204,7 @@ describe('InheritDefinitionFeature', () => { input1 = 'test'; input2 = 'whatever'; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Class1, inputs: { input1: 'input1', @@ -212,7 +212,7 @@ describe('InheritDefinitionFeature', () => { }, selectors: [['', 'subDir', '']], factory: () => new Class1(), - features: [ΔInheritDefinitionFeature], + features: [ɵɵInheritDefinitionFeature], }); } @@ -239,7 +239,7 @@ describe('InheritDefinitionFeature', () => { class Class5 { output5 = 'data, so data'; - static ngBaseDef = ΔdefineBase({ + static ngBaseDef = ɵɵdefineBase({ outputs: { output5: 'alias5', }, @@ -249,14 +249,14 @@ describe('InheritDefinitionFeature', () => { class Class4 extends Class5 { output4 = 'hehe'; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ outputs: { output4: 'alias4', }, type: Class4, selectors: [['', 'superDir', '']], factory: () => new Class4(), - features: [ΔInheritDefinitionFeature], + features: [ɵɵInheritDefinitionFeature], }); } @@ -265,7 +265,7 @@ describe('InheritDefinitionFeature', () => { class Class2 extends Class3 { output3 = 'wee'; - static ngBaseDef = ΔdefineBase({ + static ngBaseDef = ɵɵdefineBase({ outputs: { output3: 'alias3', } @@ -276,7 +276,7 @@ describe('InheritDefinitionFeature', () => { output1 = 'test'; output2 = 'whatever'; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Class1, outputs: { output1: 'alias1', @@ -284,7 +284,7 @@ describe('InheritDefinitionFeature', () => { }, selectors: [['', 'subDir', '']], factory: () => new Class1(), - features: [ΔInheritDefinitionFeature], + features: [ɵɵInheritDefinitionFeature], }); } @@ -305,15 +305,15 @@ describe('InheritDefinitionFeature', () => { class SuperDirective { id = 'my-id'; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: SuperDirective, selectors: [['', 'superDir', '']], hostBindings: (rf: RenderFlags, ctx: SuperDirective, elementIndex: number) => { if (rf & RenderFlags.Create) { - ΔallocHostVars(1); + ɵɵallocHostVars(1); } if (rf & RenderFlags.Update) { - ΔelementProperty(elementIndex, 'id', Δbind(ctx.id)); + ɵɵelementProperty(elementIndex, 'id', ɵɵbind(ctx.id)); } }, factory: () => new SuperDirective(), @@ -323,26 +323,26 @@ describe('InheritDefinitionFeature', () => { class SubDirective extends SuperDirective { title = 'my-title'; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: SubDirective, selectors: [['', 'subDir', '']], hostBindings: (rf: RenderFlags, ctx: SubDirective, elementIndex: number) => { if (rf & RenderFlags.Create) { - ΔallocHostVars(1); + ɵɵallocHostVars(1); } if (rf & RenderFlags.Update) { - ΔelementProperty(elementIndex, 'title', Δbind(ctx.title)); + ɵɵelementProperty(elementIndex, 'title', ɵɵbind(ctx.title)); } }, factory: () => subDir = new SubDirective(), - features: [ΔInheritDefinitionFeature] + features: [ɵɵInheritDefinitionFeature] }); } const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['subDir', '']); + ɵɵelement(0, 'div', ['subDir', '']); } }, 1, 0, [SubDirective]); @@ -374,7 +374,7 @@ describe('InheritDefinitionFeature', () => { */ class SuperComponent { superQuery?: QueryList; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: SuperComponent, template: () => {}, consts: 0, @@ -382,11 +382,11 @@ describe('InheritDefinitionFeature', () => { selectors: [['super-comp']], viewQuery: (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔviewQuery(['super'], false, null); + ɵɵviewQuery(['super'], false, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.superQuery = tmp as QueryList); } }, @@ -404,13 +404,13 @@ describe('InheritDefinitionFeature', () => { */ class SubComponent extends SuperComponent { subQuery?: QueryList; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: SubComponent, template: (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['id', 'sub'], ['sub', '']); - Δelement(2, 'div', ['id', 'super'], ['super', '']); - Δelement(4, 'some-comp'); + ɵɵelement(0, 'div', ['id', 'sub'], ['sub', '']); + ɵɵelement(2, 'div', ['id', 'super'], ['super', '']); + ɵɵelement(4, 'some-comp'); } }, consts: 5, @@ -418,16 +418,16 @@ describe('InheritDefinitionFeature', () => { selectors: [['sub-comp']], viewQuery: (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔviewQuery(['sub'], false, null); + ɵɵviewQuery(['sub'], false, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.subQuery = tmp as QueryList); } }, factory: () => new SubComponent(), - features: [ΔInheritDefinitionFeature], + features: [ɵɵInheritDefinitionFeature], directives: [SomeComp] }); } @@ -437,7 +437,7 @@ describe('InheritDefinitionFeature', () => { const log: Array<[string, RenderFlags, any]> = []; class SuperComponent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: SuperComponent, template: () => {}, consts: 0, @@ -451,7 +451,7 @@ describe('InheritDefinitionFeature', () => { } class SubComponent extends SuperComponent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: SubComponent, template: () => {}, consts: 0, @@ -461,7 +461,7 @@ describe('InheritDefinitionFeature', () => { log.push(['sub', rf, ctx]); }, factory: () => new SubComponent(), - features: [ΔInheritDefinitionFeature] + features: [ɵɵInheritDefinitionFeature] }); } @@ -497,8 +497,8 @@ describe('InheritDefinitionFeature', () => { const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'sub-comp'); - Δelement(1, 'sub-comp'); + ɵɵelement(0, 'sub-comp'); + ɵɵelement(1, 'sub-comp'); } subCompOne = getDirectiveOnNode(0); subCompTwo = getDirectiveOnNode(1); @@ -524,7 +524,7 @@ describe('InheritDefinitionFeature', () => { const log: string[] = []; class SuperDirective { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: SuperDirective, selectors: [['', 'superDir', '']], contentQueries: () => { log.push('super'); }, @@ -533,12 +533,12 @@ describe('InheritDefinitionFeature', () => { } class SubDirective extends SuperDirective { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: SubDirective, selectors: [['', 'subDir', '']], contentQueries: () => { log.push('sub'); }, factory: () => new SubDirective(), - features: [ΔInheritDefinitionFeature] + features: [ɵɵInheritDefinitionFeature] }); } @@ -555,17 +555,17 @@ describe('InheritDefinitionFeature', () => { // @ContentChildren('foo') foos !: QueryList; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: SuperDirective, selectors: [['', 'super-dir', '']], factory: () => new SuperDirective(), contentQueries: (rf: RenderFlags, ctx: any, dirIndex: number) => { if (rf & RenderFlags.Create) { - ΔcontentQuery(dirIndex, ['foo'], true, null); + ɵɵcontentQuery(dirIndex, ['foo'], true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadContentQuery()) && (ctx.foos = tmp); + ɵɵqueryRefresh(tmp = ɵɵloadContentQuery()) && (ctx.foos = tmp); } } }); @@ -575,20 +575,20 @@ describe('InheritDefinitionFeature', () => { // @ContentChildren('bar') bars !: QueryList; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: SubDirective, selectors: [['', 'sub-dir', '']], factory: () => dirInstance = new SubDirective(), contentQueries: (rf: RenderFlags, ctx: any, dirIndex: number) => { if (rf & RenderFlags.Create) { - ΔcontentQuery(dirIndex, ['bar'], true, null); + ɵɵcontentQuery(dirIndex, ['bar'], true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadContentQuery()) && (ctx.bars = tmp); + ɵɵqueryRefresh(tmp = ɵɵloadContentQuery()) && (ctx.bars = tmp); } }, - features: [ΔInheritDefinitionFeature] + features: [ɵɵInheritDefinitionFeature] }); } @@ -600,12 +600,12 @@ describe('InheritDefinitionFeature', () => { */ const AppComponent = createComponent('app-component', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', [AttributeMarker.Bindings, 'sub-dir']); + ɵɵelementStart(0, 'div', [AttributeMarker.Bindings, 'sub-dir']); { - Δelement(1, 'span', null, ['foo', '']); - Δelement(3, 'span', null, ['bar', '']); + ɵɵelement(1, 'span', null, ['foo', '']); + ɵɵelement(3, 'span', null, ['bar', '']); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 5, 0, [SubDirective]); @@ -616,7 +616,7 @@ describe('InheritDefinitionFeature', () => { it('should throw if inheriting a component from a directive', () => { class SuperComponent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: SuperComponent, template: () => {}, selectors: [['', 'superDir', '']], @@ -627,11 +627,11 @@ describe('InheritDefinitionFeature', () => { } expect(() => { - class SubDirective extends SuperComponent{static ngDirectiveDef = ΔdefineDirective({ + class SubDirective extends SuperComponent{static ngDirectiveDef = ɵɵdefineDirective({ type: SubDirective, selectors: [['', 'subDir', '']], factory: () => new SubDirective(), - features: [ΔInheritDefinitionFeature] + features: [ɵɵInheritDefinitionFeature] });} }).toThrowError('Directives cannot inherit Components'); }); @@ -643,24 +643,24 @@ describe('InheritDefinitionFeature', () => { // providers: [{ provide: SOME_DIRS, useClass: SuperDirective, multi: true }] class SuperDirective { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: SuperDirective, selectors: [['', 'superDir', '']], factory: () => new SuperDirective(), features: - [ΔProvidersFeature([{provide: SOME_DIRS, useClass: SuperDirective, multi: true}])], + [ɵɵProvidersFeature([{provide: SOME_DIRS, useClass: SuperDirective, multi: true}])], }); } // providers: [{ provide: SOME_DIRS, useClass: SubDirective, multi: true }] class SubDirective extends SuperDirective { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: SubDirective, selectors: [['', 'subDir', '']], factory: () => new SubDirective(), features: [ - ΔProvidersFeature([{provide: SOME_DIRS, useClass: SubDirective, multi: true}]), - ΔInheritDefinitionFeature + ɵɵProvidersFeature([{provide: SOME_DIRS, useClass: SubDirective, multi: true}]), + ɵɵInheritDefinitionFeature ], }); } @@ -668,17 +668,17 @@ describe('InheritDefinitionFeature', () => { class OtherDirective { constructor(@Inject(SOME_DIRS) public dirs: any) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: OtherDirective, selectors: [['', 'otherDir', '']], - factory: () => otherDir = new OtherDirective(ΔdirectiveInject(SOME_DIRS)), + factory: () => otherDir = new OtherDirective(ɵɵdirectiveInject(SOME_DIRS)), }); } /**
*/ const App = createComponent('app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['otherDir', '', 'subDir', '']); + ɵɵelement(0, 'div', ['otherDir', '', 'subDir', '']); } }, 1, 0, [OtherDirective, SubDirective, SuperDirective]); diff --git a/packages/core/test/render3/instructions_spec.ts b/packages/core/test/render3/instructions_spec.ts index 91c1b62fd7..7982557a70 100644 --- a/packages/core/test/render3/instructions_spec.ts +++ b/packages/core/test/render3/instructions_spec.ts @@ -7,13 +7,13 @@ */ import {NgForOfContext} from '@angular/common'; -import {ΔpropertyInterpolate, ΔpropertyInterpolate1, ΔpropertyInterpolate2, ΔpropertyInterpolate3, ΔpropertyInterpolate4, ΔpropertyInterpolate5, ΔpropertyInterpolate6, ΔpropertyInterpolate7, ΔpropertyInterpolate8, ΔpropertyInterpolateV} from '@angular/core/src/render3/instructions/all'; +import {ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV} from '@angular/core/src/render3/instructions/all'; -import {ΔdefineComponent} from '../../src/render3/definition'; -import {RenderFlags, Δbind, Δelement, ΔelementAttribute, ΔelementEnd, ΔelementProperty, ΔelementStart, ΔelementStyleProp, ΔelementStyling, ΔelementStylingApply, ΔelementStylingMap, Δinterpolation1, Δproperty, Δselect, Δtemplate, Δtext, ΔtextBinding} from '../../src/render3/index'; +import {ɵɵdefineComponent} from '../../src/render3/definition'; +import {RenderFlags, ɵɵbind, ɵɵelement, ɵɵelementAttribute, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵelementStyleProp, ɵɵelementStyling, ɵɵelementStylingApply, ɵɵelementStylingMap, ɵɵinterpolation1, ɵɵproperty, ɵɵselect, ɵɵtemplate, ɵɵtext, ɵɵtextBinding} from '../../src/render3/index'; import {AttributeMarker} from '../../src/render3/interfaces/node'; import {bypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript, bypassSanitizationTrustStyle, bypassSanitizationTrustUrl} from '../../src/sanitization/bypass'; -import {ΔdefaultStyleSanitizer, ΔsanitizeHtml, ΔsanitizeResourceUrl, ΔsanitizeScript, ΔsanitizeStyle, ΔsanitizeUrl} from '../../src/sanitization/sanitization'; +import {ɵɵdefaultStyleSanitizer, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl} from '../../src/sanitization/sanitization'; import {Sanitizer, SecurityContext} from '../../src/sanitization/security'; import {StyleSanitizeFn} from '../../src/sanitization/style_sanitizer'; @@ -22,9 +22,9 @@ import {ComponentFixture, TemplateFixture} from './render_util'; describe('instructions', () => { function createAnchor() { - ΔelementStart(0, 'a'); - ΔelementStyling(); - ΔelementEnd(); + ɵɵelementStart(0, 'a'); + ɵɵelementStyling(); + ɵɵelementEnd(); } function createDiv( @@ -38,21 +38,21 @@ describe('instructions', () => { if (initialStyles) { attrs.push(AttributeMarker.Styles, ...initialStyles); } - ΔelementStart(0, 'div', attrs); - ΔelementStyling(classBindingNames || null, styleBindingNames || null, styleSanitizer); - ΔelementEnd(); + ɵɵelementStart(0, 'div', attrs); + ɵɵelementStyling(classBindingNames || null, styleBindingNames || null, styleSanitizer); + ɵɵelementEnd(); } - function createScript() { Δelement(0, 'script'); } + function createScript() { ɵɵelement(0, 'script'); } describe('bind', () => { it('should update bindings when value changes', () => { const t = new TemplateFixture(createAnchor, () => {}, 1, 1); - t.update(() => ΔelementProperty(0, 'title', Δbind('Hello'))); + t.update(() => ɵɵelementProperty(0, 'title', ɵɵbind('Hello'))); expect(t.html).toEqual(''); - t.update(() => ΔelementProperty(0, 'title', Δbind('World'))); + t.update(() => ɵɵelementProperty(0, 'title', ɵɵbind('World'))); expect(t.html).toEqual(''); expect(ngDevMode).toHaveProperties({ firstTemplatePass: 1, @@ -64,7 +64,7 @@ describe('instructions', () => { }); it('should not update bindings when value does not change', () => { - const idempotentUpdate = () => ΔelementProperty(0, 'title', Δbind('Hello')); + const idempotentUpdate = () => ɵɵelementProperty(0, 'title', ɵɵbind('Hello')); const t = new TemplateFixture(createAnchor, idempotentUpdate, 1, 1); t.update(); @@ -85,7 +85,7 @@ describe('instructions', () => { describe('element', () => { it('should create an element', () => { const t = new TemplateFixture(() => { - Δelement(0, 'div', ['id', 'test', 'title', 'Hello']); + ɵɵelement(0, 'div', ['id', 'test', 'title', 'Hello']); }, () => {}, 1); const div = (t.hostElement as HTMLElement).querySelector('div') !; @@ -101,7 +101,7 @@ describe('instructions', () => { it('should allow setting namespaced attributes', () => { const t = new TemplateFixture(() => { - Δelement(0, 'div', [ + ɵɵelement(0, 'div', [ // id="test" 'id', 'test', @@ -145,12 +145,12 @@ describe('instructions', () => { it('should use sanitizer function', () => { const t = new TemplateFixture(createDiv, () => {}, 1); - t.update(() => ΔelementAttribute(0, 'title', 'javascript:true', ΔsanitizeUrl)); + t.update(() => ɵɵelementAttribute(0, 'title', 'javascript:true', ɵɵsanitizeUrl)); expect(t.html).toEqual('
'); t.update( - () => ΔelementAttribute( - 0, 'title', bypassSanitizationTrustUrl('javascript:true'), ΔsanitizeUrl)); + () => ɵɵelementAttribute( + 0, 'title', bypassSanitizationTrustUrl('javascript:true'), ɵɵsanitizeUrl)); expect(t.html).toEqual('
'); expect(ngDevMode).toHaveProperties({ firstTemplatePass: 1, @@ -162,29 +162,29 @@ describe('instructions', () => { }); }); - describe('Δselect', () => { + describe('ɵɵselect', () => { it('should error in DevMode if index is out of range', () => { // Only one constant added, meaning only index `0` is valid. const t = new TemplateFixture(createDiv, () => {}, 1, 0); - expect(() => { t.update(() => { Δselect(-1); }); }).toThrow(); - expect(() => { t.update(() => { Δselect(1); }); }).toThrow(); - expect(() => { t.update(() => { Δselect(0); }); }).not.toThrow(); + expect(() => { t.update(() => { ɵɵselect(-1); }); }).toThrow(); + expect(() => { t.update(() => { ɵɵselect(1); }); }).toThrow(); + expect(() => { t.update(() => { ɵɵselect(0); }); }).not.toThrow(); }); }); describe('property', () => { // TODO(benlesh): Replace with TestBed tests once the instruction is being generated. - it('should set properties of the Δselected element', () => { + it('should set properties of the ɵɵselected element', () => { //
const t = new TemplateFixture(createDiv, () => {}, 1, 1); t.update(() => { - Δselect(0); - Δproperty('title', 'one'); + ɵɵselect(0); + ɵɵproperty('title', 'one'); }); expect(t.html).toEqual('
'); t.update(() => { - Δselect(0); - Δproperty('title', 'two'); + ɵɵselect(0); + ɵɵproperty('title', 'two'); }); expect(t.html).toEqual('
'); expect(ngDevMode).toHaveProperties({ @@ -201,13 +201,13 @@ describe('instructions', () => { //
const t = new TemplateFixture(createDiv, () => {}, 1, 2); t.update(() => { - Δselect(0); - Δproperty('title', 'one')('accessKey', 'A'); + ɵɵselect(0); + ɵɵproperty('title', 'one')('accessKey', 'A'); }); expect(t.html).toEqual('
'); t.update(() => { - Δselect(0); - Δproperty('title', 'two')('accessKey', 'B'); + ɵɵselect(0); + ɵɵproperty('title', 'two')('accessKey', 'B'); }); expect(t.html).toEqual('
'); expect(ngDevMode).toHaveProperties({ @@ -224,13 +224,13 @@ describe('instructions', () => { //
const t = new TemplateFixture(createDiv, () => {}, 1, 2); t.update(() => { - Δselect(0); - Δproperty('title', 'one')('accessKey', 'A'); + ɵɵselect(0); + ɵɵproperty('title', 'one')('accessKey', 'A'); }); expect(t.html).toEqual('
'); t.update(() => { - Δselect(0); - Δproperty('title', 'two')('accessKey', 'A'); // Notice: only changing the title. + ɵɵselect(0); + ɵɵproperty('title', 'two')('accessKey', 'A'); // Notice: only changing the title. }); expect(t.html).toEqual('
'); expect(ngDevMode).toHaveProperties({ @@ -242,13 +242,13 @@ describe('instructions', () => { }); }); - it('should error in dev mode if Δselect was not called prior', () => { + it('should error in dev mode if ɵɵselect was not called prior', () => { const t = new TemplateFixture(createDiv, () => {}, 1, 1); - expect(() => { t.update(() => { Δproperty('title', 'test'); }); }).toThrow(); + expect(() => { t.update(() => { ɵɵproperty('title', 'test'); }); }).toThrow(); expect(() => { t.update(() => { - Δselect(0); - Δproperty('title', 'test'); + ɵɵselect(0); + ɵɵproperty('title', 'test'); }); }).not.toThrow(); }); @@ -259,19 +259,19 @@ describe('instructions', () => { * TODO: REMOVE ALL OF THESE TemplateFixture TESTS FOR TestBed TESTS AFTER COMPILER IS UPDATED * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - describe('ΔpropertyInterpolate instructions', () => { - describe('ΔpropertyInterpolate', () => { + describe('ɵɵpropertyInterpolate instructions', () => { + describe('ɵɵpropertyInterpolate', () => { it('should interpolate one value', () => { //
const t = new TemplateFixture(createDiv, () => {}, 1, 1); t.update(() => { - Δselect(0); - ΔpropertyInterpolate('title', 123); + ɵɵselect(0); + ɵɵpropertyInterpolate('title', 123); }); expect(t.html).toEqual('
'); t.update(() => { - Δselect(0); - ΔpropertyInterpolate('title', 'abc'); + ɵɵselect(0); + ɵɵpropertyInterpolate('title', 'abc'); }); expect(t.html).toEqual('
'); expect(ngDevMode).toHaveProperties({ @@ -287,13 +287,13 @@ describe('instructions', () => { //
const t = new TemplateFixture(createDiv, () => {}, 1, 2); t.update(() => { - Δselect(0); - ΔpropertyInterpolate('title', 123)('accessKey', 'A'); + ɵɵselect(0); + ɵɵpropertyInterpolate('title', 123)('accessKey', 'A'); }); expect(t.html).toEqual('
'); t.update(() => { - Δselect(0); - ΔpropertyInterpolate('title', 'abc')('accessKey', 'B'); + ɵɵselect(0); + ɵɵpropertyInterpolate('title', 'abc')('accessKey', 'B'); }); expect(t.html).toEqual('
'); expect(ngDevMode).toHaveProperties({ @@ -305,28 +305,28 @@ describe('instructions', () => { }); }); - it('should error if called without Δselect called first', () => { + it('should error if called without ɵɵselect called first', () => { const t = new TemplateFixture(createDiv, () => {}, 1, 1); - expect(() => { t.update(() => { ΔpropertyInterpolate('title', 123); }); }).toThrow(); + expect(() => { t.update(() => { ɵɵpropertyInterpolate('title', 123); }); }).toThrow(); expect(() => { - Δselect(0); - t.update(() => { ΔpropertyInterpolate('title', 123); }); + ɵɵselect(0); + t.update(() => { ɵɵpropertyInterpolate('title', 123); }); }).not.toThrow(); }); }); - describe('ΔpropertyInterpolate1', () => { + describe('ɵɵpropertyInterpolate1', () => { it('should interpolate one value', () => { //
const t = new TemplateFixture(createDiv, () => {}, 1, 1); t.update(() => { - Δselect(0); - ΔpropertyInterpolate1('title', 'start', 123, 'end'); + ɵɵselect(0); + ɵɵpropertyInterpolate1('title', 'start', 123, 'end'); }); expect(t.html).toEqual('
'); t.update(() => { - Δselect(0); - ΔpropertyInterpolate1('title', 'start', 'abc', 'end'); + ɵɵselect(0); + ɵɵpropertyInterpolate1('title', 'start', 'abc', 'end'); }); expect(t.html).toEqual('
'); expect(ngDevMode).toHaveProperties({ @@ -342,13 +342,13 @@ describe('instructions', () => { //
const t = new TemplateFixture(createDiv, () => {}, 1, 2); t.update(() => { - Δselect(0); - ΔpropertyInterpolate1('title', 'start', 123, 'end')('accessKey', 'start', 'A', 'end'); + ɵɵselect(0); + ɵɵpropertyInterpolate1('title', 'start', 123, 'end')('accessKey', 'start', 'A', 'end'); }); expect(t.html).toEqual('
'); t.update(() => { - Δselect(0); - ΔpropertyInterpolate1('title', 'start', 'abc', 'end')('accessKey', 'start', 'B', 'end'); + ɵɵselect(0); + ɵɵpropertyInterpolate1('title', 'start', 'abc', 'end')('accessKey', 'start', 'B', 'end'); }); expect(t.html).toEqual('
'); expect(ngDevMode).toHaveProperties({ @@ -360,30 +360,30 @@ describe('instructions', () => { }); }); - it('should error if called without Δselect called first', () => { + it('should error if called without ɵɵselect called first', () => { const t = new TemplateFixture(createDiv, () => {}, 1, 1); expect(() => { - t.update(() => { ΔpropertyInterpolate1('title', 'start', 'whatever', 'end'); }); + t.update(() => { ɵɵpropertyInterpolate1('title', 'start', 'whatever', 'end'); }); }).toThrow(); expect(() => { - Δselect(0); - t.update(() => { ΔpropertyInterpolate1('title', 'start', 'whatever', 'end'); }); + ɵɵselect(0); + t.update(() => { ɵɵpropertyInterpolate1('title', 'start', 'whatever', 'end'); }); }).not.toThrow(); }); }); - describe('ΔpropertyInterpolate2', () => { + describe('ɵɵpropertyInterpolate2', () => { it('should interpolate two values', () => { //
const t = new TemplateFixture(createDiv, () => {}, 1, 2); t.update(() => { - Δselect(0); - ΔpropertyInterpolate2('title', 'start: ', 0, ', 1: ', 1, ', end'); + ɵɵselect(0); + ɵɵpropertyInterpolate2('title', 'start: ', 0, ', 1: ', 1, ', end'); }); expect(t.html).toEqual('
'); t.update(() => { - Δselect(0); - ΔpropertyInterpolate2('title', 'start: ', 'A', ', 1: ', 'B', ', end'); + ɵɵselect(0); + ɵɵpropertyInterpolate2('title', 'start: ', 'A', ', 1: ', 'B', ', end'); }); expect(t.html).toEqual('
'); expect(ngDevMode).toHaveProperties({ @@ -400,15 +400,15 @@ describe('instructions', () => { // end">
const t = new TemplateFixture(createDiv, () => {}, 1, 4); t.update(() => { - Δselect(0); - ΔpropertyInterpolate2('title', 'start: ', 0, ', 1: ', 1, ', end')( + ɵɵselect(0); + ɵɵpropertyInterpolate2('title', 'start: ', 0, ', 1: ', 1, ', end')( 'accessKey', 'start: ', 0, ', 1: ', 1, ', end'); }); expect(t.html).toEqual( '
'); t.update(() => { - Δselect(0); - ΔpropertyInterpolate2('title', 'start: ', 'A', ', 1: ', 'B', ', end')( + ɵɵselect(0); + ɵɵpropertyInterpolate2('title', 'start: ', 'A', ', 1: ', 'B', ', end')( 'accessKey', 'start: ', 'A', ', 1: ', 'B', ', end'); }); expect(t.html).toEqual( @@ -422,30 +422,30 @@ describe('instructions', () => { }); }); - it('should error if called without Δselect called first', () => { + it('should error if called without ɵɵselect called first', () => { const t = new TemplateFixture(createDiv, () => {}, 1, 2); expect(() => { - t.update(() => { ΔpropertyInterpolate2('title', '', '', '', '', ''); }); + t.update(() => { ɵɵpropertyInterpolate2('title', '', '', '', '', ''); }); }).toThrow(); expect(() => { - Δselect(0); - t.update(() => { ΔpropertyInterpolate2('title', '', '', '', '', ''); }); + ɵɵselect(0); + t.update(() => { ɵɵpropertyInterpolate2('title', '', '', '', '', ''); }); }).not.toThrow(); }); }); - describe('ΔpropertyInterpolate3', () => { + describe('ɵɵpropertyInterpolate3', () => { it('should interpolate three values', () => { //
const t = new TemplateFixture(createDiv, () => {}, 1, 3); t.update(() => { - Δselect(0); - ΔpropertyInterpolate3('title', 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', end'); + ɵɵselect(0); + ɵɵpropertyInterpolate3('title', 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', end'); }); expect(t.html).toEqual('
'); t.update(() => { - Δselect(0); - ΔpropertyInterpolate3('title', 'start: ', 'A', ', 1: ', 'B', ', 2: ', 'C', ', end'); + ɵɵselect(0); + ɵɵpropertyInterpolate3('title', 'start: ', 'A', ', 1: ', 'B', ', 2: ', 'C', ', end'); }); expect(t.html).toEqual('
'); expect(ngDevMode).toHaveProperties({ @@ -462,15 +462,15 @@ describe('instructions', () => { // 2: {{v2}}, end">
const t = new TemplateFixture(createDiv, () => {}, 1, 6); t.update(() => { - Δselect(0); - ΔpropertyInterpolate3('title', 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', end')( + ɵɵselect(0); + ɵɵpropertyInterpolate3('title', 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', end')( 'accessKey', 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', end'); }); expect(t.html).toEqual( '
'); t.update(() => { - Δselect(0); - ΔpropertyInterpolate3('title', 'start: ', 'A', ', 1: ', 'B', ', 2: ', 'C', ', end')( + ɵɵselect(0); + ɵɵpropertyInterpolate3('title', 'start: ', 'A', ', 1: ', 'B', ', 2: ', 'C', ', end')( 'accessKey', 'start: ', 'A', ', 1: ', 'B', ', 2: ', 'C', ', end'); }); expect(t.html).toEqual( @@ -484,31 +484,32 @@ describe('instructions', () => { }); }); - it('should error if called without Δselect called first', () => { + it('should error if called without ɵɵselect called first', () => { const t = new TemplateFixture(createDiv, () => {}, 1, 3); expect(() => { - t.update(() => { ΔpropertyInterpolate3('title', '', '', '', '', '', '', ''); }); + t.update(() => { ɵɵpropertyInterpolate3('title', '', '', '', '', '', '', ''); }); }).toThrow(); expect(() => { - Δselect(0); - t.update(() => { ΔpropertyInterpolate3('title', '', '', '', '', '', '', ''); }); + ɵɵselect(0); + t.update(() => { ɵɵpropertyInterpolate3('title', '', '', '', '', '', '', ''); }); }).not.toThrow(); }); }); - describe('ΔpropertyInterpolate4', () => { + describe('ɵɵpropertyInterpolate4', () => { it('should interpolate four values', () => { //
const t = new TemplateFixture(createDiv, () => {}, 1, 4); t.update(() => { - Δselect(0); - ΔpropertyInterpolate4('title', 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', 3: ', 3, ', end'); + ɵɵselect(0); + ɵɵpropertyInterpolate4( + 'title', 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', 3: ', 3, ', end'); }); expect(t.html).toEqual('
'); t.update(() => { - Δselect(0); - ΔpropertyInterpolate4( + ɵɵselect(0); + ɵɵpropertyInterpolate4( 'title', 'start: ', 'A', ', 1: ', 'B', ', 2: ', 'C', ', 3: ', 'D', ', end'); }); expect(t.html).toEqual('
'); @@ -526,15 +527,16 @@ describe('instructions', () => { // {{v1}} 2: {{v2}} 3: {{v3}}, end">
const t = new TemplateFixture(createDiv, () => {}, 1, 8); t.update(() => { - Δselect(0); - ΔpropertyInterpolate4('title', 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', 3: ', 3, ', end')( + ɵɵselect(0); + ɵɵpropertyInterpolate4( + 'title', 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', 3: ', 3, ', end')( 'accessKey', 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', 3: ', 3, ', end'); }); expect(t.html).toEqual( '
'); t.update(() => { - Δselect(0); - ΔpropertyInterpolate4( + ɵɵselect(0); + ɵɵpropertyInterpolate4( 'title', 'start: ', 'A', ', 1: ', 'B', ', 2: ', 'C', ', 3: ', 'D', ', end')( 'accessKey', 'start: ', 'A', ', 1: ', 'B', ', 2: ', 'C', ', 3: ', 'D', ', end'); }); @@ -549,31 +551,31 @@ describe('instructions', () => { }); }); - it('should error if called without Δselect called first', () => { + it('should error if called without ɵɵselect called first', () => { const t = new TemplateFixture(createDiv, () => {}, 1, 4); expect(() => { - t.update(() => { ΔpropertyInterpolate4('title', '', '', '', '', '', '', '', '', ''); }); + t.update(() => { ɵɵpropertyInterpolate4('title', '', '', '', '', '', '', '', '', ''); }); }).toThrow(); expect(() => { - Δselect(0); - t.update(() => { ΔpropertyInterpolate4('title', '', '', '', '', '', '', '', '', ''); }); + ɵɵselect(0); + t.update(() => { ɵɵpropertyInterpolate4('title', '', '', '', '', '', '', '', '', ''); }); }).not.toThrow(); }); }); - describe('ΔpropertyInterpolate5', () => { + describe('ɵɵpropertyInterpolate5', () => { it('should interpolate five values', () => { //
const t = new TemplateFixture(createDiv, () => {}, 1, 5); t.update(() => { - Δselect(0); - ΔpropertyInterpolate5( + ɵɵselect(0); + ɵɵpropertyInterpolate5( 'title', 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', 3: ', 3, ', 4: ', 4, ', end'); }); expect(t.html).toEqual('
'); t.update(() => { - Δselect(0); - ΔpropertyInterpolate5( + ɵɵselect(0); + ɵɵpropertyInterpolate5( 'title', 'start: ', 'A', ', 1: ', 'B', ', 2: ', 'C', ', 3: ', 'D', ', 4: ', 'E', ', end'); }); @@ -592,16 +594,16 @@ describe('instructions', () => { // {{v0}} 1: {{v1}} 2: {{v2}} 3: {{v3}} 4: {{v4}}, end">
const t = new TemplateFixture(createDiv, () => {}, 1, 10); t.update(() => { - Δselect(0); - ΔpropertyInterpolate5( + ɵɵselect(0); + ɵɵpropertyInterpolate5( 'title', 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', 3: ', 3, ', 4: ', 4, ', end')( 'accessKey', 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', 3: ', 3, ', 4: ', 4, ', end'); }); expect(t.html).toEqual( '
'); t.update(() => { - Δselect(0); - ΔpropertyInterpolate5( + ɵɵselect(0); + ɵɵpropertyInterpolate5( 'title', 'start: ', 'A', ', 1: ', 'B', ', 2: ', 'C', ', 3: ', 'D', ', 4: ', 'E', ', end')( 'accessKey', 'start: ', 'A', ', 1: ', 'B', ', 2: ', 'C', ', 3: ', 'D', ', 4: ', 'E', @@ -618,36 +620,36 @@ describe('instructions', () => { }); }); - it('should error if called without Δselect called first', () => { + it('should error if called without ɵɵselect called first', () => { const t = new TemplateFixture(createDiv, () => {}, 1, 5); expect(() => { t.update(() => { - ΔpropertyInterpolate5('title', '', '', '', '', '', '', '', '', '', '', ''); + ɵɵpropertyInterpolate5('title', '', '', '', '', '', '', '', '', '', '', ''); }); }).toThrow(); expect(() => { - Δselect(0); + ɵɵselect(0); t.update(() => { - ΔpropertyInterpolate5('title', '', '', '', '', '', '', '', '', '', '', ''); + ɵɵpropertyInterpolate5('title', '', '', '', '', '', '', '', '', '', '', ''); }); }).not.toThrow(); }); }); - describe('ΔpropertyInterpolate6', () => { + describe('ɵɵpropertyInterpolate6', () => { it('should interpolate six values', () => { //
const t = new TemplateFixture(createDiv, () => {}, 1, 6); t.update(() => { - Δselect(0); - ΔpropertyInterpolate6( + ɵɵselect(0); + ɵɵpropertyInterpolate6( 'title', 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', 3: ', 3, ', 4: ', 4, ', 5: ', 5, ', end'); }); expect(t.html).toEqual('
'); t.update(() => { - Δselect(0); - ΔpropertyInterpolate6( + ɵɵselect(0); + ɵɵpropertyInterpolate6( 'title', 'start: ', 'A', ', 1: ', 'B', ', 2: ', 'C', ', 3: ', 'D', ', 4: ', 'E', ', 5: ', 'F', ', end'); }); @@ -666,8 +668,8 @@ describe('instructions', () => { // accesskey="start: {{v0}} 1: {{v1}} 2: {{v2}} 3: {{v3}} 4: {{v4}}, 5: {{v5}}, end">
const t = new TemplateFixture(createDiv, () => {}, 1, 12); t.update(() => { - Δselect(0); - ΔpropertyInterpolate6( + ɵɵselect(0); + ɵɵpropertyInterpolate6( 'title', 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', 3: ', 3, ', 4: ', 4, ', 5: ', 5, ', end')( 'accessKey', 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', 3: ', 3, ', 4: ', 4, ', 5: ', 5, @@ -676,8 +678,8 @@ describe('instructions', () => { expect(t.html).toEqual( '
'); t.update(() => { - Δselect(0); - ΔpropertyInterpolate6( + ɵɵselect(0); + ɵɵpropertyInterpolate6( 'title', 'start: ', 'A', ', 1: ', 'B', ', 2: ', 'C', ', 3: ', 'D', ', 4: ', 'E', ', 5: ', 'F', ', end')( 'accessKey', 'start: ', 'A', ', 1: ', 'B', ', 2: ', 'C', ', 3: ', 'D', ', 4: ', 'E', @@ -694,38 +696,38 @@ describe('instructions', () => { }); }); - it('should error if called without Δselect called first', () => { + it('should error if called without ɵɵselect called first', () => { const t = new TemplateFixture(createDiv, () => {}, 1, 6); expect(() => { t.update(() => { - ΔpropertyInterpolate6('title', '', '', '', '', '', '', '', '', '', '', '', '', ''); + ɵɵpropertyInterpolate6('title', '', '', '', '', '', '', '', '', '', '', '', '', ''); }); }).toThrow(); expect(() => { - Δselect(0); + ɵɵselect(0); t.update(() => { - ΔpropertyInterpolate6('title', '', '', '', '', '', '', '', '', '', '', '', '', ''); + ɵɵpropertyInterpolate6('title', '', '', '', '', '', '', '', '', '', '', '', '', ''); }); }).not.toThrow(); }); }); - describe('ΔpropertyInterpolate7', () => { + describe('ɵɵpropertyInterpolate7', () => { it('should interpolate seven values', () => { //
const t = new TemplateFixture(createDiv, () => {}, 1, 7); t.update(() => { - Δselect(0); - ΔpropertyInterpolate7( + ɵɵselect(0); + ɵɵpropertyInterpolate7( 'title', 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', 3: ', 3, ', 4: ', 4, ', 5: ', 5, ', 6: ', 6, ', end'); }); expect(t.html).toEqual( '
'); t.update(() => { - Δselect(0); - ΔpropertyInterpolate7( + ɵɵselect(0); + ɵɵpropertyInterpolate7( 'title', 'start: ', 'A', ', 1: ', 'B', ', 2: ', 'C', ', 3: ', 'D', ', 4: ', 'E', ', 5: ', 'F', ', 6: ', 'G', ', end'); }); @@ -746,8 +748,8 @@ describe('instructions', () => { // {{v5}}, 6: {{v6}}, end"> const t = new TemplateFixture(createDiv, () => {}, 1, 14); t.update(() => { - Δselect(0); - ΔpropertyInterpolate7( + ɵɵselect(0); + ɵɵpropertyInterpolate7( 'title', 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', 3: ', 3, ', 4: ', 4, ', 5: ', 5, ', 6: ', 6, ', end')( 'accessKey', 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', 3: ', 3, ', 4: ', 4, ', 5: ', 5, @@ -756,8 +758,8 @@ describe('instructions', () => { expect(t.html).toEqual( '
'); t.update(() => { - Δselect(0); - ΔpropertyInterpolate7( + ɵɵselect(0); + ɵɵpropertyInterpolate7( 'title', 'start: ', 'A', ', 1: ', 'B', ', 2: ', 'C', ', 3: ', 'D', ', 4: ', 'E', ', 5: ', 'F', ', 6: ', 'G', ', end')( 'accessKey', 'start: ', 'A', ', 1: ', 'B', ', 2: ', 'C', ', 3: ', 'D', ', 4: ', 'E', @@ -774,40 +776,40 @@ describe('instructions', () => { }); }); - it('should error if called without Δselect called first', () => { + it('should error if called without ɵɵselect called first', () => { const t = new TemplateFixture(createDiv, () => {}, 1, 7); expect(() => { t.update(() => { - ΔpropertyInterpolate7( + ɵɵpropertyInterpolate7( 'title', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''); }); }).toThrow(); expect(() => { - Δselect(0); + ɵɵselect(0); t.update(() => { - ΔpropertyInterpolate7( + ɵɵpropertyInterpolate7( 'title', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''); }); }).not.toThrow(); }); }); - describe('ΔpropertyInterpolate8', () => { + describe('ɵɵpropertyInterpolate8', () => { it('should interpolate eight values', () => { //
const t = new TemplateFixture(createDiv, () => {}, 1, 8); t.update(() => { - Δselect(0); - ΔpropertyInterpolate8( + ɵɵselect(0); + ɵɵpropertyInterpolate8( 'title', 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', 3: ', 3, ', 4: ', 4, ', 5: ', 5, ', 6: ', 6, ', 7: ', 7, ', end'); }); expect(t.html).toEqual( '
'); t.update(() => { - Δselect(0); - ΔpropertyInterpolate8( + ɵɵselect(0); + ɵɵpropertyInterpolate8( 'title', 'start: ', 'A', ', 1: ', 'B', ', 2: ', 'C', ', 3: ', 'D', ', 4: ', 'E', ', 5: ', 'F', ', 6: ', 'G', ', 7: ', 'H', ', end'); }); @@ -828,8 +830,8 @@ describe('instructions', () => { // {{v5}}, 6: {{v6}}, 7: {{v7}} end"> const t = new TemplateFixture(createDiv, () => {}, 1, 16); t.update(() => { - Δselect(0); - ΔpropertyInterpolate8( + ɵɵselect(0); + ɵɵpropertyInterpolate8( 'title', 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', 3: ', 3, ', 4: ', 4, ', 5: ', 5, ', 6: ', 6, ', 7: ', 7, ', end')( 'accessKey', 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', 3: ', 3, ', 4: ', 4, ', 5: ', 5, @@ -838,8 +840,8 @@ describe('instructions', () => { expect(t.html).toEqual( '
'); t.update(() => { - Δselect(0); - ΔpropertyInterpolate8( + ɵɵselect(0); + ɵɵpropertyInterpolate8( 'title', 'start: ', 'A', ', 1: ', 'B', ', 2: ', 'C', ', 3: ', 'D', ', 4: ', 'E', ', 5: ', 'F', ', 6: ', 'G', ', 7: ', 'H', ', end')( 'accessKey', 'start: ', 'A', ', 1: ', 'B', ', 2: ', 'C', ', 3: ', 'D', ', 4: ', 'E', @@ -856,18 +858,18 @@ describe('instructions', () => { }); }); - it('should error if called without Δselect called first', () => { + it('should error if called without ɵɵselect called first', () => { const t = new TemplateFixture(createDiv, () => {}, 1, 8); expect(() => { t.update(() => { - ΔpropertyInterpolate8( + ɵɵpropertyInterpolate8( 'title', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''); }); }).toThrow(); expect(() => { - Δselect(0); + ɵɵselect(0); t.update(() => { - ΔpropertyInterpolate8( + ɵɵpropertyInterpolate8( 'title', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''); }); }).not.toThrow(); @@ -875,14 +877,14 @@ describe('instructions', () => { }); - describe('ΔpropertyInterpolateV', () => { + describe('ɵɵpropertyInterpolateV', () => { it('should interpolate eight or more values', () => { //
const t = new TemplateFixture(createDiv, () => {}, 1, 9); t.update(() => { - Δselect(0); - ΔpropertyInterpolateV('title', [ + ɵɵselect(0); + ɵɵpropertyInterpolateV('title', [ 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', 3: ', 3, ', 4: ', 4, ', 5: ', 5, ', 6: ', 6, ', 7: ', 7, ', 8: ', 8, ', end' ]); @@ -890,8 +892,8 @@ describe('instructions', () => { expect(t.html).toEqual( '
'); t.update(() => { - Δselect(0); - ΔpropertyInterpolateV('title', [ + ɵɵselect(0); + ɵɵpropertyInterpolateV('title', [ 'start: ', 'A', ', 1: ', 'B', ', 2: ', 'C', ', 3: ', 'D', ', 4: ', 'E', ', 5: ', 'F', ', 6: ', 'G', ', 7: ', 'H', ', 8: ', 'I', ', end' ]); @@ -913,8 +915,8 @@ describe('instructions', () => { // {{v5}}, 6: {{v6}}, 7: {{v7}}, 8: {{v8}} end"> const t = new TemplateFixture(createDiv, () => {}, 1, 18); t.update(() => { - Δselect(0); - ΔpropertyInterpolateV( + ɵɵselect(0); + ɵɵpropertyInterpolateV( 'title', [ 'start: ', 0, ', 1: ', 1, ', 2: ', 2, ', 3: ', 3, ', 4: ', 4, ', 5: ', 5, ', 6: ', @@ -928,8 +930,8 @@ describe('instructions', () => { expect(t.html).toEqual( '
'); t.update(() => { - Δselect(0); - ΔpropertyInterpolateV( + ɵɵselect(0); + ɵɵpropertyInterpolateV( 'title', [ 'start: ', 'A', ', 1: ', 'B', ', 2: ', 'C', ', 3: ', 'D', ', 4: ', 'E', ', 5: ', @@ -951,19 +953,19 @@ describe('instructions', () => { }); }); - it('should error if called without Δselect called first', () => { + it('should error if called without ɵɵselect called first', () => { const t = new TemplateFixture(createDiv, () => {}, 1, 9); expect(() => { t.update(() => { - ΔpropertyInterpolateV( + ɵɵpropertyInterpolateV( 'title', ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']); }); }).toThrow(); expect(() => { - Δselect(0); + ɵɵselect(0); t.update(() => { - ΔpropertyInterpolateV( + ɵɵpropertyInterpolateV( 'title', ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']); }); @@ -976,12 +978,12 @@ describe('instructions', () => { it('should use sanitizer function when available', () => { const t = new TemplateFixture(createDiv, () => {}, 1); - t.update(() => ΔelementProperty(0, 'title', 'javascript:true', ΔsanitizeUrl)); + t.update(() => ɵɵelementProperty(0, 'title', 'javascript:true', ɵɵsanitizeUrl)); expect(t.html).toEqual('
'); t.update( - () => ΔelementProperty( - 0, 'title', bypassSanitizationTrustUrl('javascript:false'), ΔsanitizeUrl)); + () => ɵɵelementProperty( + 0, 'title', bypassSanitizationTrustUrl('javascript:false'), ɵɵsanitizeUrl)); expect(t.html).toEqual('
'); expect(ngDevMode).toHaveProperties({ firstTemplatePass: 1, @@ -992,10 +994,10 @@ describe('instructions', () => { }); it('should not stringify non string values', () => { - const t = new TemplateFixture(() => { Δelement(0, 'input'); }, () => {}, 1); + const t = new TemplateFixture(() => { ɵɵelement(0, 'input'); }, () => {}, 1); // Note: don't use 'hidden' here because IE10 does not support the hidden property - t.update(() => ΔelementProperty(0, 'required', false)); + t.update(() => ɵɵelementProperty(0, 'required', false)); // The required property would be true if `false` was stringified into `"false"`. expect((t.hostElement as HTMLElement).querySelector('input') !.required).toEqual(false); expect(ngDevMode).toHaveProperties({ @@ -1011,18 +1013,18 @@ describe('instructions', () => { describe('elementStyleProp', () => { it('should automatically sanitize unless a bypass operation is applied', () => { const t = new TemplateFixture(() => { - return createDiv(null, null, null, ['background-image'], ΔdefaultStyleSanitizer); + return createDiv(null, null, null, ['background-image'], ɵɵdefaultStyleSanitizer); }, () => {}, 1); t.update(() => { - ΔelementStyleProp(0, 0, 'url("http://server")'); - ΔelementStylingApply(0); + ɵɵelementStyleProp(0, 0, 'url("http://server")'); + ɵɵelementStylingApply(0); }); // nothing is set because sanitizer suppresses it. expect(t.html).toEqual('
'); t.update(() => { - ΔelementStyleProp(0, 0, bypassSanitizationTrustStyle('url("http://server2")')); - ΔelementStylingApply(0); + ɵɵelementStyleProp(0, 0, bypassSanitizationTrustStyle('url("http://server2")')); + ɵɵelementStylingApply(0); }); expect((t.hostElement.firstChild as HTMLElement).style.getPropertyValue('background-image')) .toEqual('url("http://server2")'); @@ -1036,16 +1038,16 @@ describe('instructions', () => { 1, sanitizerInterceptor); t.update(() => { - ΔelementStyleProp(0, 0, bypassSanitizationTrustStyle('apple')); - ΔelementStylingApply(0); + ɵɵelementStyleProp(0, 0, bypassSanitizationTrustStyle('apple')); + ɵɵelementStylingApply(0); }); expect(sanitizerInterceptor.lastValue !).toEqual('apple'); sanitizerInterceptor.lastValue = null; t.update(() => { - ΔelementStyleProp(0, 0, bypassSanitizationTrustStyle('apple')); - ΔelementStylingApply(0); + ɵɵelementStyleProp(0, 0, bypassSanitizationTrustStyle('apple')); + ɵɵelementStylingApply(0); }); expect(sanitizerInterceptor.lastValue).toEqual(null); }); @@ -1053,16 +1055,16 @@ describe('instructions', () => { describe('elementStyleMap', () => { function createDivWithStyle() { - ΔelementStart(0, 'div', [AttributeMarker.Styles, 'height', '10px']); - ΔelementStyling([], ['height']); - ΔelementEnd(); + ɵɵelementStart(0, 'div', [AttributeMarker.Styles, 'height', '10px']); + ɵɵelementStyling([], ['height']); + ɵɵelementEnd(); } it('should add style', () => { const fixture = new TemplateFixture(createDivWithStyle, () => {}, 1); fixture.update(() => { - ΔelementStylingMap(0, null, {'background-color': 'red'}); - ΔelementStylingApply(0); + ɵɵelementStylingMap(0, null, {'background-color': 'red'}); + ɵɵelementStylingApply(0); }); expect(fixture.html).toEqual('
'); }); @@ -1076,7 +1078,7 @@ describe('instructions', () => { sanitizerInterceptor); fixture.update(() => { - ΔelementStylingMap(0, null, { + ɵɵelementStylingMap(0, null, { 'background-image': 'background-image', 'background': 'background', 'border-image': 'border-image', @@ -1085,7 +1087,7 @@ describe('instructions', () => { 'filter': 'filter', 'width': 'width' }); - ΔelementStylingApply(0); + ɵɵelementStylingApply(0); }); const props = detectedValues.sort(); @@ -1097,16 +1099,16 @@ describe('instructions', () => { describe('elementClass', () => { function createDivWithStyling() { - ΔelementStart(0, 'div'); - ΔelementStyling(); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵelementStyling(); + ɵɵelementEnd(); } it('should add class', () => { const fixture = new TemplateFixture(createDivWithStyling, () => {}, 1); fixture.update(() => { - ΔelementStylingMap(0, 'multiple classes'); - ΔelementStylingApply(0); + ɵɵelementStylingMap(0, 'multiple classes'); + ɵɵelementStylingApply(0); }); expect(fixture.html).toEqual('
'); }); @@ -1119,26 +1121,26 @@ describe('instructions', () => { function ToDoAppComponent_NgForOf_Template_0(rf: RenderFlags, ctx0: NgForOfContext) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'ul'); - Δtemplate(1, ToDoAppComponent_NgForOf_NgForOf_Template_1, 2, 1, 'li', _c1); - ΔelementEnd(); + ɵɵelementStart(0, 'ul'); + ɵɵtemplate(1, ToDoAppComponent_NgForOf_NgForOf_Template_1, 2, 1, 'li', _c1); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { const row_r2 = ctx0.$implicit; - ΔelementProperty(1, 'ngForOf', Δbind(row_r2)); + ɵɵelementProperty(1, 'ngForOf', ɵɵbind(row_r2)); } } function ToDoAppComponent_NgForOf_NgForOf_Template_1( rf: RenderFlags, ctx1: NgForOfContext) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'li'); - Δtext(1); - ΔelementEnd(); + ɵɵelementStart(0, 'li'); + ɵɵtext(1); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { const col_r3 = ctx1.$implicit; - ΔtextBinding(1, Δinterpolation1('', col_r3, '')); + ɵɵtextBinding(1, ɵɵinterpolation1('', col_r3, '')); } } @@ -1150,7 +1152,7 @@ describe('instructions', () => { class NestedLoops { rows = [['a', 'b'], ['A', 'B'], ['a', 'b'], ['A', 'B']]; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: NestedLoops, selectors: [['nested-loops']], factory: function ToDoAppComponent_Factory() { return new NestedLoops(); }, @@ -1158,10 +1160,10 @@ describe('instructions', () => { vars: 1, template: function ToDoAppComponent_Template(rf: RenderFlags, ctx: NestedLoops) { if (rf & RenderFlags.Create) { - Δtemplate(0, ToDoAppComponent_NgForOf_Template_0, 2, 1, 'ul', _c0); + ɵɵtemplate(0, ToDoAppComponent_NgForOf_Template_0, 2, 1, 'ul', _c0); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'ngForOf', Δbind(ctx.rows)); + ɵɵelementProperty(0, 'ngForOf', ɵɵbind(ctx.rows)); } }, directives: [NgForOf] @@ -1183,7 +1185,7 @@ describe('instructions', () => { const inputValue = 'http://foo'; const outputValue = 'http://foo-sanitized'; - t.update(() => ΔelementAttribute(0, 'href', inputValue, ΔsanitizeUrl)); + t.update(() => ɵɵelementAttribute(0, 'href', inputValue, ɵɵsanitizeUrl)); expect(t.html).toEqual(``); expect(s.lastSanitizedValue).toEqual(outputValue); }); @@ -1194,7 +1196,7 @@ describe('instructions', () => { const inputValue = s.bypassSecurityTrustUrl('http://foo'); const outputValue = 'http://foo'; - t.update(() => ΔelementAttribute(0, 'href', inputValue, ΔsanitizeUrl)); + t.update(() => ɵɵelementAttribute(0, 'href', inputValue, ɵɵsanitizeUrl)); expect(t.html).toEqual(``); expect(s.lastSanitizedValue).toBeFalsy(); }); @@ -1205,7 +1207,7 @@ describe('instructions', () => { const inputValue = bypassSanitizationTrustUrl('http://foo'); const outputValue = 'http://foo-ivy'; - t.update(() => ΔelementAttribute(0, 'href', inputValue, ΔsanitizeUrl)); + t.update(() => ɵɵelementAttribute(0, 'href', inputValue, ɵɵsanitizeUrl)); expect(t.html).toEqual(``); expect(s.lastSanitizedValue).toBeFalsy(); }); @@ -1216,7 +1218,7 @@ describe('instructions', () => { const inputValue = 'color:red'; const outputValue = 'color:blue'; - t.update(() => ΔelementAttribute(0, 'style', inputValue, ΔsanitizeStyle)); + t.update(() => ɵɵelementAttribute(0, 'style', inputValue, ɵɵsanitizeStyle)); expect(stripStyleWsCharacters(t.html)).toEqual(`
`); expect(s.lastSanitizedValue).toEqual(outputValue); }); @@ -1227,7 +1229,7 @@ describe('instructions', () => { const inputValue = s.bypassSecurityTrustStyle('color:maroon'); const outputValue = 'color:maroon'; - t.update(() => ΔelementAttribute(0, 'style', inputValue, ΔsanitizeStyle)); + t.update(() => ɵɵelementAttribute(0, 'style', inputValue, ɵɵsanitizeStyle)); expect(stripStyleWsCharacters(t.html)).toEqual(`
`); expect(s.lastSanitizedValue).toBeFalsy(); }); @@ -1238,7 +1240,7 @@ describe('instructions', () => { const inputValue = bypassSanitizationTrustStyle('font-family:foo'); const outputValue = 'font-family:foo-ivy'; - t.update(() => ΔelementAttribute(0, 'style', inputValue, ΔsanitizeStyle)); + t.update(() => ɵɵelementAttribute(0, 'style', inputValue, ɵɵsanitizeStyle)); expect(stripStyleWsCharacters(t.html)).toEqual(`
`); expect(s.lastSanitizedValue).toBeFalsy(); }); @@ -1249,7 +1251,7 @@ describe('instructions', () => { const inputValue = 'http://resource'; const outputValue = 'http://resource-sanitized'; - t.update(() => ΔelementAttribute(0, 'src', inputValue, ΔsanitizeResourceUrl)); + t.update(() => ɵɵelementAttribute(0, 'src', inputValue, ɵɵsanitizeResourceUrl)); expect(t.html).toEqual(``); expect(s.lastSanitizedValue).toEqual(outputValue); }); @@ -1260,7 +1262,7 @@ describe('instructions', () => { const inputValue = s.bypassSecurityTrustResourceUrl('file://all-my-secrets.pdf'); const outputValue = 'file://all-my-secrets.pdf'; - t.update(() => ΔelementAttribute(0, 'src', inputValue, ΔsanitizeResourceUrl)); + t.update(() => ɵɵelementAttribute(0, 'src', inputValue, ɵɵsanitizeResourceUrl)); expect(t.html).toEqual(``); expect(s.lastSanitizedValue).toBeFalsy(); }); @@ -1271,7 +1273,7 @@ describe('instructions', () => { const inputValue = bypassSanitizationTrustResourceUrl('file://all-my-secrets.pdf'); const outputValue = 'file://all-my-secrets.pdf-ivy'; - t.update(() => ΔelementAttribute(0, 'src', inputValue, ΔsanitizeResourceUrl)); + t.update(() => ɵɵelementAttribute(0, 'src', inputValue, ɵɵsanitizeResourceUrl)); expect(t.html).toEqual(``); expect(s.lastSanitizedValue).toBeFalsy(); }); @@ -1282,7 +1284,7 @@ describe('instructions', () => { const inputValue = 'fn();'; const outputValue = 'fn(); //sanitized'; - t.update(() => ΔelementProperty(0, 'innerHTML', inputValue, ΔsanitizeScript)); + t.update(() => ɵɵelementProperty(0, 'innerHTML', inputValue, ɵɵsanitizeScript)); expect(t.html).toEqual(``); expect(s.lastSanitizedValue).toEqual(outputValue); }); @@ -1293,7 +1295,7 @@ describe('instructions', () => { const inputValue = s.bypassSecurityTrustScript('alert("bar")'); const outputValue = 'alert("bar")'; - t.update(() => ΔelementProperty(0, 'innerHTML', inputValue, ΔsanitizeScript)); + t.update(() => ɵɵelementProperty(0, 'innerHTML', inputValue, ɵɵsanitizeScript)); expect(t.html).toEqual(``); expect(s.lastSanitizedValue).toBeFalsy(); }); @@ -1304,7 +1306,7 @@ describe('instructions', () => { const inputValue = bypassSanitizationTrustScript('alert("bar")'); const outputValue = 'alert("bar")-ivy'; - t.update(() => ΔelementProperty(0, 'innerHTML', inputValue, ΔsanitizeScript)); + t.update(() => ɵɵelementProperty(0, 'innerHTML', inputValue, ɵɵsanitizeScript)); expect(t.html).toEqual(``); expect(s.lastSanitizedValue).toBeFalsy(); }); @@ -1315,7 +1317,7 @@ describe('instructions', () => { const inputValue = '
'; const outputValue = '
'; - t.update(() => ΔelementProperty(0, 'innerHTML', inputValue, ΔsanitizeHtml)); + t.update(() => ɵɵelementProperty(0, 'innerHTML', inputValue, ɵɵsanitizeHtml)); expect(t.html).toEqual(`
${outputValue}
`); expect(s.lastSanitizedValue).toEqual(outputValue); }); @@ -1326,7 +1328,7 @@ describe('instructions', () => { const inputValue = s.bypassSecurityTrustHtml('
'); const outputValue = '
'; - t.update(() => ΔelementProperty(0, 'innerHTML', inputValue, ΔsanitizeHtml)); + t.update(() => ɵɵelementProperty(0, 'innerHTML', inputValue, ɵɵsanitizeHtml)); expect(t.html).toEqual(`
${outputValue}
`); expect(s.lastSanitizedValue).toBeFalsy(); }); @@ -1337,7 +1339,7 @@ describe('instructions', () => { const inputValue = bypassSanitizationTrustHtml('
'); const outputValue = '
-ivy'; - t.update(() => ΔelementProperty(0, 'innerHTML', inputValue, ΔsanitizeHtml)); + t.update(() => ɵɵelementProperty(0, 'innerHTML', inputValue, ɵɵsanitizeHtml)); expect(t.html).toEqual(`
${outputValue}
`); expect(s.lastSanitizedValue).toBeFalsy(); }); @@ -1382,7 +1384,7 @@ class LocalMockSanitizer implements Sanitizer { class MockSanitizerInterceptor { public lastValue: string|null = null; constructor(private _interceptorFn?: ((value: any) => any)|null) {} - getStyleSanitizer() { return ΔdefaultStyleSanitizer; } + getStyleSanitizer() { return ɵɵdefaultStyleSanitizer; } sanitize(context: SecurityContext, value: LocalSanitizedValue|string|null|any): string|null { if (this._interceptorFn) { this._interceptorFn(value); diff --git a/packages/core/test/render3/integration_spec.ts b/packages/core/test/render3/integration_spec.ts index 8e7547cb29..03a10e0c57 100644 --- a/packages/core/test/render3/integration_spec.ts +++ b/packages/core/test/render3/integration_spec.ts @@ -10,15 +10,15 @@ import {ElementRef, TemplateRef, ViewContainerRef} from '@angular/core'; import {RendererType2} from '../../src/render/api'; import {getLContext} from '../../src/render3/context_discovery'; -import {AttributeMarker, ΔdefineComponent, ΔdefineDirective, ΔtemplateRefExtractor} from '../../src/render3/index'; -import {ΔallocHostVars, Δbind, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, ΔdirectiveInject, Δelement, ΔelementAttribute, ΔelementClassProp, ΔelementContainerEnd, ΔelementContainerStart, ΔelementEnd, ΔelementHostAttrs, ΔelementHostClassProp, ΔelementHostStyleProp, ΔelementHostStyling, ΔelementHostStylingApply, ΔelementHostStylingMap, ΔelementProperty, ΔelementStart, ΔelementStyleProp, ΔelementStyling, ΔelementStylingApply, ΔelementStylingMap, ΔembeddedViewEnd, ΔembeddedViewStart, Δinterpolation1, Δinterpolation2, Δinterpolation3, Δinterpolation4, Δinterpolation5, Δinterpolation6, Δinterpolation7, Δinterpolation8, ΔinterpolationV, Δprojection, ΔprojectionDef, Δreference, Δtemplate, Δtext, ΔtextBinding} from '../../src/render3/instructions/all'; +import {AttributeMarker, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵtemplateRefExtractor} from '../../src/render3/index'; +import {ɵɵallocHostVars, ɵɵbind, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵdirectiveInject, ɵɵelement, ɵɵelementAttribute, ɵɵelementClassProp, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementHostAttrs, ɵɵelementHostClassProp, ɵɵelementHostStyleProp, ɵɵelementHostStyling, ɵɵelementHostStylingApply, ɵɵelementHostStylingMap, ɵɵelementProperty, ɵɵelementStart, ɵɵelementStyleProp, ɵɵelementStyling, ɵɵelementStylingApply, ɵɵelementStylingMap, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵinterpolation1, ɵɵinterpolation2, ɵɵinterpolation3, ɵɵinterpolation4, ɵɵinterpolation5, ɵɵinterpolation6, ɵɵinterpolation7, ɵɵinterpolation8, ɵɵinterpolationV, ɵɵprojection, ɵɵprojectionDef, ɵɵreference, ɵɵtemplate, ɵɵtext, ɵɵtextBinding} from '../../src/render3/instructions/all'; import {MONKEY_PATCH_KEY_NAME} from '../../src/render3/interfaces/context'; import {RenderFlags} from '../../src/render3/interfaces/definition'; import {RElement, Renderer3, RendererFactory3, domRendererFactory3} from '../../src/render3/interfaces/renderer'; import {StylingIndex} from '../../src/render3/interfaces/styling'; import {CONTEXT, HEADER_OFFSET} from '../../src/render3/interfaces/view'; -import {ΔdisableBindings, ΔenableBindings} from '../../src/render3/state'; -import {ΔsanitizeUrl} from '../../src/sanitization/sanitization'; +import {ɵɵdisableBindings, ɵɵenableBindings} from '../../src/render3/state'; +import {ɵɵsanitizeUrl} from '../../src/sanitization/sanitization'; import {Sanitizer, SecurityContext} from '../../src/sanitization/security'; import {NgIf} from './common_with_def'; @@ -33,9 +33,9 @@ describe('render3 integration test', () => { function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span', ['title', 'Hello']); - { Δtext(1, 'Greetings'); } - ΔelementEnd(); + ɵɵelementStart(0, 'span', ['title', 'Hello']); + { ɵɵtext(1, 'Greetings'); } + ɵɵelementEnd(); } } expect(ngDevMode).toHaveProperties({ @@ -49,12 +49,12 @@ describe('render3 integration test', () => { it('should render and update basic "Hello, World" template', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'h1'); - { Δtext(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'h1'); + { ɵɵtext(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔtextBinding(1, Δinterpolation1('Hello, ', ctx.name, '!')); + ɵɵtextBinding(1, ɵɵinterpolation1('Hello, ', ctx.name, '!')); } }, 2, 1); @@ -73,10 +73,10 @@ describe('render3 integration test', () => { it('should render "undefined" as "" when used with `bind()`', () => { function Template(rf: RenderFlags, name: string) { if (rf & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δbind(name)); + ɵɵtextBinding(0, ɵɵbind(name)); } } @@ -93,10 +93,10 @@ describe('render3 integration test', () => { it('should render "null" as "" when used with `bind()`', () => { function Template(rf: RenderFlags, name: string) { if (rf & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δbind(name)); + ɵɵtextBinding(0, ɵɵbind(name)); } } @@ -113,8 +113,8 @@ describe('render3 integration test', () => { it('should support creation-time values in text nodes', () => { function Template(rf: RenderFlags, value: string) { if (rf & RenderFlags.Create) { - Δtext(0); - ΔtextBinding(0, value); + ɵɵtext(0); + ɵɵtextBinding(0, value); } } expect(renderToHtml(Template, 'once', 1, 1)).toEqual('once'); @@ -140,18 +140,18 @@ describe('render3 integration test', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'b', ['id', 'my-id'], ['myRef', '']); - ΔdisableBindings(); - ΔelementStart(2, 'i'); - Δtext(3, 'Hello {{ name }}!'); - ΔelementEnd(); - ΔenableBindings(); - ΔelementEnd(); - Δtext(4); + ɵɵelementStart(0, 'b', ['id', 'my-id'], ['myRef', '']); + ɵɵdisableBindings(); + ɵɵelementStart(2, 'i'); + ɵɵtext(3, 'Hello {{ name }}!'); + ɵɵelementEnd(); + ɵɵenableBindings(); + ɵɵelementEnd(); + ɵɵtext(4); } if (rf & RenderFlags.Update) { - const ref = Δreference(1) as any; - ΔtextBinding(4, Δinterpolation1(' ', ref.id, ' ')); + const ref = ɵɵreference(1) as any; + ɵɵtextBinding(4, ɵɵinterpolation1(' ', ref.id, ' ')); } }, 5, 1); @@ -165,7 +165,7 @@ describe('render3 integration test', () => { class TestDirective { ngOnInit() { directiveInvoked = true; } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: TestDirective, selectors: [['', 'directive', '']], factory: () => new TestDirective() @@ -179,13 +179,13 @@ describe('render3 integration test', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'b', ['directive', '']); - ΔdisableBindings(); - ΔelementStart(1, 'i'); - Δtext(2, 'Hello {{ name }}!'); - ΔelementEnd(); - ΔenableBindings(); - ΔelementEnd(); + ɵɵelementStart(0, 'b', ['directive', '']); + ɵɵdisableBindings(); + ɵɵelementStart(1, 'i'); + ɵɵtext(2, 'Hello {{ name }}!'); + ɵɵelementEnd(); + ɵɵenableBindings(); + ɵɵelementEnd(); } }, 3, 0, [TestDirective]); @@ -200,7 +200,7 @@ describe('render3 integration test', () => { class TestDirective { ngOnInit() { directiveInvoked = true; } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: TestDirective, selectors: [['', 'directive', '']], factory: () => new TestDirective() @@ -214,13 +214,13 @@ describe('render3 integration test', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'b'); - ΔdisableBindings(); - ΔelementStart(1, 'i', ['directive', '']); - Δtext(2, 'Hello {{ name }}!'); - ΔelementEnd(); - ΔenableBindings(); - ΔelementEnd(); + ɵɵelementStart(0, 'b'); + ɵɵdisableBindings(); + ɵɵelementStart(1, 'i', ['directive', '']); + ɵɵtext(2, 'Hello {{ name }}!'); + ɵɵelementEnd(); + ɵɵenableBindings(); + ɵɵelementEnd(); } }, 3, 0, [TestDirective]); @@ -234,12 +234,12 @@ describe('render3 integration test', () => { it('should handle a flat list of static/bound text nodes', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtext(0, 'Hello '); - Δtext(1); - Δtext(2, '!'); + ɵɵtext(0, 'Hello '); + ɵɵtext(1); + ɵɵtext(2, '!'); } if (rf & RenderFlags.Update) { - ΔtextBinding(1, Δbind(ctx.name)); + ɵɵtextBinding(1, ɵɵbind(ctx.name)); } }, 3, 1); @@ -256,16 +256,16 @@ describe('render3 integration test', () => { it('should handle a list of static/bound text nodes as element children', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'b'); + ɵɵelementStart(0, 'b'); { - Δtext(1, 'Hello '); - Δtext(2); - Δtext(3, '!'); + ɵɵtext(1, 'Hello '); + ɵɵtext(2); + ɵɵtext(3, '!'); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔtextBinding(2, Δbind(ctx.name)); + ɵɵtextBinding(2, ɵɵbind(ctx.name)); } }, 4, 1); @@ -282,24 +282,24 @@ describe('render3 integration test', () => { it('should render/update text node as a child of a deep list of elements', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'b'); + ɵɵelementStart(0, 'b'); { - ΔelementStart(1, 'b'); + ɵɵelementStart(1, 'b'); { - ΔelementStart(2, 'b'); + ɵɵelementStart(2, 'b'); { - ΔelementStart(3, 'b'); - { Δtext(4); } - ΔelementEnd(); + ɵɵelementStart(3, 'b'); + { ɵɵtext(4); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔtextBinding(4, Δinterpolation1('Hello ', ctx.name, '!')); + ɵɵtextBinding(4, ɵɵinterpolation1('Hello ', ctx.name, '!')); } }, 5, 1); @@ -316,17 +316,17 @@ describe('render3 integration test', () => { it('should update 2 sibling elements', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'b'); + ɵɵelementStart(0, 'b'); { - Δelement(1, 'span'); - ΔelementStart(2, 'span', ['class', 'foo']); + ɵɵelement(1, 'span'); + ɵɵelementStart(2, 'span', ['class', 'foo']); {} - ΔelementEnd(); + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementAttribute(2, 'id', Δbind(ctx.id)); + ɵɵelementAttribute(2, 'id', ɵɵbind(ctx.id)); } }, 3, 1); @@ -343,10 +343,10 @@ describe('render3 integration test', () => { it('should handle sibling text node after element with child text node', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'p'); - { Δtext(1, 'hello'); } - ΔelementEnd(); - Δtext(2, 'world'); + ɵɵelementStart(0, 'p'); + { ɵɵtext(1, 'hello'); } + ɵɵelementEnd(); + ɵɵtext(2, 'world'); } }, 3); @@ -360,22 +360,22 @@ describe('render3 integration test', () => { class TodoComponent { value = ' one'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: TodoComponent, selectors: [['todo']], consts: 3, vars: 1, template: function TodoTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'p'); + ɵɵelementStart(0, 'p'); { - Δtext(1, 'Todo'); - Δtext(2); + ɵɵtext(1, 'Todo'); + ɵɵtext(2); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔtextBinding(2, Δbind(ctx.value)); + ɵɵtextBinding(2, ɵɵbind(ctx.value)); } }, factory: () => new TodoComponent @@ -387,7 +387,7 @@ describe('render3 integration test', () => { it('should support a basic component template', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'todo'); + ɵɵelement(0, 'todo'); } }, 1, 0, defs); @@ -398,8 +398,8 @@ describe('render3 integration test', () => { it('should support a component template with sibling', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'todo'); - Δtext(1, 'two'); + ɵɵelement(0, 'todo'); + ɵɵtext(1, 'two'); } }, 2, 0, defs); @@ -414,8 +414,8 @@ describe('render3 integration test', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'todo'); - Δelement(1, 'todo'); + ɵɵelement(0, 'todo'); + ɵɵelement(1, 'todo'); } }, 2, 0, defs); @@ -428,7 +428,7 @@ describe('render3 integration test', () => { class TodoComponentHostBinding { title = 'one'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: TodoComponentHostBinding, selectors: [['todo']], consts: 1, @@ -436,20 +436,20 @@ describe('render3 integration test', () => { template: function TodoComponentHostBindingTemplate( rf: RenderFlags, ctx: TodoComponentHostBinding) { if (rf & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.title)); + ɵɵtextBinding(0, ɵɵbind(ctx.title)); } }, factory: () => cmptInstance = new TodoComponentHostBinding, hostBindings: function(rf: RenderFlags, ctx: any, elementIndex: number): void { if (rf & RenderFlags.Create) { - ΔallocHostVars(1); + ɵɵallocHostVars(1); } if (rf & RenderFlags.Update) { // host bindings - ΔelementProperty(elementIndex, 'title', Δbind(ctx.title)); + ɵɵelementProperty(elementIndex, 'title', ɵɵbind(ctx.title)); } } }); @@ -457,7 +457,7 @@ describe('render3 integration test', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'todo'); + ɵɵelement(0, 'todo'); } }, 1, 0, [TodoComponentHostBinding]); @@ -471,7 +471,7 @@ describe('render3 integration test', () => { it('should support root component with host attribute', () => { class HostAttributeComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: HostAttributeComp, selectors: [['host-attr-comp']], factory: () => new HostAttributeComp(), @@ -479,7 +479,7 @@ describe('render3 integration test', () => { vars: 0, hostBindings: function(rf, ctx, elIndex) { if (rf & RenderFlags.Create) { - ΔelementHostAttrs(['role', 'button']); + ɵɵelementHostAttrs(['role', 'button']); } }, template: (rf: RenderFlags, ctx: HostAttributeComp) => {}, @@ -494,19 +494,19 @@ describe('render3 integration test', () => { /**

{{ name }}

*/ class MyComp { name = 'Bess'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComp, selectors: [['comp']], consts: 2, vars: 1, template: function MyCompTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'p'); - { Δtext(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'p'); + { ɵɵtext(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔtextBinding(1, Δbind(ctx.name)); + ɵɵtextBinding(1, ɵɵbind(ctx.name)); } }, factory: () => new MyComp @@ -515,7 +515,7 @@ describe('render3 integration test', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } }, 1, 0, [MyComp]); @@ -532,29 +532,29 @@ describe('render3 integration test', () => { class MyComp { // TODO(issue/24571): remove '!'. condition !: boolean; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComp, selectors: [['comp']], consts: 1, vars: 0, template: function MyCompTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.condition) { - let rf1 = ΔembeddedViewStart(0, 2, 0); + let rf1 = ɵɵembeddedViewStart(0, 2, 0); if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'div'); - { Δtext(1, 'text'); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵtext(1, 'text'); } + ɵɵelementEnd(); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, factory: () => new MyComp, @@ -565,10 +565,10 @@ describe('render3 integration test', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'condition', Δbind(ctx.condition)); + ɵɵelementProperty(0, 'condition', ɵɵbind(ctx.condition)); } }, 1, 1, [MyComp]); @@ -591,18 +591,18 @@ describe('render3 integration test', () => { *
before|Greetings|after
*/ function Template() { - ΔelementStart(0, 'div'); + ɵɵelementStart(0, 'div'); { - Δtext(1, 'before|'); - ΔelementContainerStart(2); + ɵɵtext(1, 'before|'); + ɵɵelementContainerStart(2); { - Δtext(3, 'Greetings'); - Δelement(4, 'span'); + ɵɵtext(3, 'Greetings'); + ɵɵelement(4, 'span'); } - ΔelementContainerEnd(); - Δtext(5, '|after'); + ɵɵelementContainerEnd(); + ɵɵtext(5, '|after'); } - ΔelementEnd(); + ɵɵelementEnd(); } const fixture = new TemplateFixture(Template, () => {}, 6); @@ -619,26 +619,26 @@ describe('render3 integration test', () => { */ const TestCmpt = createComponent('test-cmpt', function(rf: RenderFlags, ctx: {value: any}) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); if (ctx.value) { - let rf1 = ΔembeddedViewStart(0, 3, 0); + let rf1 = ɵɵembeddedViewStart(0, 3, 0); { if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'div'); + ɵɵelementStart(0, 'div'); { - ΔelementContainerStart(1); - { Δtext(2, 'content'); } - ΔelementContainerEnd(); + ɵɵelementContainerStart(1); + { ɵɵtext(2, 'content'); } + ɵɵelementContainerEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1); @@ -664,22 +664,22 @@ describe('render3 integration test', () => { const TestCmpt = createComponent('test-cmpt', function(rf: RenderFlags, ctx: {value: any}) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); if (ctx.value) { - let rf1 = ΔembeddedViewStart(0, 2, 0); + let rf1 = ɵɵembeddedViewStart(0, 2, 0); { if (rf1 & RenderFlags.Create) { - ΔelementContainerStart(0); - { Δtext(1, 'content'); } - ΔelementContainerEnd(); + ɵɵelementContainerStart(0); + { ɵɵtext(1, 'content'); } + ɵɵelementContainerEnd(); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1); @@ -700,9 +700,9 @@ describe('render3 integration test', () => { function ngIfTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementContainerStart(0); - { Δtext(1, 'content'); } - ΔelementContainerEnd(); + ɵɵelementContainerStart(0); + { ɵɵtext(1, 'content'); } + ɵɵelementContainerEnd(); } } @@ -720,11 +720,11 @@ describe('render3 integration test', () => { const TestCmpt = createComponent('test-cmpt', function(rf: RenderFlags, ctx: {value: any}) { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, ngIfTemplate, 2, 0, 'ng-template', [AttributeMarker.Bindings, 'ngIf']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'ngIf', Δbind(ctx.value)); + ɵɵelementProperty(0, 'ngIf', ɵɵbind(ctx.value)); } }, 1, 1, [NgIf]); @@ -751,21 +751,21 @@ describe('render3 integration test', () => { clear() { this._vcRef.clear(); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: TestDirective, selectors: [['', 'testDirective', '']], factory: () => testDirective = new TestDirective( - ΔdirectiveInject(TemplateRef as any), - ΔdirectiveInject(ViewContainerRef as any)), + ɵɵdirectiveInject(TemplateRef as any), + ɵɵdirectiveInject(ViewContainerRef as any)), }); } function embeddedTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementContainerStart(0); - { Δtext(1, 'content'); } - ΔelementContainerEnd(); + ɵɵelementContainerStart(0); + { ɵɵtext(1, 'content'); } + ɵɵelementContainerEnd(); } } @@ -779,7 +779,7 @@ describe('render3 integration test', () => { `; const TestCmpt = createComponent('test-cmpt', function(rf: RenderFlags) { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, embeddedTemplate, 2, 0, 'ng-template', [AttributeMarker.Bindings, 'testDirective']); } @@ -803,13 +803,13 @@ describe('render3 integration test', () => { */ const TestCmpt = createComponent('test-cmpt', function(rf: RenderFlags) { if (rf & RenderFlags.Create) { - ΔelementContainerStart(0); - { Δtext(1, 'component template'); } - ΔelementContainerEnd(); + ɵɵelementContainerStart(0); + { ɵɵtext(1, 'component template'); } + ɵɵelementContainerEnd(); } }, 2); - function App() { Δelement(0, 'test-cmpt'); } + function App() { ɵɵelement(0, 'test-cmpt'); } const fixture = new TemplateFixture(App, () => {}, 1, 0, [TestCmpt]); expect(fixture.html).toEqual('component template'); @@ -827,21 +827,21 @@ describe('render3 integration test', () => { */ const TestCmpt = createComponent('test-cmpt', function(rf: RenderFlags) { if (rf & RenderFlags.Create) { - ΔelementContainerStart(0); + ɵɵelementContainerStart(0); { - ΔelementContainerStart(1); + ɵɵelementContainerStart(1); { - ΔelementContainerStart(2); - { Δtext(3, 'content'); } - ΔelementContainerEnd(); + ɵɵelementContainerStart(2); + { ɵɵtext(3, 'content'); } + ɵɵelementContainerEnd(); } - ΔelementContainerEnd(); + ɵɵelementContainerEnd(); } - ΔelementContainerEnd(); + ɵɵelementContainerEnd(); } }, 4); - function App() { Δelement(0, 'test-cmpt'); } + function App() { ɵɵelement(0, 'test-cmpt'); } const fixture = new TemplateFixture(App, () => {}, 1, 0, [TestCmpt]); expect(fixture.html).toEqual('content'); @@ -857,29 +857,29 @@ describe('render3 integration test', () => { clear() { this._vcRef.clear(); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: TestDirective, selectors: [['', 'testDirective', '']], - factory: - () => testDirective = new TestDirective( - ΔdirectiveInject(TemplateRef as any), ΔdirectiveInject(ViewContainerRef as any)), + factory: () => testDirective = new TestDirective( + ɵɵdirectiveInject(TemplateRef as any), + ɵɵdirectiveInject(ViewContainerRef as any)), }); } function embeddedTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementContainerStart(0); + ɵɵelementContainerStart(0); { - ΔelementContainerStart(1); + ɵɵelementContainerStart(1); { - ΔelementContainerStart(2); - { Δtext(3, 'content'); } - ΔelementContainerEnd(); + ɵɵelementContainerStart(2); + { ɵɵtext(3, 'content'); } + ɵɵelementContainerEnd(); } - ΔelementContainerEnd(); + ɵɵelementContainerEnd(); } - ΔelementContainerEnd(); + ɵɵelementContainerEnd(); } } @@ -896,13 +896,13 @@ describe('render3 integration test', () => { */ const TestCmpt = createComponent('test-cmpt', function(rf: RenderFlags) { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, embeddedTemplate, 4, 0, 'ng-template', [AttributeMarker.Bindings, 'testDirective']); } }, 1, 0, [TestDirective]); - function App() { Δelement(0, 'test-cmpt'); } + function App() { ɵɵelement(0, 'test-cmpt'); } const fixture = new ComponentFixture(TestCmpt); expect(fixture.html).toEqual(''); @@ -925,10 +925,10 @@ describe('render3 integration test', () => { class Directive { constructor(public elRef: ElementRef) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Directive, selectors: [['', 'dir', '']], - factory: () => directive = new Directive(ΔdirectiveInject(ElementRef)), + factory: () => directive = new Directive(ɵɵdirectiveInject(ElementRef)), }); } @@ -938,12 +938,12 @@ describe('render3 integration test', () => { *
*/ function Template() { - ΔelementStart(0, 'div'); + ɵɵelementStart(0, 'div'); { - ΔelementContainerStart(1, [AttributeMarker.Bindings, 'dir']); - ΔelementContainerEnd(); + ɵɵelementContainerStart(1, [AttributeMarker.Bindings, 'dir']); + ɵɵelementContainerEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } const fixture = new TemplateFixture(Template, () => {}, 2, 0, [Directive]); @@ -955,7 +955,7 @@ describe('render3 integration test', () => { function ContentTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtext(0, 'Content'); + ɵɵtext(0, 'Content'); } } @@ -968,10 +968,10 @@ describe('render3 integration test', () => { clear() { this._vcRef.clear(); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Directive, selectors: [['', 'dir', '']], - factory: () => directive = new Directive(ΔdirectiveInject(ViewContainerRef as any)), + factory: () => directive = new Directive(ɵɵdirectiveInject(ViewContainerRef as any)), inputs: {contentTpl: 'contentTpl'}, }); } @@ -985,15 +985,15 @@ describe('render3 integration test', () => { */ const App = createComponent('app', function(rf: RenderFlags) { if (rf & RenderFlags.Create) { - ΔelementContainerStart(0, [AttributeMarker.Bindings, 'dir']); - Δtemplate( + ɵɵelementContainerStart(0, [AttributeMarker.Bindings, 'dir']); + ɵɵtemplate( 1, ContentTemplate, 1, 0, 'ng-template', null, ['content', ''], - ΔtemplateRefExtractor); - ΔelementContainerEnd(); + ɵɵtemplateRefExtractor); + ɵɵelementContainerEnd(); } if (rf & RenderFlags.Update) { - const content = Δreference(2) as any; - ΔelementProperty(0, 'contentTpl', Δbind(content)); + const content = ɵɵreference(2) as any; + ɵɵelementProperty(0, 'contentTpl', ɵɵbind(content)); } }, 3, 1, [Directive]); @@ -1013,7 +1013,7 @@ describe('render3 integration test', () => { it('should support ViewContainerRef on inside ', () => { function ContentTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtext(0, 'Content'); + ɵɵtext(0, 'Content'); } } @@ -1024,12 +1024,12 @@ describe('render3 integration test', () => { clear() { this._vcRef.clear(); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Directive, selectors: [['', 'dir', '']], - factory: - () => directive = new Directive( - ΔdirectiveInject(TemplateRef as any), ΔdirectiveInject(ViewContainerRef as any)), + factory: () => directive = new Directive( + ɵɵdirectiveInject(TemplateRef as any), + ɵɵdirectiveInject(ViewContainerRef as any)), }); } @@ -1042,11 +1042,11 @@ describe('render3 integration test', () => { */ const App = createComponent('app', function(rf: RenderFlags) { if (rf & RenderFlags.Create) { - ΔelementContainerStart(0); - Δtemplate( + ɵɵelementContainerStart(0); + ɵɵtemplate( 1, ContentTemplate, 1, 0, 'ng-template', [AttributeMarker.Bindings, 'dir'], [], - ΔtemplateRefExtractor); - ΔelementContainerEnd(); + ɵɵtemplateRefExtractor); + ɵɵelementContainerEnd(); } }, 2, 0, [Directive]); @@ -1068,12 +1068,12 @@ describe('render3 integration test', () => { *
*/ function Template() { - ΔelementStart(0, 'div'); + ɵɵelementStart(0, 'div'); { - ΔelementContainerStart(1, ['id', 'foo']); - ΔelementContainerEnd(); + ɵɵelementContainerStart(1, ['id', 'foo']); + ɵɵelementContainerEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } const fixture = new TemplateFixture(Template, () => {}, 2); @@ -1097,56 +1097,56 @@ describe('render3 integration test', () => { function showLabel(rf: RenderFlags, ctx: {label: string | undefined}) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.label != null) { - let rf1 = ΔembeddedViewStart(0, 1, 1); + let rf1 = ɵɵembeddedViewStart(0, 1, 1); if (rf1 & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf1 & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.label)); + ɵɵtextBinding(0, ɵɵbind(ctx.label)); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } function showTree(rf: RenderFlags, ctx: {tree: Tree}) { if (rf & RenderFlags.Create) { - Δcontainer(0); - Δcontainer(1); - Δcontainer(2); + ɵɵcontainer(0); + ɵɵcontainer(1); + ɵɵcontainer(2); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { - const rf0 = ΔembeddedViewStart(0, 1, 0); + const rf0 = ɵɵembeddedViewStart(0, 1, 0); { showLabel(rf0, {label: ctx.tree.beforeLabel}); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } - ΔcontainerRefreshEnd(); - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshEnd(); + ɵɵcontainerRefreshStart(1); { for (let subTree of ctx.tree.subTrees || []) { - const rf0 = ΔembeddedViewStart(0, 3, 0); + const rf0 = ɵɵembeddedViewStart(0, 3, 0); { showTree(rf0, {tree: subTree}); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); - ΔcontainerRefreshStart(2); + ɵɵcontainerRefreshEnd(); + ɵɵcontainerRefreshStart(2); { - const rf0 = ΔembeddedViewStart(0, 1, 0); + const rf0 = ɵɵembeddedViewStart(0, 1, 0); { showLabel(rf0, {label: ctx.tree.afterLabel}); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } @@ -1155,7 +1155,7 @@ describe('render3 integration test', () => { beforeTree !: Tree; // TODO(issue/24571): remove '!'. afterTree !: Tree; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ selectors: [['child']], type: ChildComponent, consts: 3, @@ -1163,26 +1163,26 @@ describe('render3 integration test', () => { template: function ChildComponentTemplate( rf: RenderFlags, ctx: {beforeTree: Tree, afterTree: Tree}) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δcontainer(0); - Δprojection(1); - Δcontainer(2); + ɵɵprojectionDef(); + ɵɵcontainer(0); + ɵɵprojection(1); + ɵɵcontainer(2); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { - const rf0 = ΔembeddedViewStart(0, 3, 0); + const rf0 = ɵɵembeddedViewStart(0, 3, 0); { showTree(rf0, {tree: ctx.beforeTree}); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } - ΔcontainerRefreshEnd(); - ΔcontainerRefreshStart(2); + ɵɵcontainerRefreshEnd(); + ɵɵcontainerRefreshStart(2); { - const rf0 = ΔembeddedViewStart(0, 3, 0); + const rf0 = ɵɵembeddedViewStart(0, 3, 0); { showTree(rf0, {tree: ctx.afterTree}); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, factory: () => new ChildComponent, @@ -1192,20 +1192,20 @@ describe('render3 integration test', () => { function parentTemplate(rf: RenderFlags, ctx: ParentCtx) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'child'); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'beforeTree', Δbind(ctx.beforeTree)); - ΔelementProperty(0, 'afterTree', Δbind(ctx.afterTree)); - ΔcontainerRefreshStart(1); + ɵɵelementProperty(0, 'beforeTree', ɵɵbind(ctx.beforeTree)); + ɵɵelementProperty(0, 'afterTree', ɵɵbind(ctx.afterTree)); + ɵɵcontainerRefreshStart(1); { - const rf0 = ΔembeddedViewStart(0, 3, 0); + const rf0 = ɵɵembeddedViewStart(0, 3, 0); { showTree(rf0, {tree: ctx.projectedTree}); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } @@ -1238,10 +1238,10 @@ describe('render3 integration test', () => { it('should support attribute bindings', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'span'); + ɵɵelement(0, 'span'); } if (rf & RenderFlags.Update) { - ΔelementAttribute(0, 'title', Δbind(ctx.title)); + ɵɵelementAttribute(0, 'title', ɵɵbind(ctx.title)); } }, 1, 1); @@ -1265,10 +1265,10 @@ describe('render3 integration test', () => { it('should stringify values used attribute bindings', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'span'); + ɵɵelement(0, 'span'); } if (rf & RenderFlags.Update) { - ΔelementAttribute(0, 'title', Δbind(ctx.title)); + ɵɵelementAttribute(0, 'title', ɵɵbind(ctx.title)); } }, 1, 1); @@ -1285,29 +1285,30 @@ describe('render3 integration test', () => { it('should update bindings', () => { function Template(rf: RenderFlags, c: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'b'); + ɵɵelement(0, 'b'); } if (rf & RenderFlags.Update) { - ΔelementAttribute(0, 'a', ΔinterpolationV(c)); - ΔelementAttribute(0, 'a0', Δbind(c[1])); - ΔelementAttribute(0, 'a1', Δinterpolation1(c[0], c[1], c[16])); - ΔelementAttribute(0, 'a2', Δinterpolation2(c[0], c[1], c[2], c[3], c[16])); - ΔelementAttribute(0, 'a3', Δinterpolation3(c[0], c[1], c[2], c[3], c[4], c[5], c[16])); - ΔelementAttribute( - 0, 'a4', Δinterpolation4(c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7], c[16])); - ΔelementAttribute( - 0, 'a5', - Δinterpolation5(c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7], c[8], c[9], c[16])); - ΔelementAttribute( - 0, 'a6', Δinterpolation6( + ɵɵelementAttribute(0, 'a', ɵɵinterpolationV(c)); + ɵɵelementAttribute(0, 'a0', ɵɵbind(c[1])); + ɵɵelementAttribute(0, 'a1', ɵɵinterpolation1(c[0], c[1], c[16])); + ɵɵelementAttribute(0, 'a2', ɵɵinterpolation2(c[0], c[1], c[2], c[3], c[16])); + ɵɵelementAttribute( + 0, 'a3', ɵɵinterpolation3(c[0], c[1], c[2], c[3], c[4], c[5], c[16])); + ɵɵelementAttribute( + 0, 'a4', ɵɵinterpolation4(c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7], c[16])); + ɵɵelementAttribute( + 0, 'a5', ɵɵinterpolation5( + c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7], c[8], c[9], c[16])); + ɵɵelementAttribute( + 0, 'a6', ɵɵinterpolation6( c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7], c[8], c[9], c[10], c[11], c[16])); - ΔelementAttribute( - 0, 'a7', Δinterpolation7( + ɵɵelementAttribute( + 0, 'a7', ɵɵinterpolation7( c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7], c[8], c[9], c[10], c[11], c[12], c[13], c[16])); - ΔelementAttribute( - 0, 'a8', Δinterpolation8( + ɵɵelementAttribute( + 0, 'a8', ɵɵinterpolation8( c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7], c[8], c[9], c[10], c[11], c[12], c[13], c[14], c[15], c[16])); } @@ -1331,30 +1332,30 @@ describe('render3 integration test', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span'); - Δcontainer(1); - ΔelementEnd(); + ɵɵelementStart(0, 'span'); + ɵɵcontainer(1); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementAttribute(0, 'title', Δbind(ctx.title)); - ΔcontainerRefreshStart(1); + ɵɵelementAttribute(0, 'title', ɵɵbind(ctx.title)); + ɵɵcontainerRefreshStart(1); { if (true) { - let rf1 = ΔembeddedViewStart(1, 1, 1); + let rf1 = ɵɵembeddedViewStart(1, 1, 1); { if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'b'); + ɵɵelementStart(0, 'b'); {} - ΔelementEnd(); + ɵɵelementEnd(); } if (rf1 & RenderFlags.Update) { - ΔelementAttribute(0, 'title', Δbind(ctx.title)); + ɵɵelementAttribute(0, 'title', ɵɵbind(ctx.title)); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 2, 1); @@ -1382,7 +1383,7 @@ describe('render3 integration test', () => { /* @HostBinding('attr.aria-label') */ label = 'some label'; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: HostBindingDir, selectors: [['', 'hostBindingDir', '']], factory: function HostBindingDir_Factory() { @@ -1391,10 +1392,10 @@ describe('render3 integration test', () => { hostBindings: function HostBindingDir_HostBindings( rf: RenderFlags, ctx: any, elIndex: number) { if (rf & RenderFlags.Create) { - ΔallocHostVars(1); + ɵɵallocHostVars(1); } if (rf & RenderFlags.Update) { - ΔelementAttribute(elIndex, 'aria-label', Δbind(ctx.label)); + ɵɵelementAttribute(elIndex, 'aria-label', ɵɵbind(ctx.label)); } } }); @@ -1402,7 +1403,7 @@ describe('render3 integration test', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['hostBindingDir', '']); + ɵɵelement(0, 'div', ['hostBindingDir', '']); } }, 1, 0, [HostBindingDir]); @@ -1419,13 +1420,13 @@ describe('render3 integration test', () => { it('should support binding to styles', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span'); - ΔelementStyling(null, ['border-color']); - ΔelementEnd(); + ɵɵelementStart(0, 'span'); + ɵɵelementStyling(null, ['border-color']); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementStyleProp(0, 0, ctx.color); - ΔelementStylingApply(0); + ɵɵelementStyleProp(0, 0, ctx.color); + ɵɵelementStylingApply(0); } }, 1); @@ -1446,13 +1447,13 @@ describe('render3 integration test', () => { it('should support binding to styles with suffix', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span'); - ΔelementStyling(null, ['font-size']); - ΔelementEnd(); + ɵɵelementStart(0, 'span'); + ɵɵelementStyling(null, ['font-size']); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementStyleProp(0, 0, ctx.time, 'px'); - ΔelementStylingApply(0); + ɵɵelementStyleProp(0, 0, ctx.time, 'px'); + ɵɵelementStylingApply(0); } }, 1); @@ -1480,13 +1481,13 @@ describe('render3 integration test', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span'); - ΔelementStyling(['active']); - ΔelementEnd(); + ɵɵelementStart(0, 'span'); + ɵɵelementStyling(['active']); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementClassProp(0, 0, ctx.class); - ΔelementStylingApply(0); + ɵɵelementClassProp(0, 0, ctx.class); + ɵɵelementStylingApply(0); } }, 1); @@ -1521,13 +1522,13 @@ describe('render3 integration test', () => { it('should work correctly with existing static classes', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span', [AttributeMarker.Classes, 'existing']); - ΔelementStyling(['existing', 'active']); - ΔelementEnd(); + ɵɵelementStart(0, 'span', [AttributeMarker.Classes, 'existing']); + ɵɵelementStyling(['existing', 'active']); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementClassProp(0, 1, ctx.class); - ΔelementStylingApply(0); + ɵɵelementClassProp(0, 1, ctx.class); + ɵɵelementStylingApply(0); } }, 1); @@ -1544,7 +1545,7 @@ describe('render3 integration test', () => { it('should apply classes properly when nodes are components', () => { const MyComp = createComponent('my-comp', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δtext(0, 'Comp Content'); + ɵɵtext(0, 'Comp Content'); } }, 1, 0, []); @@ -1553,13 +1554,13 @@ describe('render3 integration test', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'my-comp'); - ΔelementStyling(['active']); - ΔelementEnd(); + ɵɵelementStart(0, 'my-comp'); + ɵɵelementStyling(['active']); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementClassProp(0, 0, ctx.class); - ΔelementStylingApply(0); + ɵɵelementClassProp(0, 0, ctx.class); + ɵɵelementStylingApply(0); } }, 1, 0, [MyComp]); @@ -1583,17 +1584,17 @@ describe('render3 integration test', () => { create() { this.vcr.createEmbeddedView(this.tmp); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: StructuralComp, selectors: [['structural-comp']], factory: () => structuralComp = - new StructuralComp(ΔdirectiveInject(ViewContainerRef as any)), + new StructuralComp(ɵɵdirectiveInject(ViewContainerRef as any)), inputs: {tmp: 'tmp'}, consts: 1, vars: 0, template: (rf: RenderFlags, ctx: StructuralComp) => { if (rf & RenderFlags.Create) { - Δtext(0, 'Comp Content'); + ɵɵtext(0, 'Comp Content'); } } }); @@ -1601,7 +1602,7 @@ describe('render3 integration test', () => { function FooTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtext(0, 'Temp Content'); + ɵɵtext(0, 'Temp Content'); } } @@ -1613,17 +1614,17 @@ describe('render3 integration test', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate( - 0, FooTemplate, 1, 0, 'ng-template', null, ['foo', ''], ΔtemplateRefExtractor); - ΔelementStart(2, 'structural-comp'); - ΔelementStyling(['active']); - ΔelementEnd(); + ɵɵtemplate( + 0, FooTemplate, 1, 0, 'ng-template', null, ['foo', ''], ɵɵtemplateRefExtractor); + ɵɵelementStart(2, 'structural-comp'); + ɵɵelementStyling(['active']); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - const foo = Δreference(1) as any; - ΔelementClassProp(2, 0, ctx.class); - ΔelementStylingApply(2); - ΔelementProperty(2, 'tmp', Δbind(foo)); + const foo = ɵɵreference(1) as any; + ɵɵelementClassProp(2, 0, ctx.class); + ɵɵelementStylingApply(2); + ɵɵelementProperty(2, 'tmp', ɵɵbind(foo)); } }, 3, 1, [StructuralComp]); @@ -1646,7 +1647,7 @@ describe('render3 integration test', () => { let mockClassDirective: DirWithClassDirective; class DirWithClassDirective { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirWithClassDirective, selectors: [['', 'DirWithClass', '']], factory: () => mockClassDirective = new DirWithClassDirective(), @@ -1659,7 +1660,7 @@ describe('render3 integration test', () => { let mockStyleDirective: DirWithStyleDirective; class DirWithStyleDirective { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirWithStyleDirective, selectors: [['', 'DirWithStyle', '']], factory: () => mockStyleDirective = new DirWithStyleDirective(), @@ -1677,14 +1678,14 @@ describe('render3 integration test', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart( + ɵɵelementStart( 0, 'div', ['DirWithClass', '', AttributeMarker.Classes, 'apple', 'orange', 'banana']); - ΔelementStyling(); - ΔelementEnd(); + ɵɵelementStyling(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementStylingApply(0); + ɵɵelementStylingApply(0); } }, 1, 0, [DirWithClassDirective]); @@ -1699,14 +1700,14 @@ describe('render3 integration test', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', [ + ɵɵelementStart(0, 'div', [ 'DirWithStyle', '', AttributeMarker.Styles, 'width', '100px', 'height', '200px' ]); - ΔelementStyling(); - ΔelementEnd(); + ɵɵelementStyling(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementStylingApply(0); + ɵɵelementStylingApply(0); } }, 1, 0, [DirWithStyleDirective]); @@ -1721,13 +1722,13 @@ describe('render3 integration test', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['DirWithClass']); - ΔelementStyling(); - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['DirWithClass']); + ɵɵelementStyling(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementStylingMap(0, 'cucumber grape'); - ΔelementStylingApply(0); + ɵɵelementStylingMap(0, 'cucumber grape'); + ɵɵelementStylingApply(0); } }, 1, 0, [DirWithClassDirective]); @@ -1742,13 +1743,13 @@ describe('render3 integration test', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['DirWithStyle']); - ΔelementStyling(); - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['DirWithStyle']); + ɵɵelementStyling(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementStylingMap(0, null, {width: '200px', height: '500px'}); - ΔelementStylingApply(0); + ɵɵelementStylingMap(0, null, {width: '200px', height: '500px'}); + ɵɵelementStylingApply(0); } }, 1, 0, [DirWithStyleDirective]); @@ -1759,14 +1760,14 @@ describe('render3 integration test', () => { it('should apply initial styling to the element that contains the directive with host styling', () => { class DirWithInitialStyling { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirWithInitialStyling, selectors: [['', 'DirWithInitialStyling', '']], factory: () => new DirWithInitialStyling(), hostBindings: function( rf: RenderFlags, ctx: DirWithInitialStyling, elementIndex: number) { if (rf & RenderFlags.Create) { - ΔelementHostAttrs([ + ɵɵelementHostAttrs([ 'title', 'foo', AttributeMarker.Classes, 'heavy', 'golden', AttributeMarker.Styles, 'color', 'purple', 'font-weight', 'bold' ]); @@ -1784,7 +1785,7 @@ describe('render3 integration test', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', [ + ɵɵelement(0, 'div', [ 'DirWithInitialStyling', '', AttributeMarker.Classes, 'big', AttributeMarker.Styles, 'color', 'black', 'font-size', '200px' ]); @@ -1810,22 +1811,22 @@ describe('render3 integration test', () => { * [style.height]>
*/ class DirWithSingleStylingBindings { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirWithSingleStylingBindings, selectors: [['', 'DirWithSingleStylingBindings', '']], factory: () => dirInstance = new DirWithSingleStylingBindings(), hostBindings: function( rf: RenderFlags, ctx: DirWithSingleStylingBindings, elementIndex: number) { if (rf & RenderFlags.Create) { - ΔelementHostAttrs( + ɵɵelementHostAttrs( [AttributeMarker.Classes, 'def', AttributeMarker.Styles, 'width', '555px']); - ΔelementHostStyling(['xyz'], ['width', 'height']); + ɵɵelementHostStyling(['xyz'], ['width', 'height']); } if (rf & RenderFlags.Update) { - ΔelementHostStyleProp(0, ctx.width); - ΔelementHostStyleProp(1, ctx.height); - ΔelementHostClassProp(0, ctx.activateXYZClass); - ΔelementHostStylingApply(); + ɵɵelementHostStyleProp(0, ctx.width); + ɵɵelementHostStyleProp(1, ctx.height); + ɵɵelementHostClassProp(0, ctx.activateXYZClass); + ɵɵelementHostStylingApply(); } } }); @@ -1841,7 +1842,7 @@ describe('render3 integration test', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', [ + ɵɵelement(0, 'div', [ 'DirWithSingleStylingBindings', '', AttributeMarker.Classes, 'abc', AttributeMarker.Styles, 'width', '100px', 'height', '200px' ]); @@ -1886,17 +1887,17 @@ describe('render3 integration test', () => { * [style.width] */ class Dir1WithStyle { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Dir1WithStyle, selectors: [['', 'Dir1WithStyle', '']], factory: () => dir1Instance = new Dir1WithStyle(), hostBindings: function(rf: RenderFlags, ctx: Dir1WithStyle, elementIndex: number) { if (rf & RenderFlags.Create) { - ΔelementHostStyling(null, ['width']); + ɵɵelementHostStyling(null, ['width']); } if (rf & RenderFlags.Update) { - ΔelementHostStyleProp(0, ctx.width); - ΔelementHostStylingApply(); + ɵɵelementHostStyleProp(0, ctx.width); + ɵɵelementHostStylingApply(); } } }); @@ -1910,18 +1911,18 @@ describe('render3 integration test', () => { * style="width:111px" */ class Dir2WithStyle { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Dir2WithStyle, selectors: [['', 'Dir2WithStyle', '']], factory: () => dir2Instance = new Dir2WithStyle(), hostBindings: function(rf: RenderFlags, ctx: Dir2WithStyle, elementIndex: number) { if (rf & RenderFlags.Create) { - ΔelementHostAttrs([AttributeMarker.Styles, 'width', '111px']); - ΔelementHostStyling(null, ['width']); + ɵɵelementHostAttrs([AttributeMarker.Styles, 'width', '111px']); + ɵɵelementHostStyling(null, ['width']); } if (rf & RenderFlags.Update) { - ΔelementHostStyleProp(0, ctx.width); - ΔelementHostStylingApply(); + ɵɵelementHostStyleProp(0, ctx.width); + ɵɵelementHostStylingApply(); } } }); @@ -1934,12 +1935,12 @@ describe('render3 integration test', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['Dir1WithStyle', '', 'Dir2WithStyle', '']); - ΔelementStyling(null, ['width']); + ɵɵelement(0, 'div', ['Dir1WithStyle', '', 'Dir2WithStyle', '']); + ɵɵelementStyling(null, ['width']); } if (rf & RenderFlags.Update) { - ΔelementStyleProp(0, 0, ctx.width); - ΔelementStylingApply(0); + ɵɵelementStyleProp(0, 0, ctx.width); + ɵɵelementStylingApply(0); } }, 1, 0, [Dir1WithStyle, Dir2WithStyle]); @@ -1983,17 +1984,17 @@ describe('render3 integration test', () => { * [class] */ class Dir1WithStyling { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Dir1WithStyling, selectors: [['', 'Dir1WithStyling', '']], factory: () => dir1Instance = new Dir1WithStyling(), hostBindings: function(rf: RenderFlags, ctx: Dir1WithStyling, elementIndex: number) { if (rf & RenderFlags.Create) { - ΔelementHostStyling(); + ɵɵelementHostStyling(); } if (rf & RenderFlags.Update) { - ΔelementHostStylingMap(ctx.classesExp, ctx.stylesExp); - ΔelementHostStylingApply(); + ɵɵelementHostStylingMap(ctx.classesExp, ctx.stylesExp); + ɵɵelementHostStylingApply(); } } }); @@ -2009,18 +2010,18 @@ describe('render3 integration test', () => { * style="width:111px" */ class Dir2WithStyling { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Dir2WithStyling, selectors: [['', 'Dir2WithStyling', '']], factory: () => dir2Instance = new Dir2WithStyling(), hostBindings: function(rf: RenderFlags, ctx: Dir2WithStyling, elementIndex: number) { if (rf & RenderFlags.Create) { - ΔelementHostAttrs([AttributeMarker.Styles, 'width', '111px']); - ΔelementHostStyling(); + ɵɵelementHostAttrs([AttributeMarker.Styles, 'width', '111px']); + ɵɵelementHostStyling(); } if (rf & RenderFlags.Update) { - ΔelementHostStylingMap(null, ctx.stylesExp); - ΔelementHostStylingApply(); + ɵɵelementHostStylingMap(null, ctx.stylesExp); + ɵɵelementHostStylingApply(); } } }); @@ -2034,12 +2035,12 @@ describe('render3 integration test', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['Dir1WithStyling', '', 'Dir2WithStyling', '']); - ΔelementStyling(); + ɵɵelement(0, 'div', ['Dir1WithStyling', '', 'Dir2WithStyling', '']); + ɵɵelementStyling(); } if (rf & RenderFlags.Update) { - ΔelementStylingMap(0, ctx.classesExp, ctx.stylesExp); - ΔelementStylingApply(0); + ɵɵelementStylingMap(0, ctx.classesExp, ctx.stylesExp); + ɵɵelementStylingApply(0); } }, 1, 0, [Dir1WithStyling, Dir2WithStyling]); @@ -2110,13 +2111,13 @@ describe('render3 integration test', () => { it('should properly handle and render interpolation for class attribute bindings', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - ΔelementStyling(); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵelementStyling(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementStylingMap(0, Δinterpolation2('-', ctx.name, '-', ctx.age, '-')); - ΔelementStylingApply(0); + ɵɵelementStylingMap(0, ɵɵinterpolation2('-', ctx.name, '-', ctx.age, '-')); + ɵɵelementStylingApply(0); } }, 1, 2); @@ -2143,20 +2144,20 @@ describe('template data', () => { */ function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.condition) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - Δelement(0, 'div'); + ɵɵelement(0, 'div'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } @@ -2186,7 +2187,7 @@ describe('template data', () => { describe('component styles', () => { it('should pass in the component styles directly into the underlying renderer', () => { class StyledComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: StyledComp, styles: ['div { color: red; }'], consts: 1, @@ -2196,7 +2197,7 @@ describe('component styles', () => { factory: () => new StyledComp(), template: (rf: RenderFlags, ctx: StyledComp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div'); + ɵɵelement(0, 'div'); } } }); @@ -2214,7 +2215,7 @@ describe('component animations', () => { const animB = {name: 'b'}; class AnimComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: AnimComp, consts: 0, vars: 0, @@ -2241,7 +2242,7 @@ describe('component animations', () => { it('should include animations in the renderType data array even if the array is empty', () => { class AnimComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: AnimComp, consts: 0, vars: 0, @@ -2261,7 +2262,7 @@ describe('component animations', () => { it('should allow [@trigger] bindings to be picked up by the underlying renderer', () => { class AnimComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: AnimComp, consts: 1, vars: 1, @@ -2269,10 +2270,10 @@ describe('component animations', () => { factory: () => new AnimComp(), template: (rf: RenderFlags, ctx: AnimComp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div', [AttributeMarker.Bindings, '@fooAnimation']); + ɵɵelement(0, 'div', [AttributeMarker.Bindings, '@fooAnimation']); } if (rf & RenderFlags.Update) { - ΔelementAttribute(0, '@fooAnimation', Δbind(ctx.animationValue)); + ɵɵelementAttribute(0, '@fooAnimation', ɵɵbind(ctx.animationValue)); } } }); @@ -2297,7 +2298,7 @@ describe('component animations', () => { it('should allow creation-level [@trigger] properties to be picked up by the underlying renderer', () => { class AnimComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: AnimComp, consts: 1, vars: 1, @@ -2305,7 +2306,7 @@ describe('component animations', () => { factory: () => new AnimComp(), template: (rf: RenderFlags, ctx: AnimComp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['@fooAnimation', '']); + ɵɵelement(0, 'div', ['@fooAnimation', '']); } } }); @@ -2324,13 +2325,13 @@ describe('component animations', () => { it('should allow host binding animations to be picked up and rendered', () => { class ChildCompWithAnim { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: ChildCompWithAnim, factory: () => new ChildCompWithAnim(), selectors: [['child-comp-with-anim']], hostBindings: function(rf: RenderFlags, ctx: any, elementIndex: number): void { if (rf & RenderFlags.Update) { - ΔelementProperty(0, '@fooAnim', ctx.exp); + ɵɵelementProperty(0, '@fooAnim', ctx.exp); } }, }); @@ -2339,7 +2340,7 @@ describe('component animations', () => { } class ParentComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ParentComp, consts: 1, vars: 1, @@ -2347,7 +2348,7 @@ describe('component animations', () => { factory: () => new ParentComp(), template: (rf: RenderFlags, ctx: ParentComp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'child-comp-with-anim'); + ɵɵelement(0, 'child-comp-with-anim'); } }, directives: [ChildCompWithAnim] @@ -2369,7 +2370,7 @@ describe('component animations', () => { describe('element discovery', () => { it('should only monkey-patch immediate child nodes in a component', () => { class StructuredComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: StructuredComp, selectors: [['structured-comp']], factory: () => new StructuredComp(), @@ -2377,10 +2378,10 @@ describe('element discovery', () => { vars: 0, template: (rf: RenderFlags, ctx: StructuredComp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - ΔelementStart(1, 'p'); - ΔelementEnd(); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵelementStart(1, 'p'); + ɵɵelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { } @@ -2401,7 +2402,7 @@ describe('element discovery', () => { it('should only monkey-patch immediate child nodes in a sub component', () => { class ChildComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ChildComp, selectors: [['child-comp']], factory: () => new ChildComp(), @@ -2409,16 +2410,16 @@ describe('element discovery', () => { vars: 0, template: (rf: RenderFlags, ctx: ChildComp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div'); - Δelement(1, 'div'); - Δelement(2, 'div'); + ɵɵelement(0, 'div'); + ɵɵelement(1, 'div'); + ɵɵelement(2, 'div'); } } }); } class ParentComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ParentComp, selectors: [['parent-comp']], directives: [ChildComp], @@ -2427,10 +2428,10 @@ describe('element discovery', () => { vars: 0, template: (rf: RenderFlags, ctx: ParentComp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'section'); - ΔelementStart(1, 'child-comp'); - ΔelementEnd(); - ΔelementEnd(); + ɵɵelementStart(0, 'section'); + ɵɵelementStart(1, 'child-comp'); + ɵɵelementEnd(); + ɵɵelementEnd(); } } }); @@ -2451,7 +2452,7 @@ describe('element discovery', () => { it('should only monkey-patch immediate child nodes in an embedded template container', () => { class StructuredComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: StructuredComp, selectors: [['structured-comp']], directives: [NgIf], @@ -2460,19 +2461,19 @@ describe('element discovery', () => { vars: 1, template: (rf: RenderFlags, ctx: StructuredComp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'section'); - Δtemplate(1, (rf, ctx) => { + ɵɵelementStart(0, 'section'); + ɵɵtemplate(1, (rf, ctx) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - Δelement(1, 'p'); - ΔelementEnd(); - Δelement(2, 'div'); + ɵɵelementStart(0, 'div'); + ɵɵelement(1, 'p'); + ɵɵelementEnd(); + ɵɵelement(2, 'div'); } }, 3, 0, 'ng-template', ['ngIf', '']); - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(1, 'ngIf', true); + ɵɵelementProperty(1, 'ngIf', true); } } }); @@ -2499,7 +2500,7 @@ describe('element discovery', () => { it('should return a context object from a given dom node', () => { class StructuredComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: StructuredComp, selectors: [['structured-comp']], directives: [NgIf], @@ -2508,8 +2509,8 @@ describe('element discovery', () => { vars: 0, template: (rf: RenderFlags, ctx: StructuredComp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'section'); - Δelement(1, 'div'); + ɵɵelement(0, 'section'); + ɵɵelement(1, 'div'); } } }); @@ -2537,7 +2538,7 @@ describe('element discovery', () => { it('should cache the element context on a element was pre-emptively monkey-patched', () => { class StructuredComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: StructuredComp, selectors: [['structured-comp']], factory: () => new StructuredComp(), @@ -2545,7 +2546,7 @@ describe('element discovery', () => { vars: 0, template: (rf: RenderFlags, ctx: StructuredComp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'section'); + ɵɵelement(0, 'section'); } } }); @@ -2569,7 +2570,7 @@ describe('element discovery', () => { it('should cache the element context on an intermediate element that isn\'t pre-emptively monkey-patched', () => { class StructuredComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: StructuredComp, selectors: [['structured-comp']], factory: () => new StructuredComp(), @@ -2577,9 +2578,9 @@ describe('element discovery', () => { vars: 0, template: (rf: RenderFlags, ctx: StructuredComp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'section'); - Δelement(1, 'p'); - ΔelementEnd(); + ɵɵelementStart(0, 'section'); + ɵɵelement(1, 'p'); + ɵɵelementEnd(); } } }); @@ -2602,7 +2603,7 @@ describe('element discovery', () => { it('should be able to pull in element context data even if the element is decorated using styling', () => { class StructuredComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: StructuredComp, selectors: [['structured-comp']], factory: () => new StructuredComp(), @@ -2610,12 +2611,12 @@ describe('element discovery', () => { vars: 0, template: (rf: RenderFlags, ctx: StructuredComp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'section'); - ΔelementStyling(['class-foo']); - ΔelementEnd(); + ɵɵelementStart(0, 'section'); + ɵɵelementStyling(['class-foo']); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementStylingApply(0); + ɵɵelementStylingApply(0); } } }); @@ -2656,7 +2657,7 @@ describe('element discovery', () => { */ class ProjectorComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ProjectorComp, selectors: [['projector-comp']], factory: () => new ProjectorComp(), @@ -2664,13 +2665,13 @@ describe('element discovery', () => { vars: 0, template: (rf: RenderFlags, ctx: ProjectorComp) => { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δtext(0, 'welcome'); - ΔelementStart(1, 'header'); - ΔelementStart(2, 'h1'); - Δprojection(3); - ΔelementEnd(); - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵtext(0, 'welcome'); + ɵɵelementStart(1, 'header'); + ɵɵelementStart(2, 'h1'); + ɵɵprojection(3); + ɵɵelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { } @@ -2679,7 +2680,7 @@ describe('element discovery', () => { } class ParentComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ParentComp, selectors: [['parent-comp']], directives: [ProjectorComp], @@ -2688,14 +2689,14 @@ describe('element discovery', () => { vars: 0, template: (rf: RenderFlags, ctx: ParentComp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'section'); - ΔelementStart(1, 'projector-comp'); - ΔelementStart(2, 'p'); - Δtext(3, 'this content is projected'); - ΔelementEnd(); - Δtext(4, 'this content is projected also'); - ΔelementEnd(); - ΔelementEnd(); + ɵɵelementStart(0, 'section'); + ɵɵelementStart(1, 'projector-comp'); + ɵɵelementStart(2, 'p'); + ɵɵtext(3, 'this content is projected'); + ɵɵelementEnd(); + ɵɵtext(4, 'this content is projected also'); + ɵɵelementEnd(); + ɵɵelementEnd(); } } }); @@ -2753,7 +2754,7 @@ describe('element discovery', () => { it('should return `null` when an element context is retrieved that is a DOM node that was not created by Angular', () => { class StructuredComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: StructuredComp, selectors: [['structured-comp']], factory: () => new StructuredComp(), @@ -2761,7 +2762,7 @@ describe('element discovery', () => { vars: 0, template: (rf: RenderFlags, ctx: StructuredComp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'section'); + ɵɵelement(0, 'section'); } } }); @@ -2780,7 +2781,7 @@ describe('element discovery', () => { it('should by default monkey-patch the bootstrap component with context details', () => { class StructuredComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: StructuredComp, selectors: [['structured-comp']], factory: () => new StructuredComp(), @@ -2819,7 +2820,7 @@ describe('element discovery', () => { let myDir3Instance: MyDir2|null = null; class MyDir1 { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: MyDir1, selectors: [['', 'my-dir-1', '']], factory: () => myDir1Instance = new MyDir1() @@ -2827,7 +2828,7 @@ describe('element discovery', () => { } class MyDir2 { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: MyDir2, selectors: [['', 'my-dir-2', '']], factory: () => myDir2Instance = new MyDir2() @@ -2835,7 +2836,7 @@ describe('element discovery', () => { } class MyDir3 { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: MyDir3, selectors: [['', 'my-dir-3', '']], factory: () => myDir3Instance = new MyDir2() @@ -2843,7 +2844,7 @@ describe('element discovery', () => { } class StructuredComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: StructuredComp, selectors: [['structured-comp']], directives: [MyDir1, MyDir2, MyDir3], @@ -2852,8 +2853,8 @@ describe('element discovery', () => { vars: 0, template: (rf: RenderFlags, ctx: StructuredComp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['my-dir-1', '', 'my-dir-2', '']); - Δelement(1, 'div', ['my-dir-3']); + ɵɵelement(0, 'div', ['my-dir-1', '', 'my-dir-2', '']); + ɵɵelement(1, 'div', ['my-dir-3']); } } }); @@ -2908,7 +2909,7 @@ describe('element discovery', () => { let childComponentInstance: ChildComp|null = null; class MyDir1 { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: MyDir1, selectors: [['', 'my-dir-1', '']], factory: () => myDir1Instance = new MyDir1() @@ -2916,7 +2917,7 @@ describe('element discovery', () => { } class MyDir2 { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: MyDir2, selectors: [['', 'my-dir-2', '']], factory: () => myDir2Instance = new MyDir2() @@ -2924,7 +2925,7 @@ describe('element discovery', () => { } class ChildComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ChildComp, selectors: [['child-comp']], factory: () => childComponentInstance = new ChildComp(), @@ -2932,14 +2933,14 @@ describe('element discovery', () => { vars: 0, template: (rf: RenderFlags, ctx: ChildComp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div'); + ɵɵelement(0, 'div'); } } }); } class ParentComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ParentComp, selectors: [['parent-comp']], directives: [ChildComp, MyDir1, MyDir2], @@ -2948,7 +2949,7 @@ describe('element discovery', () => { vars: 0, template: (rf: RenderFlags, ctx: ParentComp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'child-comp', ['my-dir-1', '', 'my-dir-2', '']); + ɵɵelement(0, 'child-comp', ['my-dir-1', '', 'my-dir-2', '']); } } }); @@ -3001,7 +3002,7 @@ describe('element discovery', () => { it('should monkey-patch sub components with the view data and then replace them with the context result once a lookup occurs', () => { class ChildComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ChildComp, selectors: [['child-comp']], factory: () => new ChildComp(), @@ -3009,16 +3010,16 @@ describe('element discovery', () => { vars: 0, template: (rf: RenderFlags, ctx: ChildComp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div'); - Δelement(1, 'div'); - Δelement(2, 'div'); + ɵɵelement(0, 'div'); + ɵɵelement(1, 'div'); + ɵɵelement(2, 'div'); } } }); } class ParentComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ParentComp, selectors: [['parent-comp']], directives: [ChildComp], @@ -3027,10 +3028,10 @@ describe('element discovery', () => { vars: 0, template: (rf: RenderFlags, ctx: ParentComp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'section'); - ΔelementStart(1, 'child-comp'); - ΔelementEnd(); - ΔelementEnd(); + ɵɵelementStart(0, 'section'); + ɵɵelementStart(1, 'child-comp'); + ɵɵelementEnd(); + ɵɵelementEnd(); } } }); @@ -3062,7 +3063,7 @@ describe('element discovery', () => { describe('sanitization', () => { it('should sanitize data using the provided sanitization interface', () => { class SanitizationComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: SanitizationComp, selectors: [['sanitize-this']], factory: () => new SanitizationComp(), @@ -3070,10 +3071,10 @@ describe('sanitization', () => { vars: 1, template: (rf: RenderFlags, ctx: SanitizationComp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'a'); + ɵɵelement(0, 'a'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'href', Δbind(ctx.href), ΔsanitizeUrl); + ɵɵelementProperty(0, 'href', ɵɵbind(ctx.href), ɵɵsanitizeUrl); } } }); @@ -3104,23 +3105,23 @@ describe('sanitization', () => { // @HostBinding() cite: any = 'http://cite-dir-value'; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: UnsafeUrlHostBindingDir, selectors: [['', 'unsafeUrlHostBindingDir', '']], factory: () => hostBindingDir = new UnsafeUrlHostBindingDir(), hostBindings: (rf: RenderFlags, ctx: any, elementIndex: number) => { if (rf & RenderFlags.Create) { - ΔallocHostVars(1); + ɵɵallocHostVars(1); } if (rf & RenderFlags.Update) { - ΔelementProperty(elementIndex, 'cite', Δbind(ctx.cite), ΔsanitizeUrl, true); + ɵɵelementProperty(elementIndex, 'cite', ɵɵbind(ctx.cite), ɵɵsanitizeUrl, true); } } }); } class SimpleComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: SimpleComp, selectors: [['sanitize-this']], factory: () => new SimpleComp(), @@ -3128,7 +3129,7 @@ describe('sanitization', () => { vars: 0, template: (rf: RenderFlags, ctx: SimpleComp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'blockquote', ['unsafeUrlHostBindingDir', '']); + ɵɵelement(0, 'blockquote', ['unsafeUrlHostBindingDir', '']); } }, directives: [UnsafeUrlHostBindingDir] diff --git a/packages/core/test/render3/ivy/jit_spec.ts b/packages/core/test/render3/ivy/jit_spec.ts index f782ef2d58..5cd0368a8e 100644 --- a/packages/core/test/render3/ivy/jit_spec.ts +++ b/packages/core/test/render3/ivy/jit_spec.ts @@ -7,10 +7,10 @@ */ import 'reflect-metadata'; -import {ElementRef, QueryList, ΔsetComponentScope as setComponentScope} from '@angular/core'; +import {ElementRef, QueryList, ɵɵsetComponentScope as setComponentScope} from '@angular/core'; import {Injectable} from '@angular/core/src/di/injectable'; -import {setCurrentInjector, Δinject} from '@angular/core/src/di/injector_compatibility'; -import {ΔInjectorDef, ΔdefineInjectable} from '@angular/core/src/di/interface/defs'; +import {setCurrentInjector, ɵɵinject} from '@angular/core/src/di/injector_compatibility'; +import {ɵɵInjectorDef, ɵɵdefineInjectable} from '@angular/core/src/di/interface/defs'; import {ivyEnabled} from '@angular/core/src/ivy_switch'; import {ContentChild, ContentChildren, ViewChild, ViewChildren} from '@angular/core/src/metadata/di'; import {Component, Directive, HostBinding, HostListener, Input, Output, Pipe} from '@angular/core/src/metadata/directives'; @@ -45,7 +45,7 @@ ivyEnabled && describe('render3 jit', () => { expect(ServiceAny.ngInjectableDef).toBeDefined(); expect(ServiceAny.ngInjectableDef.providedIn).toBe('root'); - expect(Δinject(Service) instanceof Service).toBe(true); + expect(ɵɵinject(Service) instanceof Service).toBe(true); }); it('compiles an injectable with a useValue provider', () => { @@ -53,7 +53,7 @@ ivyEnabled && describe('render3 jit', () => { class Service { } - expect(Δinject(Service)).toBe('test'); + expect(ɵɵinject(Service)).toBe('test'); }); it('compiles an injectable with a useExisting provider', () => { @@ -65,7 +65,7 @@ ivyEnabled && describe('render3 jit', () => { class Service { } - expect(Δinject(Service)).toBe('test'); + expect(ɵɵinject(Service)).toBe('test'); }); it('compiles an injectable with a useFactory provider, without deps', () => { @@ -74,7 +74,7 @@ ivyEnabled && describe('render3 jit', () => { class Service { } - expect(Δinject(Service)).toBe('test'); + expect(ɵɵinject(Service)).toBe('test'); }); it('compiles an injectable with a useFactory provider, with deps', () => { @@ -86,7 +86,7 @@ ivyEnabled && describe('render3 jit', () => { class Service { } - expect(Δinject(Service)).toBe('test'); + expect(ɵɵinject(Service)).toBe('test'); }); it('compiles an injectable with a useClass provider, with deps', () => { @@ -104,7 +104,7 @@ ivyEnabled && describe('render3 jit', () => { } const ServiceAny = Service as any; - expect(Δinject(Service).value).toBe('test'); + expect(ɵɵinject(Service).value).toBe('test'); }); it('compiles an injectable with a useClass provider, without deps', () => { @@ -119,8 +119,8 @@ ivyEnabled && describe('render3 jit', () => { get value(): number { return 0; } } - expect(Δinject(Existing).value).toBe(1); - const injected = Δinject(Service); + expect(ɵɵinject(Existing).value).toBe(1); + const injected = ɵɵinject(Service); expect(injected instanceof Existing).toBe(true); expect(injected.value).toBe(2); }); @@ -139,7 +139,7 @@ ivyEnabled && describe('render3 jit', () => { class Child extends Base { } - expect(Δinject(Child).dep instanceof Dep).toBe(true); + expect(ɵɵinject(Child).dep instanceof Dep).toBe(true); }); it('compiles a module to a definition', () => { @@ -167,7 +167,7 @@ ivyEnabled && describe('render3 jit', () => { it('compiles a module to an ngInjectorDef with the providers', () => { class Token { - static ngInjectableDef = ΔdefineInjectable({ + static ngInjectableDef = ɵɵdefineInjectable({ providedIn: 'root', factory: () => 'default', }); @@ -180,7 +180,7 @@ ivyEnabled && describe('render3 jit', () => { constructor(public token: Token) {} } - const injectorDef: ΔInjectorDef = (Module as any).ngInjectorDef; + const injectorDef: ɵɵInjectorDef = (Module as any).ngInjectorDef; const instance = injectorDef.factory(); // Since the instance was created outside of an injector using the module, the diff --git a/packages/core/test/render3/jit_environment_spec.ts b/packages/core/test/render3/jit_environment_spec.ts index e256047c21..659066d30f 100644 --- a/packages/core/test/render3/jit_environment_spec.ts +++ b/packages/core/test/render3/jit_environment_spec.ts @@ -12,12 +12,12 @@ import {Identifiers} from '@angular/compiler/src/render3/r3_identifiers'; import {angularCoreEnv} from '../../src/render3/jit/environment'; const INTERFACE_EXCEPTIONS = new Set([ - 'ΔBaseDef', - 'ΔComponentDefWithMeta', - 'ΔDirectiveDefWithMeta', - 'ΔInjectorDef', - 'ΔNgModuleDefWithMeta', - 'ΔPipeDefWithMeta', + 'ɵɵBaseDef', + 'ɵɵComponentDefWithMeta', + 'ɵɵDirectiveDefWithMeta', + 'ɵɵInjectorDef', + 'ɵɵNgModuleDefWithMeta', + 'ɵɵPipeDefWithMeta', ]); describe('r3 jit environment', () => { diff --git a/packages/core/test/render3/lifecycle_spec.ts b/packages/core/test/render3/lifecycle_spec.ts index e543ef074b..b0780aee98 100644 --- a/packages/core/test/render3/lifecycle_spec.ts +++ b/packages/core/test/render3/lifecycle_spec.ts @@ -7,8 +7,8 @@ */ import {ComponentFactoryResolver, OnDestroy, SimpleChange, SimpleChanges, ViewContainerRef} from '../../src/core'; -import {AttributeMarker, ComponentTemplate, LifecycleHooksFeature, NO_CHANGE, injectComponentFactoryResolver, ΔNgOnChangesFeature, ΔdefineComponent, ΔdefineDirective} from '../../src/render3/index'; -import {markDirty, store, Δbind, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, ΔdirectiveInject, Δelement, ΔelementEnd, ΔelementProperty, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, Δlistener, Δprojection, ΔprojectionDef, Δselect, Δtemplate, Δtext} from '../../src/render3/instructions/all'; +import {AttributeMarker, ComponentTemplate, LifecycleHooksFeature, injectComponentFactoryResolver, ɵɵNgOnChangesFeature, ɵɵdefineComponent, ɵɵdefineDirective} from '../../src/render3/index'; +import {markDirty, ɵɵbind, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵdirectiveInject, ɵɵelement, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵlistener, ɵɵprojection, ɵɵprojectionDef, ɵɵselect, ɵɵtemplate, ɵɵtext} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; import {NgIf} from './common_with_def'; @@ -19,10 +19,10 @@ describe('lifecycles', () => { function getParentTemplate(name: string) { return (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, name); + ɵɵelement(0, name); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', Δbind(ctx.val)); + ɵɵelementProperty(0, 'val', ɵɵbind(ctx.val)); } }; } @@ -34,16 +34,16 @@ describe('lifecycles', () => { let Comp = createOnInitComponent('comp', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'div'); - { Δprojection(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'div'); + { ɵɵprojection(1); } + ɵɵelementEnd(); } }, 2); let Parent = createOnInitComponent('parent', getParentTemplate('comp'), 1, 1, [Comp]); let ProjectedComp = createOnInitComponent('projected', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δtext(0, 'content'); + ɵɵtext(0, 'content'); } }, 1); @@ -57,7 +57,7 @@ describe('lifecycles', () => { events.push(`${name}${this.val}`); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Component, selectors: [[name]], consts: consts, @@ -72,7 +72,7 @@ describe('lifecycles', () => { class Directive { ngOnInit() { events.push('dir'); } - static ngDirectiveDef = ΔdefineDirective( + static ngDirectiveDef = ɵɵdefineDirective( {type: Directive, selectors: [['', 'dir', '']], factory: () => new Directive()}); } @@ -83,10 +83,10 @@ describe('lifecycles', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', Δbind(ctx.val)); + ɵɵelementProperty(0, 'val', ɵɵbind(ctx.val)); } }, 1, 1, directives); @@ -115,7 +115,7 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'parent'); + ɵɵelement(0, 'parent'); } }, 1, 0, directives); @@ -132,13 +132,13 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'parent'); - Δelement(1, 'parent'); + ɵɵelement(0, 'parent'); + ɵɵelement(1, 'parent'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', 1); - Δselect(1); - ΔelementProperty(1, 'val', 2); + ɵɵelementProperty(0, 'val', 1); + ɵɵselect(1); + ɵɵelementProperty(1, 'val', 2); } }, 2, 0, directives); @@ -155,20 +155,20 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (!ctx.skip) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1, 0, directives); @@ -189,17 +189,17 @@ describe('lifecycles', () => { function IfTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } } /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate(0, IfTemplate, 1, 0, 'comp', [AttributeMarker.Template, 'ngIf']); + ɵɵtemplate(0, IfTemplate, 1, 0, 'comp', [AttributeMarker.Template, 'ngIf']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'ngIf', Δbind(ctx.showing)); + ɵɵelementProperty(0, 'ngIf', ɵɵbind(ctx.showing)); } }, 1, 0, directives); @@ -224,11 +224,12 @@ describe('lifecycles', () => { class ViewContainerComp { constructor(public vcr: ViewContainerRef, public cfr: ComponentFactoryResolver) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ViewContainerComp, selectors: [['view-container-comp']], - factory: () => viewContainerComp = new ViewContainerComp( - ΔdirectiveInject(ViewContainerRef as any), injectComponentFactoryResolver()), + factory: + () => viewContainerComp = new ViewContainerComp( + ɵɵdirectiveInject(ViewContainerRef as any), injectComponentFactoryResolver()), consts: 0, vars: 0, template: (rf: RenderFlags, ctx: ViewContainerComp) => {} @@ -237,7 +238,7 @@ describe('lifecycles', () => { const DynamicComp = createComponent('dynamic-comp', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } }, 1, 0, [Comp]); @@ -258,9 +259,9 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'comp'); - { ΔelementStart(1, 'projected'); } - ΔelementEnd(); + ɵɵelementStart(0, 'comp'); + { ɵɵelementStart(1, 'projected'); } + ɵɵelementEnd(); } }, 2, 0, directives); @@ -279,21 +280,21 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'comp'); - { ΔelementStart(1, 'projected'); } - ΔelementEnd(); - ΔelementStart(2, 'comp'); - { ΔelementStart(3, 'projected'); } - ΔelementEnd(); + ɵɵelementStart(0, 'comp'); + { ɵɵelementStart(1, 'projected'); } + ɵɵelementEnd(); + ɵɵelementStart(2, 'comp'); + { ɵɵelementStart(3, 'projected'); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', 1); - Δselect(1); - ΔelementProperty(1, 'val', 1); - Δselect(2); - ΔelementProperty(2, 'val', 2); - Δselect(3); - ΔelementProperty(3, 'val', 2); + ɵɵelementProperty(0, 'val', 1); + ɵɵselect(1); + ɵɵelementProperty(1, 'val', 1); + ɵɵselect(2); + ɵɵelementProperty(2, 'val', 2); + ɵɵselect(3); + ɵɵelementProperty(3, 'val', 2); } }, 4, 0, directives); @@ -305,7 +306,7 @@ describe('lifecycles', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp', ['dir', '']); + ɵɵelement(0, 'comp', ['dir', '']); } }, 1, 0, directives); @@ -320,7 +321,7 @@ describe('lifecycles', () => { /**
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dir', '']); + ɵɵelement(0, 'div', ['dir', '']); } }, 1, 0, directives); @@ -341,28 +342,28 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); - Δcontainer(1); - Δelement(2, 'comp'); + ɵɵelement(0, 'comp'); + ɵɵcontainer(1); + ɵɵelement(2, 'comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', 1); - Δselect(2); - ΔelementProperty(2, 'val', 5); - ΔcontainerRefreshStart(1); + ɵɵelementProperty(0, 'val', 1); + ɵɵselect(2); + ɵɵelementProperty(2, 'val', 5); + ɵɵcontainerRefreshStart(1); { for (let j = 2; j < 5; j++) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } if (rf1 & RenderFlags.Update) { - ΔelementProperty(0, 'val', j); + ɵɵelementProperty(0, 'val', j); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 3, 0, directives); @@ -382,28 +383,28 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'parent'); - Δcontainer(1); - Δelement(2, 'parent'); + ɵɵelement(0, 'parent'); + ɵɵcontainer(1); + ɵɵelement(2, 'parent'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', 1); - Δselect(2); - ΔelementProperty(2, 'val', 5); - ΔcontainerRefreshStart(1); + ɵɵelementProperty(0, 'val', 1); + ɵɵselect(2); + ɵɵelementProperty(2, 'val', 5); + ɵɵcontainerRefreshStart(1); { for (let j = 2; j < 5; j++) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - Δelement(0, 'parent'); + ɵɵelement(0, 'parent'); } if (rf1 & RenderFlags.Update) { - ΔelementProperty(0, 'val', j); + ɵɵelementProperty(0, 'val', j); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 3, 0, directives); @@ -441,7 +442,7 @@ describe('lifecycles', () => { ngOnInit() { allEvents.push('init ' + name); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Component, selectors: [[name]], factory: () => new Component(), template, @@ -456,7 +457,7 @@ describe('lifecycles', () => { class Directive { ngDoCheck() { events.push('dir'); } - static ngDirectiveDef = ΔdefineDirective( + static ngDirectiveDef = ɵɵdefineDirective( {type: Directive, selectors: [['', 'dir', '']], factory: () => new Directive()}); } @@ -466,7 +467,7 @@ describe('lifecycles', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } }, 1, 0, directives); @@ -493,7 +494,7 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'parent'); + ɵɵelement(0, 'parent'); } }, 1, 0, directives); @@ -505,7 +506,7 @@ describe('lifecycles', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } }, 1, 0, directives); @@ -520,7 +521,7 @@ describe('lifecycles', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp', ['dir', '']); + ɵɵelement(0, 'comp', ['dir', '']); } }, 1, 0, directives); @@ -535,7 +536,7 @@ describe('lifecycles', () => { /**
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dir', '']); + ɵɵelement(0, 'div', ['dir', '']); } }, 1, 0, directives); @@ -559,27 +560,27 @@ describe('lifecycles', () => { let Comp = createAfterContentInitComp('comp', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δprojection(0); + ɵɵprojectionDef(); + ɵɵprojection(0); } }, 1); let Parent = createAfterContentInitComp('parent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'comp'); - { Δprojection(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'comp'); + { ɵɵprojection(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', Δbind(ctx.val)); + ɵɵelementProperty(0, 'val', ɵɵbind(ctx.val)); } }, 2, 1, [Comp]); let ProjectedComp = createAfterContentInitComp('projected', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δprojection(0); + ɵɵprojectionDef(); + ɵɵprojection(0); } }, 1); @@ -594,7 +595,7 @@ describe('lifecycles', () => { } ngAfterContentChecked() { allEvents.push(`${name}${this.val} check`); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Component, selectors: [[name]], factory: () => new Component(), @@ -611,40 +612,40 @@ describe('lifecycles', () => { ngAfterContentInit() { events.push('init'); } ngAfterContentChecked() { events.push('check'); } - static ngDirectiveDef = ΔdefineDirective( + static ngDirectiveDef = ɵɵdefineDirective( {type: Directive, selectors: [['', 'dir', '']], factory: () => new Directive()}); } function ForLoopWithChildrenTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'parent'); - { Δtext(1, 'content'); } - ΔelementEnd(); - Δcontainer(2); - ΔelementStart(3, 'parent'); - { Δtext(4, 'content'); } - ΔelementEnd(); + ɵɵelementStart(0, 'parent'); + { ɵɵtext(1, 'content'); } + ɵɵelementEnd(); + ɵɵcontainer(2); + ɵɵelementStart(3, 'parent'); + { ɵɵtext(4, 'content'); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', 1); - Δselect(3); - ΔelementProperty(3, 'val', 4); - ΔcontainerRefreshStart(2); + ɵɵelementProperty(0, 'val', 1); + ɵɵselect(3); + ɵɵelementProperty(3, 'val', 4); + ɵɵcontainerRefreshStart(2); { for (let i = 2; i < 4; i++) { - let rf1 = ΔembeddedViewStart(0, 2, 0); + let rf1 = ɵɵembeddedViewStart(0, 2, 0); if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'parent'); - { Δtext(1, 'content'); } - ΔelementEnd(); + ɵɵelementStart(0, 'parent'); + { ɵɵtext(1, 'content'); } + ɵɵelementEnd(); } if (rf1 & RenderFlags.Update) { - ΔelementProperty(0, 'val', i); + ɵɵelementProperty(0, 'val', i); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } @@ -654,9 +655,9 @@ describe('lifecycles', () => { /** content */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'comp'); - { Δtext(1, 'content'); } - ΔelementEnd(); + ɵɵelementStart(0, 'comp'); + { ɵɵtext(1, 'content'); } + ɵɵelementEnd(); } }, 2, 0, directives); @@ -684,22 +685,22 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (!ctx.skip) { - let rf1 = ΔembeddedViewStart(0, 2, 0); + let rf1 = ɵɵembeddedViewStart(0, 2, 0); if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'comp'); - { Δtext(1, 'content'); } - ΔelementEnd(); + ɵɵelementStart(0, 'comp'); + { ɵɵtext(1, 'content'); } + ɵɵelementEnd(); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1, 0, directives); @@ -723,9 +724,9 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'parent'); - { Δtext(1, 'content'); } - ΔelementEnd(); + ɵɵelementStart(0, 'parent'); + { ɵɵtext(1, 'content'); } + ɵɵelementEnd(); } }, 2, 0, directives); @@ -742,17 +743,17 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'parent'); - { Δtext(1, 'content'); } - ΔelementEnd(); - ΔelementStart(2, 'parent'); - { Δtext(3, 'content'); } - ΔelementEnd(); + ɵɵelementStart(0, 'parent'); + { ɵɵtext(1, 'content'); } + ɵɵelementEnd(); + ɵɵelementStart(2, 'parent'); + { ɵɵtext(3, 'content'); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', 1); - Δselect(2); - ΔelementProperty(2, 'val', 2); + ɵɵelementProperty(0, 'val', 1); + ɵɵselect(2); + ɵɵelementProperty(2, 'val', 2); } }, 4, 0, directives); @@ -773,13 +774,13 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'parent'); + ɵɵelementStart(0, 'parent'); { - ΔelementStart(1, 'projected'); - { Δtext(2, 'content'); } - ΔelementEnd(); + ɵɵelementStart(1, 'projected'); + { ɵɵtext(2, 'content'); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 3, 0, directives); @@ -803,29 +804,29 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'parent'); + ɵɵelementStart(0, 'parent'); { - ΔelementStart(1, 'projected'); - { Δtext(2, 'content'); } - ΔelementEnd(); + ɵɵelementStart(1, 'projected'); + { ɵɵtext(2, 'content'); } + ɵɵelementEnd(); } - ΔelementEnd(); - ΔelementStart(3, 'parent'); + ɵɵelementEnd(); + ɵɵelementStart(3, 'parent'); { - ΔelementStart(4, 'projected'); - { Δtext(5, 'content'); } - ΔelementEnd(); + ɵɵelementStart(4, 'projected'); + { ɵɵtext(5, 'content'); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', 1); - Δselect(1); - ΔelementProperty(1, 'val', 1); - Δselect(3); - ΔelementProperty(3, 'val', 2); - Δselect(4); - ΔelementProperty(4, 'val', 2); + ɵɵelementProperty(0, 'val', 1); + ɵɵselect(1); + ɵɵelementProperty(1, 'val', 1); + ɵɵselect(3); + ɵɵelementProperty(3, 'val', 2); + ɵɵselect(4); + ɵɵelementProperty(4, 'val', 2); } }, 6, 0, directives); @@ -843,34 +844,34 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'comp'); - { Δtext(1, 'content'); } - ΔelementEnd(); - Δcontainer(2); - ΔelementStart(3, 'comp'); - { Δtext(4, 'content'); } - ΔelementEnd(); + ɵɵelementStart(0, 'comp'); + { ɵɵtext(1, 'content'); } + ɵɵelementEnd(); + ɵɵcontainer(2); + ɵɵelementStart(3, 'comp'); + { ɵɵtext(4, 'content'); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', 1); - Δselect(3); - ΔelementProperty(3, 'val', 4); - ΔcontainerRefreshStart(2); + ɵɵelementProperty(0, 'val', 1); + ɵɵselect(3); + ɵɵelementProperty(3, 'val', 4); + ɵɵcontainerRefreshStart(2); { for (let i = 2; i < 4; i++) { - let rf1 = ΔembeddedViewStart(0, 2, 0); + let rf1 = ɵɵembeddedViewStart(0, 2, 0); if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'comp'); - { Δtext(1, 'content'); } - ΔelementEnd(); + ɵɵelementStart(0, 'comp'); + { ɵɵtext(1, 'content'); } + ɵɵelementEnd(); } if (rf1 & RenderFlags.Update) { - ΔelementProperty(0, 'val', i); + ɵɵelementProperty(0, 'val', i); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 5, 0, directives); @@ -898,9 +899,9 @@ describe('lifecycles', () => { /** content */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'comp'); - { Δtext(1, 'content'); } - ΔelementEnd(); + ɵɵelementStart(0, 'comp'); + { ɵɵtext(1, 'content'); } + ɵɵelementEnd(); } }, 2, 0, directives); @@ -927,7 +928,7 @@ describe('lifecycles', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp', ['dir', '']); + ɵɵelement(0, 'comp', ['dir', '']); } }, 1, 0, directives); @@ -939,7 +940,7 @@ describe('lifecycles', () => { /**
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dir', '']); + ɵɵelement(0, 'div', ['dir', '']); } }, 1, 0, directives); @@ -960,17 +961,17 @@ describe('lifecycles', () => { let Comp = createAfterViewInitComponent('comp', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'div'); - { Δprojection(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'div'); + { ɵɵprojection(1); } + ɵɵelementEnd(); } }, 2); let Parent = createAfterViewInitComponent('parent', getParentTemplate('comp'), 1, 1, [Comp]); let ProjectedComp = createAfterViewInitComponent('projected', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δtext(0, 'content'); + ɵɵtext(0, 'content'); } }, 1); @@ -986,7 +987,7 @@ describe('lifecycles', () => { } ngAfterViewChecked() { allEvents.push(`${name}${this.val} check`); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Component, selectors: [[name]], consts: consts, @@ -1003,7 +1004,7 @@ describe('lifecycles', () => { ngAfterViewInit() { events.push('init'); } ngAfterViewChecked() { events.push('check'); } - static ngDirectiveDef = ΔdefineDirective( + static ngDirectiveDef = ɵɵdefineDirective( {type: Directive, selectors: [['', 'dir', '']], factory: () => new Directive()}); } @@ -1013,7 +1014,7 @@ describe('lifecycles', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } }, 1, 0, defs); @@ -1041,20 +1042,20 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (!ctx.skip) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1, 0, defs); @@ -1079,7 +1080,7 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'parent'); + ɵɵelement(0, 'parent'); } }, 1, 0, defs); @@ -1096,13 +1097,13 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'parent'); - Δelement(1, 'parent'); + ɵɵelement(0, 'parent'); + ɵɵelement(1, 'parent'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', 1); - Δselect(1); - ΔelementProperty(1, 'val', 2); + ɵɵelementProperty(0, 'val', 1); + ɵɵselect(1); + ɵɵelementProperty(1, 'val', 2); } }, 2, 0, defs); @@ -1119,9 +1120,9 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'comp'); - { Δelement(1, 'projected'); } - ΔelementEnd(); + ɵɵelementStart(0, 'comp'); + { ɵɵelement(1, 'projected'); } + ɵɵelementEnd(); } }, 2, 0, defs); @@ -1140,21 +1141,21 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'comp'); - { Δelement(1, 'projected'); } - ΔelementEnd(); - ΔelementStart(2, 'comp'); - { Δelement(3, 'projected'); } - ΔelementEnd(); + ɵɵelementStart(0, 'comp'); + { ɵɵelement(1, 'projected'); } + ɵɵelementEnd(); + ɵɵelementStart(2, 'comp'); + { ɵɵelement(3, 'projected'); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', 1); - Δselect(1); - ΔelementProperty(1, 'val', 1); - Δselect(2); - ΔelementProperty(2, 'val', 2); - Δselect(3); - ΔelementProperty(3, 'val', 2); + ɵɵelementProperty(0, 'val', 1); + ɵɵselect(1); + ɵɵelementProperty(1, 'val', 1); + ɵɵselect(2); + ɵɵelementProperty(2, 'val', 2); + ɵɵselect(3); + ɵɵelementProperty(3, 'val', 2); } }, 4, 0, defs); @@ -1170,14 +1171,14 @@ describe('lifecycles', () => { */ const ParentComp = createAfterViewInitComponent('parent', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'comp'); - { Δelement(1, 'projected'); } - ΔelementEnd(); + ɵɵelementStart(0, 'comp'); + { ɵɵelement(1, 'projected'); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', Δbind(ctx.val)); - Δselect(1); - ΔelementProperty(1, 'val', Δbind(ctx.val)); + ɵɵelementProperty(0, 'val', ɵɵbind(ctx.val)); + ɵɵselect(1); + ɵɵelementProperty(1, 'val', ɵɵbind(ctx.val)); } }, 2, 2, [Comp, ProjectedComp]); @@ -1187,13 +1188,13 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'parent'); - Δelement(1, 'parent'); + ɵɵelement(0, 'parent'); + ɵɵelement(1, 'parent'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', 1); - Δselect(1); - ΔelementProperty(1, 'val', 2); + ɵɵelementProperty(0, 'val', 1); + ɵɵselect(1); + ɵɵelementProperty(1, 'val', 2); } }, 2, 0, [ParentComp]); @@ -1211,28 +1212,28 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); - Δcontainer(1); - Δelement(2, 'comp'); + ɵɵelement(0, 'comp'); + ɵɵcontainer(1); + ɵɵelement(2, 'comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', 1); - Δselect(2); - ΔelementProperty(2, 'val', 4); - ΔcontainerRefreshStart(1); + ɵɵelementProperty(0, 'val', 1); + ɵɵselect(2); + ɵɵelementProperty(2, 'val', 4); + ɵɵcontainerRefreshStart(1); { for (let i = 2; i < 4; i++) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } if (rf1 & RenderFlags.Update) { - ΔelementProperty(0, 'val', i); + ɵɵelementProperty(0, 'val', i); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 3, 0, defs); @@ -1251,28 +1252,28 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'parent'); - Δcontainer(1); - Δelement(2, 'parent'); + ɵɵelement(0, 'parent'); + ɵɵcontainer(1); + ɵɵelement(2, 'parent'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', 1); - Δselect(2); - ΔelementProperty(2, 'val', 4); - ΔcontainerRefreshStart(1); + ɵɵelementProperty(0, 'val', 1); + ɵɵselect(2); + ɵɵelementProperty(2, 'val', 4); + ɵɵcontainerRefreshStart(1); { for (let i = 2; i < 4; i++) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - Δelement(0, 'parent'); + ɵɵelement(0, 'parent'); } if (rf1 & RenderFlags.Update) { - ΔelementProperty(0, 'val', i); + ɵɵelementProperty(0, 'val', i); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 3, 0, defs); @@ -1288,7 +1289,7 @@ describe('lifecycles', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } }, 1, 0, defs); @@ -1312,10 +1313,10 @@ describe('lifecycles', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', Δbind(ctx.myVal)); + ɵɵelementProperty(0, 'val', ɵɵbind(ctx.myVal)); } }, 1, 1, defs); @@ -1337,28 +1338,28 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'parent'); - Δcontainer(1); - Δelement(2, 'parent'); + ɵɵelement(0, 'parent'); + ɵɵcontainer(1); + ɵɵelement(2, 'parent'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', 1); - Δselect(2); - ΔelementProperty(2, 'val', 4); - ΔcontainerRefreshStart(1); + ɵɵelementProperty(0, 'val', 1); + ɵɵselect(2); + ɵɵelementProperty(2, 'val', 4); + ɵɵcontainerRefreshStart(1); { for (let i = 2; i < 4; i++) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - Δelement(0, 'parent'); + ɵɵelement(0, 'parent'); } if (rf1 & RenderFlags.Update) { - ΔelementProperty(0, 'val', i); + ɵɵelementProperty(0, 'val', i); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 3, 0, defs); @@ -1378,7 +1379,7 @@ describe('lifecycles', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp', ['dir', '']); + ɵɵelement(0, 'comp', ['dir', '']); } }, 1, 0, defs); @@ -1390,7 +1391,7 @@ describe('lifecycles', () => { /**
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dir', '']); + ɵɵelement(0, 'div', ['dir', '']); } }, 1, 0, defs); @@ -1407,8 +1408,8 @@ describe('lifecycles', () => { let Comp = createOnDestroyComponent('comp', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δprojection(0); + ɵɵprojectionDef(); + ɵɵprojection(0); } }, 1); let Parent = createOnDestroyComponent('parent', getParentTemplate('comp'), 1, 1, [Comp]); @@ -1420,7 +1421,7 @@ describe('lifecycles', () => { val: string = ''; ngOnDestroy() { events.push(`${name}${this.val}`); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Component, selectors: [[name]], factory: () => new Component(), @@ -1435,7 +1436,7 @@ describe('lifecycles', () => { let Grandparent = createOnDestroyComponent('grandparent', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'parent'); + ɵɵelement(0, 'parent'); } }, 1, 0, [Parent]); @@ -1444,7 +1445,7 @@ describe('lifecycles', () => { class Directive { ngOnDestroy() { events.push('dir'); } - static ngDirectiveDef = ΔdefineDirective( + static ngDirectiveDef = ɵɵdefineDirective( {type: Directive, selectors: [['', 'dir', '']], factory: () => new Directive()}); } @@ -1459,20 +1460,20 @@ describe('lifecycles', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (!ctx.skip) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1, 0, defs); @@ -1492,26 +1493,26 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (!ctx.skip) { - let rf1 = ΔembeddedViewStart(0, 2, 2); + let rf1 = ɵɵembeddedViewStart(0, 2, 2); if (rf1 & RenderFlags.Create) { - Δelement(0, 'comp'); - Δelement(1, 'comp'); + ɵɵelement(0, 'comp'); + ɵɵelement(1, 'comp'); } if (rf1 & RenderFlags.Update) { - ΔelementProperty(0, 'val', Δbind('1')); - Δselect(1); - ΔelementProperty(1, 'val', Δbind('2')); + ɵɵelementProperty(0, 'val', ɵɵbind('1')); + ɵɵselect(1); + ɵɵelementProperty(1, 'val', ɵɵbind('2')); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1, 0, defs); @@ -1533,20 +1534,20 @@ describe('lifecycles', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (!ctx.skip) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - Δelement(0, 'parent'); + ɵɵelement(0, 'parent'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1, 0, defs); @@ -1568,20 +1569,20 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (!ctx.skip) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - Δelement(0, 'grandparent'); + ɵɵelement(0, 'grandparent'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1, 0, defs); @@ -1605,34 +1606,34 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (!ctx.skip) { - let rf1 = ΔembeddedViewStart(0, 4, 0); + let rf1 = ɵɵembeddedViewStart(0, 4, 0); if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'comp'); - { Δelement(1, 'projected'); } - ΔelementEnd(); - ΔelementStart(2, 'comp'); - { Δelement(3, 'projected'); } - ΔelementEnd(); + ɵɵelementStart(0, 'comp'); + { ɵɵelement(1, 'projected'); } + ɵɵelementEnd(); + ɵɵelementStart(2, 'comp'); + { ɵɵelement(3, 'projected'); } + ɵɵelementEnd(); } if (rf1 & RenderFlags.Update) { - ΔelementProperty(0, 'val', 1); - Δselect(1); - ΔelementProperty(1, 'val', 1); - Δselect(2); - ΔelementProperty(2, 'val', 2); - Δselect(3); - ΔelementProperty(3, 'val', 2); + ɵɵelementProperty(0, 'val', 1); + ɵɵselect(1); + ɵɵelementProperty(1, 'val', 1); + ɵɵselect(2); + ɵɵelementProperty(2, 'val', 2); + ɵɵselect(3); + ɵɵelementProperty(3, 'val', 2); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1, 0, defs); @@ -1657,41 +1658,41 @@ describe('lifecycles', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.condition) { - let rf1 = ΔembeddedViewStart(0, 3, 2); + let rf1 = ɵɵembeddedViewStart(0, 3, 2); if (rf1 & RenderFlags.Create) { - Δelement(0, 'comp'); - Δcontainer(1); - Δelement(2, 'comp'); + ɵɵelement(0, 'comp'); + ɵɵcontainer(1); + ɵɵelement(2, 'comp'); } if (rf1 & RenderFlags.Update) { - ΔelementProperty(0, 'val', Δbind('1')); - Δselect(2); - ΔelementProperty(2, 'val', Δbind('3')); - ΔcontainerRefreshStart(1); + ɵɵelementProperty(0, 'val', ɵɵbind('1')); + ɵɵselect(2); + ɵɵelementProperty(2, 'val', ɵɵbind('3')); + ɵɵcontainerRefreshStart(1); { if (ctx.condition2) { - let rf2 = ΔembeddedViewStart(0, 1, 1); + let rf2 = ɵɵembeddedViewStart(0, 1, 1); if (rf2 & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } if (rf2 & RenderFlags.Update) { - ΔelementProperty(0, 'val', Δbind('2')); + ɵɵelementProperty(0, 'val', ɵɵbind('2')); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1, 0, defs); @@ -1751,41 +1752,41 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.condition) { - let rf1 = ΔembeddedViewStart(0, 3, 2); + let rf1 = ɵɵembeddedViewStart(0, 3, 2); if (rf1 & RenderFlags.Create) { - Δelement(0, 'comp'); - Δcontainer(1); - Δelement(2, 'comp'); + ɵɵelement(0, 'comp'); + ɵɵcontainer(1); + ɵɵelement(2, 'comp'); } if (rf1 & RenderFlags.Update) { - ΔelementProperty(0, 'val', Δbind('1')); - Δselect(2); - ΔelementProperty(2, 'val', Δbind('5')); - ΔcontainerRefreshStart(1); + ɵɵelementProperty(0, 'val', ɵɵbind('1')); + ɵɵselect(2); + ɵɵelementProperty(2, 'val', ɵɵbind('5')); + ɵɵcontainerRefreshStart(1); { for (let j = 2; j < ctx.len; j++) { - let rf2 = ΔembeddedViewStart(0, 1, 1); + let rf2 = ɵɵembeddedViewStart(0, 1, 1); if (rf2 & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } if (rf2 & RenderFlags.Update) { - ΔelementProperty(0, 'val', Δbind(j)); + ɵɵelementProperty(0, 'val', ɵɵbind(j)); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1, 0, defs); @@ -1842,32 +1843,32 @@ describe('lifecycles', () => { */ function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.condition) { - let rf1 = ΔembeddedViewStart(0, 5, 0); + let rf1 = ɵɵembeddedViewStart(0, 5, 0); if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'button'); + ɵɵelementStart(0, 'button'); { - Δlistener('click', ctx.onClick.bind(ctx)); - Δtext(1, 'Click me'); + ɵɵlistener('click', ctx.onClick.bind(ctx)); + ɵɵtext(1, 'Click me'); } - ΔelementEnd(); - Δelement(2, 'comp'); - ΔelementStart(3, 'button'); + ɵɵelementEnd(); + ɵɵelement(2, 'comp'); + ɵɵelementStart(3, 'button'); { - Δlistener('click', ctx.onClick.bind(ctx)); - Δtext(4, 'Click me'); + ɵɵlistener('click', ctx.onClick.bind(ctx)); + ɵɵtext(4, 'Click me'); } - ΔelementEnd(); + ɵɵelementEnd(); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } @@ -1902,20 +1903,20 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.condition) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - Δelement(0, 'comp', ['dir', '']); + ɵɵelement(0, 'comp', ['dir', '']); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1, 0, defs); @@ -1938,20 +1939,20 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.condition) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - Δelement(0, 'div', ['dir', '']); + ɵɵelement(0, 'div', ['dir', '']); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1, 0, defs); @@ -1979,10 +1980,10 @@ describe('lifecycles', () => { */ const Comp = createOnChangesComponent('comp', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'div'); - { Δprojection(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'div'); + { ɵɵprojection(1); } + ɵɵelementEnd(); } }, 2); @@ -1991,17 +1992,17 @@ describe('lifecycles', () => { */ const Parent = createOnChangesComponent('parent', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val1', Δbind(ctx.a)); - ΔelementProperty(0, 'publicVal2', Δbind(ctx.b)); + ɵɵelementProperty(0, 'val1', ɵɵbind(ctx.a)); + ɵɵelementProperty(0, 'publicVal2', ɵɵbind(ctx.b)); } }, 1, 2, [Comp]); const ProjectedComp = createOnChangesComponent('projected', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δtext(0, 'content'); + ɵɵtext(0, 'content'); } }, 1); @@ -2026,7 +2027,7 @@ describe('lifecycles', () => { events.push({type: 'onChanges', name: 'comp - ' + name, changes}); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Component, selectors: [[name]], factory: () => new Component(), @@ -2034,7 +2035,7 @@ describe('lifecycles', () => { vars: vars, inputs: {a: 'val1', b: ['publicVal2', 'val2']}, template, directives: directives, - features: [ΔNgOnChangesFeature()], + features: [ɵɵNgOnChangesFeature()], }); }; } @@ -2048,12 +2049,12 @@ describe('lifecycles', () => { events.push({type: 'onChanges', name: 'dir - dir', changes}); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Directive, selectors: [['', 'dir', '']], factory: () => new Directive(), inputs: {a: 'val1', b: ['publicVal2', 'val2']}, - features: [ΔNgOnChangesFeature()], + features: [ɵɵNgOnChangesFeature()], }); } @@ -2063,11 +2064,11 @@ describe('lifecycles', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val1', Δbind(ctx.val1)); - ΔelementProperty(0, 'publicVal2', Δbind(ctx.val2)); + ɵɵelementProperty(0, 'val1', ɵɵbind(ctx.val1)); + ɵɵelementProperty(0, 'publicVal2', ɵɵbind(ctx.val2)); } }, 1, 2, defs); @@ -2109,11 +2110,11 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'parent'); + ɵɵelement(0, 'parent'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val1', Δbind(ctx.val1)); - ΔelementProperty(0, 'publicVal2', Δbind(ctx.val2)); + ɵɵelementProperty(0, 'val1', ɵɵbind(ctx.val1)); + ɵɵelementProperty(0, 'publicVal2', ɵɵbind(ctx.val2)); } }, 1, 2, defs); @@ -2153,15 +2154,15 @@ describe('lifecycles', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'parent'); - Δelement(1, 'parent'); + ɵɵelement(0, 'parent'); + ɵɵelement(1, 'parent'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val1', Δbind(1)); - ΔelementProperty(0, 'publicVal2', Δbind(1)); - Δselect(1); - ΔelementProperty(1, 'val1', Δbind(2)); - ΔelementProperty(1, 'publicVal2', Δbind(2)); + ɵɵelementProperty(0, 'val1', ɵɵbind(1)); + ɵɵelementProperty(0, 'publicVal2', ɵɵbind(1)); + ɵɵselect(1); + ɵɵelementProperty(1, 'val1', ɵɵbind(2)); + ɵɵelementProperty(1, 'publicVal2', ɵɵbind(2)); } }, 2, 4, defs); @@ -2212,24 +2213,24 @@ describe('lifecycles', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.condition) { - let rf1 = ΔembeddedViewStart(0, 1, 2); + let rf1 = ɵɵembeddedViewStart(0, 1, 2); if (rf1 & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } if (rf1 & RenderFlags.Update) { - ΔelementProperty(0, 'val1', Δbind(1)); - ΔelementProperty(0, 'publicVal2', Δbind(1)); + ɵɵelementProperty(0, 'val1', ɵɵbind(1)); + ɵɵelementProperty(0, 'publicVal2', ɵɵbind(1)); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1, 0, defs); @@ -2290,16 +2291,16 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'comp'); - { ΔelementStart(1, 'projected'); } - ΔelementEnd(); + ɵɵelementStart(0, 'comp'); + { ɵɵelementStart(1, 'projected'); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val1', Δbind(1)); - ΔelementProperty(0, 'publicVal2', Δbind(1)); - Δselect(1); - ΔelementProperty(1, 'val1', Δbind(2)); - ΔelementProperty(1, 'publicVal2', Δbind(2)); + ɵɵelementProperty(0, 'val1', ɵɵbind(1)); + ɵɵelementProperty(0, 'publicVal2', ɵɵbind(1)); + ɵɵselect(1); + ɵɵelementProperty(1, 'val1', ɵɵbind(2)); + ɵɵelementProperty(1, 'publicVal2', ɵɵbind(2)); } }, 2, 4, defs); @@ -2335,25 +2336,25 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'comp'); - { ΔelementStart(1, 'projected'); } - ΔelementEnd(); - ΔelementStart(2, 'comp'); - { ΔelementStart(3, 'projected'); } - ΔelementEnd(); + ɵɵelementStart(0, 'comp'); + { ɵɵelementStart(1, 'projected'); } + ɵɵelementEnd(); + ɵɵelementStart(2, 'comp'); + { ɵɵelementStart(3, 'projected'); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val1', Δbind(1)); - ΔelementProperty(0, 'publicVal2', Δbind(1)); - Δselect(1); - ΔelementProperty(1, 'val1', Δbind(2)); - ΔelementProperty(1, 'publicVal2', Δbind(2)); - Δselect(2); - ΔelementProperty(2, 'val1', Δbind(3)); - ΔelementProperty(2, 'publicVal2', Δbind(3)); - Δselect(3); - ΔelementProperty(3, 'val1', Δbind(4)); - ΔelementProperty(3, 'publicVal2', Δbind(4)); + ɵɵelementProperty(0, 'val1', ɵɵbind(1)); + ɵɵelementProperty(0, 'publicVal2', ɵɵbind(1)); + ɵɵselect(1); + ɵɵelementProperty(1, 'val1', ɵɵbind(2)); + ɵɵelementProperty(1, 'publicVal2', ɵɵbind(2)); + ɵɵselect(2); + ɵɵelementProperty(2, 'val1', ɵɵbind(3)); + ɵɵelementProperty(2, 'publicVal2', ɵɵbind(3)); + ɵɵselect(3); + ɵɵelementProperty(3, 'val1', ɵɵbind(4)); + ɵɵelementProperty(3, 'publicVal2', ɵɵbind(4)); } }, 4, 8, defs); @@ -2400,11 +2401,11 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp', ['dir', '']); + ɵɵelement(0, 'comp', ['dir', '']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val1', Δbind(1)); - ΔelementProperty(0, 'publicVal2', Δbind(1)); + ɵɵelementProperty(0, 'val1', ɵɵbind(1)); + ɵɵelementProperty(0, 'publicVal2', ɵɵbind(1)); } }, 1, 2, defs); @@ -2441,11 +2442,11 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['dir', '']); + ɵɵelement(0, 'div', ['dir', '']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val1', Δbind(1)); - ΔelementProperty(0, 'publicVal2', Δbind(1)); + ɵɵelementProperty(0, 'val1', ɵɵbind(1)); + ɵɵelementProperty(0, 'publicVal2', ɵɵbind(1)); } }, 1, 2, defs); @@ -2475,31 +2476,31 @@ describe('lifecycles', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); - Δcontainer(1); - Δelement(2, 'comp'); + ɵɵelement(0, 'comp'); + ɵɵcontainer(1); + ɵɵelement(2, 'comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val1', Δbind(1)); - ΔelementProperty(0, 'publicVal2', Δbind(1)); - Δselect(2); - ΔelementProperty(2, 'val1', Δbind(5)); - ΔelementProperty(2, 'publicVal2', Δbind(5)); - ΔcontainerRefreshStart(1); + ɵɵelementProperty(0, 'val1', ɵɵbind(1)); + ɵɵelementProperty(0, 'publicVal2', ɵɵbind(1)); + ɵɵselect(2); + ɵɵelementProperty(2, 'val1', ɵɵbind(5)); + ɵɵelementProperty(2, 'publicVal2', ɵɵbind(5)); + ɵɵcontainerRefreshStart(1); { for (let j = 2; j < 5; j++) { - let rf1 = ΔembeddedViewStart(0, 1, 2); + let rf1 = ɵɵembeddedViewStart(0, 1, 2); if (rf1 & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } if (rf1 & RenderFlags.Update) { - ΔelementProperty(0, 'val1', Δbind(j)); - ΔelementProperty(0, 'publicVal2', Δbind(j)); + ɵɵelementProperty(0, 'val1', ɵɵbind(j)); + ɵɵelementProperty(0, 'publicVal2', ɵɵbind(j)); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 3, 4, defs); @@ -2562,31 +2563,31 @@ describe('lifecycles', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'parent'); - Δcontainer(1); - Δelement(2, 'parent'); + ɵɵelement(0, 'parent'); + ɵɵcontainer(1); + ɵɵelement(2, 'parent'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val1', Δbind(1)); - ΔelementProperty(0, 'publicVal2', Δbind(1)); - Δselect(2); - ΔelementProperty(2, 'val1', Δbind(5)); - ΔelementProperty(2, 'publicVal2', Δbind(5)); - ΔcontainerRefreshStart(1); + ɵɵelementProperty(0, 'val1', ɵɵbind(1)); + ɵɵelementProperty(0, 'publicVal2', ɵɵbind(1)); + ɵɵselect(2); + ɵɵelementProperty(2, 'val1', ɵɵbind(5)); + ɵɵelementProperty(2, 'publicVal2', ɵɵbind(5)); + ɵɵcontainerRefreshStart(1); { for (let j = 2; j < 5; j++) { - let rf1 = ΔembeddedViewStart(0, 1, 2); + let rf1 = ɵɵembeddedViewStart(0, 1, 2); if (rf1 & RenderFlags.Create) { - Δelement(0, 'parent'); + ɵɵelement(0, 'parent'); } if (rf1 & RenderFlags.Update) { - ΔelementProperty(0, 'val1', Δbind(j)); - ΔelementProperty(0, 'publicVal2', Δbind(j)); + ɵɵelementProperty(0, 'val1', ɵɵbind(j)); + ɵɵelementProperty(0, 'publicVal2', ɵɵbind(j)); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 3, 4, defs); @@ -2686,7 +2687,7 @@ describe('lifecycles', () => { ngOnChanges(changes: SimpleChanges) { events.push(changes); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComp, factory: () => { // Capture the instance so we can test setting the property directly @@ -2695,10 +2696,10 @@ describe('lifecycles', () => { }, template: (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div'); + ɵɵelement(0, 'div'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'id', Δbind(ctx.a)); + ɵɵelementProperty(0, 'id', ɵɵbind(ctx.a)); } }, selectors: [['my-comp']], @@ -2716,10 +2717,10 @@ describe('lifecycles', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'my-comp'); + ɵɵelement(0, 'my-comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'value', Δbind(1)); + ɵɵelementProperty(0, 'value', ɵɵbind(1)); } }, 1, 1, [MyComp]); @@ -2757,7 +2758,7 @@ describe('lifecycles', () => { ngAfterViewInit() { events.push(`viewInit ${name}${this.val}`); } ngAfterViewChecked() { events.push(`viewCheck ${name}${this.val}`); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Component, selectors: [[name]], factory: () => new Component(), @@ -2765,7 +2766,7 @@ describe('lifecycles', () => { vars: vars, inputs: {val: 'val'}, template, directives: directives, - features: [ΔNgOnChangesFeature()], + features: [ɵɵNgOnChangesFeature()], }); }; } @@ -2779,8 +2780,8 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); - Δelement(1, 'comp'); + ɵɵelement(0, 'comp'); + ɵɵelement(1, 'comp'); } // This template function is a little weird in that the `elementProperty` calls // below are directly setting values `1` and `2`, where normally there would be @@ -2788,9 +2789,9 @@ describe('lifecycles', () => { // This means when `fixture.update()` is called below, ngOnChanges should fire, // even though the *value* itself never changed. if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', 1); - Δselect(1); - ΔelementProperty(1, 'val', 2); + ɵɵelementProperty(0, 'val', 1); + ɵɵselect(1); + ɵɵelementProperty(1, 'val', 2); } }, 2, 0, [Comp]); @@ -2815,10 +2816,10 @@ describe('lifecycles', () => { /** */ const Parent = createAllHooksComponent('parent', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', Δbind(ctx.val)); + ɵɵelementProperty(0, 'val', ɵɵbind(ctx.val)); } }, 1, 1, [Comp]); @@ -2828,13 +2829,13 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'parent'); - Δelement(1, 'parent'); + ɵɵelement(0, 'parent'); + ɵɵelement(1, 'parent'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', 1); - Δselect(1); - ΔelementProperty(1, 'val', 2); + ɵɵelementProperty(0, 'val', 1); + ɵɵselect(1); + ɵɵelementProperty(1, 'val', 2); } }, 2, 0, [Parent]); @@ -2872,13 +2873,13 @@ describe('lifecycles', () => { /** */ const Parent = createAllHooksComponent('parent', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δprojection(0); - Δelement(1, 'view'); + ɵɵprojectionDef(); + ɵɵprojection(0); + ɵɵelement(1, 'view'); } if (rf & RenderFlags.Update) { - Δselect(1); - ΔelementProperty(1, 'val', Δbind(ctx.val)); + ɵɵselect(1); + ɵɵelementProperty(1, 'val', ɵɵbind(ctx.val)); } }, 2, 1, [View]); @@ -2892,21 +2893,21 @@ describe('lifecycles', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'parent'); - { Δelement(1, 'content'); } - ΔelementEnd(); - ΔelementStart(2, 'parent'); - { Δelement(3, 'content'); } - ΔelementEnd(); + ɵɵelementStart(0, 'parent'); + { ɵɵelement(1, 'content'); } + ɵɵelementEnd(); + ɵɵelementStart(2, 'parent'); + { ɵɵelement(3, 'content'); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'val', Δbind(1)); - Δselect(1); - ΔelementProperty(1, 'val', Δbind(1)); - Δselect(2); - ΔelementProperty(2, 'val', Δbind(2)); - Δselect(3); - ΔelementProperty(3, 'val', Δbind(2)); + ɵɵelementProperty(0, 'val', ɵɵbind(1)); + ɵɵselect(1); + ɵɵelementProperty(1, 'val', ɵɵbind(1)); + ɵɵselect(2); + ɵɵelementProperty(2, 'val', ɵɵbind(2)); + ɵɵselect(3); + ɵɵelementProperty(3, 'val', ɵɵbind(2)); } }, 4, 4, [Parent, Content]); @@ -2957,7 +2958,7 @@ describe('lifecycles', () => { class OnDestroyDirective implements OnDestroy { ngOnDestroy() { destroyed = true; } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: OnDestroyDirective, selectors: [['', 'onDestroyDirective', '']], factory: () => new OnDestroyDirective() @@ -2967,7 +2968,8 @@ describe('lifecycles', () => { function conditionTpl(rf: RenderFlags, ctx: Cmpt) { if (rf & RenderFlags.Create) { - Δtemplate(0, null, 0, 1, 'ng-template', [AttributeMarker.Bindings, 'onDestroyDirective']); + ɵɵtemplate( + 0, null, 0, 1, 'ng-template', [AttributeMarker.Bindings, 'onDestroyDirective']); } } @@ -2978,16 +2980,16 @@ describe('lifecycles', () => { */ function cmptTpl(rf: RenderFlags, cmpt: Cmpt) { if (rf & RenderFlags.Create) { - Δtemplate(0, conditionTpl, 1, 1, 'ng-template', [AttributeMarker.Bindings, 'ngIf']); + ɵɵtemplate(0, conditionTpl, 1, 1, 'ng-template', [AttributeMarker.Bindings, 'ngIf']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'ngIf', Δbind(cmpt.showing)); + ɵɵelementProperty(0, 'ngIf', ɵɵbind(cmpt.showing)); } } class Cmpt { showing = true; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Cmpt, factory: () => new Cmpt(), selectors: [['cmpt']], diff --git a/packages/core/test/render3/listeners_spec.ts b/packages/core/test/render3/listeners_spec.ts index b37695351e..546c1155e3 100644 --- a/packages/core/test/render3/listeners_spec.ts +++ b/packages/core/test/render3/listeners_spec.ts @@ -8,11 +8,11 @@ import {dispatchEvent} from '@angular/platform-browser/testing/src/browser_util'; -import {markDirty, Δbind, ΔdefineComponent, ΔdefineDirective, Δreference, ΔresolveBody, ΔresolveDocument, ΔtextBinding} from '../../src/render3/index'; -import {Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, Δelement, ΔelementEnd, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, ΔgetCurrentView, Δlistener, Δtext} from '../../src/render3/instructions/all'; +import {markDirty, ɵɵbind, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵreference, ɵɵresolveBody, ɵɵresolveDocument, ɵɵtextBinding} from '../../src/render3/index'; +import {ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵelement, ɵɵelementEnd, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵgetCurrentView, ɵɵlistener, ɵɵtext} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; import {GlobalTargetResolver} from '../../src/render3/interfaces/renderer'; -import {ΔrestoreView} from '../../src/render3/state'; +import {ɵɵrestoreView} from '../../src/render3/state'; import {getRendererFactory2} from './imported_renderer2'; import {ComponentFixture, TemplateFixture, containerEl, createComponent, getDirectiveOnNode, renderToHtml, requestAnimationFrame} from './render_util'; @@ -28,7 +28,7 @@ describe('event listeners', () => { onClick() { this.counter++; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComp, selectors: [['comp']], consts: 2, @@ -36,12 +36,12 @@ describe('event listeners', () => { /** */ template: function CompTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'button'); + ɵɵelementStart(0, 'button'); { - Δlistener('click', function() { return ctx.onClick(); }); - Δtext(1, 'Click me'); + ɵɵlistener('click', function() { return ctx.onClick(); }); + ɵɵtext(1, 'Click me'); } - ΔelementEnd(); + ɵɵelementEnd(); } }, factory: () => { @@ -59,14 +59,14 @@ describe('event listeners', () => { /* @HostListener('body:click') */ onBodyClick() { events.push('component - body:click'); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyCompWithGlobalListeners, selectors: [['comp']], consts: 1, vars: 0, template: function CompTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtext(0, 'Some text'); + ɵɵtext(0, 'Some text'); } }, factory: () => { @@ -77,12 +77,12 @@ describe('event listeners', () => { hostBindings: function HostListenerDir_HostBindings( rf: RenderFlags, ctx: any, elIndex: number) { if (rf & RenderFlags.Create) { - Δlistener('custom', function() { + ɵɵlistener('custom', function() { return ctx.onDocumentCustomEvent(); - }, false, ΔresolveDocument as GlobalTargetResolver); - Δlistener('click', function() { + }, false, ɵɵresolveDocument as GlobalTargetResolver); + ɵɵlistener('click', function() { return ctx.onBodyClick(); - }, false, ΔresolveBody as GlobalTargetResolver); + }, false, ɵɵresolveBody as GlobalTargetResolver); } } }); @@ -95,19 +95,19 @@ describe('event listeners', () => { /* @HostListener('body:click') */ onBodyClick() { events.push('directive - body:click'); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: GlobalHostListenerDir, selectors: [['', 'hostListenerDir', '']], factory: function HostListenerDir_Factory() { return new GlobalHostListenerDir(); }, hostBindings: function HostListenerDir_HostBindings( rf: RenderFlags, ctx: any, elIndex: number) { if (rf & RenderFlags.Create) { - Δlistener('custom', function() { + ɵɵlistener('custom', function() { return ctx.onDocumentCustomEvent(); - }, false, ΔresolveDocument as GlobalTargetResolver); - Δlistener('click', function() { + }, false, ɵɵresolveDocument as GlobalTargetResolver); + ɵɵlistener('click', function() { return ctx.onBodyClick(); - }, false, ΔresolveBody as GlobalTargetResolver); + }, false, ɵɵresolveBody as GlobalTargetResolver); } } }); @@ -129,7 +129,7 @@ describe('event listeners', () => { return this.handlerReturnValue; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: PreventDefaultComp, selectors: [['prevent-default-comp']], factory: () => new PreventDefaultComp(), @@ -138,12 +138,12 @@ describe('event listeners', () => { /** */ template: (rf: RenderFlags, ctx: PreventDefaultComp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'button'); + ɵɵelementStart(0, 'button'); { - Δlistener('click', function($event: any) { return ctx.onClick($event); }); - Δtext(1, 'Click'); + ɵɵlistener('click', function($event: any) { return ctx.onClick($event); }); + ɵɵtext(1, 'Click'); } - ΔelementEnd(); + ɵɵelementEnd(); } } }); @@ -205,15 +205,15 @@ describe('event listeners', () => { /** */ function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'button'); + ɵɵelementStart(0, 'button'); { - Δlistener('click', function() { + ɵɵlistener('click', function() { ctx.onClick(); return ctx.onClick2(); }); - Δtext(1, 'Click me'); + ɵɵtext(1, 'Click me'); } - ΔelementEnd(); + ɵɵelementEnd(); } } @@ -240,12 +240,12 @@ describe('event listeners', () => { /** */ function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'button'); + ɵɵelementStart(0, 'button'); { - Δlistener('click', function() { return ctx.showing = !ctx.showing; }); - Δtext(1, 'Click me'); + ɵɵlistener('click', function() { return ctx.showing = !ctx.showing; }); + ɵɵtext(1, 'Click me'); } - ΔelementEnd(); + ɵɵelementEnd(); } } @@ -269,24 +269,24 @@ describe('event listeners', () => { */ function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.showing) { - if (ΔembeddedViewStart(1, 2, 0)) { - ΔelementStart(0, 'button'); + if (ɵɵembeddedViewStart(1, 2, 0)) { + ɵɵelementStart(0, 'button'); { - Δlistener('click', function() { return ctx.onClick(); }); - Δtext(1, 'Click me'); + ɵɵlistener('click', function() { return ctx.onClick(); }); + ɵɵtext(1, 'Click me'); } - ΔelementEnd(); + ɵɵelementEnd(); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } @@ -320,7 +320,7 @@ describe('event listeners', () => { onClick() { this.counter++; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: AppComp, selectors: [['app-comp']], factory: () => new AppComp(), @@ -328,24 +328,24 @@ describe('event listeners', () => { vars: 0, template: function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.showing) { - if (ΔembeddedViewStart(0, 2, 0)) { - ΔelementStart(0, 'button'); + if (ɵɵembeddedViewStart(0, 2, 0)) { + ɵɵelementStart(0, 'button'); { - Δlistener('click', function() { return ctx.onClick(); }); - Δtext(1, 'Click me'); + ɵɵlistener('click', function() { return ctx.onClick(); }); + ɵɵtext(1, 'Click me'); } - ΔelementEnd(); + ɵɵelementEnd(); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } }); @@ -381,7 +381,7 @@ describe('event listeners', () => { onClick(index: number) { this.counters[index]++; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: AppComp, selectors: [['app-comp']], factory: () => new AppComp(), @@ -389,24 +389,24 @@ describe('event listeners', () => { vars: 0, template: function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { for (let i = 0; i < ctx.buttons; i++) { - if (ΔembeddedViewStart(0, 2, 0)) { - ΔelementStart(0, 'button'); + if (ɵɵembeddedViewStart(0, 2, 0)) { + ɵɵelementStart(0, 'button'); { - Δlistener('click', function() { return ctx.onClick(i); }); - Δtext(1, 'Click me'); + ɵɵlistener('click', function() { return ctx.onClick(i); }); + ɵɵtext(1, 'Click me'); } - ΔelementEnd(); + ɵɵelementEnd(); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } }); @@ -445,7 +445,7 @@ describe('event listeners', () => { onClick(index: number) { this.counters[index]++; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: AppComp, selectors: [['app-comp']], factory: () => new AppComp(), @@ -453,31 +453,31 @@ describe('event listeners', () => { vars: 0, template: function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { for (let i = 0; i < ctx.buttons; i++) { - const rf1 = ΔembeddedViewStart(1, 4, 1); + const rf1 = ɵɵembeddedViewStart(1, 4, 1); if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'button'); + ɵɵelementStart(0, 'button'); { - Δlistener('click', function() { return ctx.onClick(i); }); - Δtext(1, 'Click me'); + ɵɵlistener('click', function() { return ctx.onClick(i); }); + ɵɵtext(1, 'Click me'); } - ΔelementEnd(); - ΔelementStart(2, 'div'); - { Δtext(3); } - ΔelementEnd(); + ɵɵelementEnd(); + ɵɵelementStart(2, 'div'); + { ɵɵtext(3); } + ɵɵelementEnd(); } if (rf1 & RenderFlags.Update) { - ΔtextBinding(3, Δbind(ctx.counters[i])); + ɵɵtextBinding(3, ɵɵbind(ctx.counters[i])); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } }); @@ -523,21 +523,21 @@ describe('event listeners', () => { /* @HostListener('click') */ onClick() { events.push('click!'); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComp, selectors: [['comp']], consts: 1, vars: 0, template: function CompTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtext(0, 'Some text'); + ɵɵtext(0, 'Some text'); } }, factory: () => { return new MyComp(); }, hostBindings: function HostListenerDir_HostBindings( rf: RenderFlags, ctx: any, elIndex: number) { if (rf & RenderFlags.Create) { - Δlistener('click', function() { return ctx.onClick(); }); + ɵɵlistener('click', function() { return ctx.onClick(); }); } } }); @@ -574,23 +574,23 @@ describe('event listeners', () => { /* @HostListener('click') */ onClick() { events.push('click!'); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: HostListenerDir, selectors: [['', 'hostListenerDir', '']], factory: function HostListenerDir_Factory() { return new HostListenerDir(); }, hostBindings: function HostListenerDir_HostBindings( rf: RenderFlags, ctx: any, elIndex: number) { if (rf & RenderFlags.Create) { - Δlistener('click', function() { return ctx.onClick(); }); + ɵɵlistener('click', function() { return ctx.onClick(); }); } } }); } const fixture = new TemplateFixture(() => { - ΔelementStart(0, 'button', ['hostListenerDir', '']); - Δtext(1, 'Click'); - ΔelementEnd(); + ɵɵelementStart(0, 'button', ['hostListenerDir', '']); + ɵɵtext(1, 'Click'); + ɵɵelementEnd(); }, () => {}, 2, 0, [HostListenerDir]); const button = fixture.hostElement.querySelector('button') !; @@ -604,7 +604,7 @@ describe('event listeners', () => { it('should support global host listeners on directives', () => { const fixture = new TemplateFixture(() => { - Δelement(0, 'div', ['hostListenerDir', '']); + ɵɵelement(0, 'div', ['hostListenerDir', '']); }, () => {}, 1, 0, [GlobalHostListenerDir]); const doc = fixture.hostElement.ownerDocument !; @@ -626,7 +626,7 @@ describe('event listeners', () => { onClick(a: any, b: any) { this.counter += a + b; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComp, selectors: [['comp']], consts: 2, @@ -634,12 +634,12 @@ describe('event listeners', () => { /** */ template: function CompTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'button'); + ɵɵelementStart(0, 'button'); { - Δlistener('click', function() { return ctx.onClick(ctx.data.a, ctx.data.b); }); - Δtext(1, 'Click me'); + ɵɵlistener('click', function() { return ctx.onClick(ctx.data.a, ctx.data.b); }); + ɵɵtext(1, 'Click me'); } - ΔelementEnd(); + ɵɵelementEnd(); } }, factory: () => new MyComp() @@ -669,39 +669,39 @@ describe('event listeners', () => { */ function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.showing) { - let rf1 = ΔembeddedViewStart(0, 2, 0); + let rf1 = ɵɵembeddedViewStart(0, 2, 0); if (rf1 & RenderFlags.Create) { - Δtext(0, 'Hello'); - Δcontainer(1); + ɵɵtext(0, 'Hello'); + ɵɵcontainer(1); } if (rf1 & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { if (ctx.button) { - let rf1 = ΔembeddedViewStart(0, 2, 0); + let rf1 = ɵɵembeddedViewStart(0, 2, 0); if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'button'); + ɵɵelementStart(0, 'button'); { - Δlistener('click', function() { return ctx.onClick(); }); - Δtext(1, 'Click'); + ɵɵlistener('click', function() { return ctx.onClick(); }); + ɵɵtext(1, 'Click'); } - ΔelementEnd(); + ɵɵelementEnd(); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } @@ -733,22 +733,22 @@ describe('event listeners', () => { */ function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.showing) { - let rf1 = ΔembeddedViewStart(0, 3, 0); + let rf1 = ɵɵembeddedViewStart(0, 3, 0); if (rf1 & RenderFlags.Create) { - Δtext(0, 'Hello'); - Δelement(1, 'comp'); - Δelement(2, 'comp'); + ɵɵtext(0, 'Hello'); + ɵɵelement(1, 'comp'); + ɵɵelement(2, 'comp'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } @@ -775,19 +775,19 @@ describe('event listeners', () => { const ctx = {showing: true}; const fixture = new TemplateFixture( - () => { Δcontainer(0); }, + () => { ɵɵcontainer(0); }, () => { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.showing) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); }, 1, 0, [MyCompWithGlobalListeners]); @@ -820,56 +820,56 @@ describe('event listeners', () => { */ function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.condition) { - let rf1 = ΔembeddedViewStart(0, 3, 0); + let rf1 = ɵɵembeddedViewStart(0, 3, 0); if (rf1 & RenderFlags.Create) { - Δtext(0, 'Hello'); - Δcontainer(1); - Δcontainer(2); + ɵɵtext(0, 'Hello'); + ɵɵcontainer(1); + ɵɵcontainer(2); } if (rf1 & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { if (ctx.sub1) { - let rf1 = ΔembeddedViewStart(0, 2, 0); + let rf1 = ɵɵembeddedViewStart(0, 2, 0); if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'button'); + ɵɵelementStart(0, 'button'); { - Δlistener('click', function() { return ctx.counter1++; }); - Δtext(1, 'Click'); + ɵɵlistener('click', function() { return ctx.counter1++; }); + ɵɵtext(1, 'Click'); } - ΔelementEnd(); + ɵɵelementEnd(); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); - ΔcontainerRefreshStart(2); + ɵɵcontainerRefreshEnd(); + ɵɵcontainerRefreshStart(2); { if (ctx.sub2) { - let rf1 = ΔembeddedViewStart(0, 2, 0); + let rf1 = ɵɵembeddedViewStart(0, 2, 0); if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'button'); + ɵɵelementStart(0, 'button'); { - Δlistener('click', function() { return ctx.counter2++; }); - Δtext(1, 'Click'); + ɵɵlistener('click', function() { return ctx.counter2++; }); + ɵɵtext(1, 'Click'); } - ΔelementEnd(); + ɵɵelementEnd(); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } @@ -907,7 +907,7 @@ describe('event listeners', () => { onClick(comp: any) { this.comp = comp; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: App, selectors: [['app']], factory: () => new App(), @@ -915,17 +915,17 @@ describe('event listeners', () => { vars: 0, template: (rf: RenderFlags, ctx: App) => { if (rf & RenderFlags.Create) { - const state = ΔgetCurrentView(); - Δelement(0, 'comp', null, ['comp', '']); - ΔelementStart(2, 'button'); + const state = ɵɵgetCurrentView(); + ɵɵelement(0, 'comp', null, ['comp', '']); + ɵɵelementStart(2, 'button'); { - Δlistener('click', function() { - ΔrestoreView(state); - const comp = Δreference(1); + ɵɵlistener('click', function() { + ɵɵrestoreView(state); + const comp = ɵɵreference(1); return ctx.onClick(comp); }); } - ΔelementEnd(); + ɵɵelementEnd(); } // testing only diff --git a/packages/core/test/render3/outputs_spec.ts b/packages/core/test/render3/outputs_spec.ts index 17ec22575d..26970eaefe 100644 --- a/packages/core/test/render3/outputs_spec.ts +++ b/packages/core/test/render3/outputs_spec.ts @@ -8,8 +8,8 @@ import {EventEmitter} from '@angular/core'; -import {ΔdefineComponent, ΔdefineDirective} from '../../src/render3/index'; -import {Δbind, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, Δelement, ΔelementEnd, ΔelementProperty, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, Δlistener, Δtext} from '../../src/render3/instructions/all'; +import {ɵɵdefineComponent, ɵɵdefineDirective} from '../../src/render3/index'; +import {ɵɵbind, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵelement, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵlistener, ɵɵtext} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; import {containerEl, renderToHtml} from './render_util'; @@ -23,7 +23,7 @@ describe('outputs', () => { change = new EventEmitter(); resetStream = new EventEmitter(); - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ButtonToggle, selectors: [['button-toggle']], template: function(rf: RenderFlags, ctx: any) {}, @@ -39,7 +39,7 @@ describe('outputs', () => { class OtherDir { changeStream = new EventEmitter(); - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: OtherDir, selectors: [['', 'otherDir', '']], factory: () => otherDir = new OtherDir, @@ -51,7 +51,7 @@ describe('outputs', () => { events: string[] = []; ngOnDestroy() { this.events.push('destroy'); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: DestroyComp, selectors: [['destroy-comp']], consts: 0, @@ -65,7 +65,7 @@ describe('outputs', () => { class MyButton { click = new EventEmitter(); - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: MyButton, selectors: [['', 'myButton', '']], factory: () => buttonDir = new MyButton, @@ -80,11 +80,11 @@ describe('outputs', () => { /** */ function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'button-toggle'); + ɵɵelementStart(0, 'button-toggle'); { - Δlistener('change', function() { return ctx.onChange(); }); + ɵɵlistener('change', function() { return ctx.onChange(); }); } - ΔelementEnd(); + ɵɵelementEnd(); } } @@ -103,12 +103,12 @@ describe('outputs', () => { /** */ function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'button-toggle'); + ɵɵelementStart(0, 'button-toggle'); { - Δlistener('change', function() { return ctx.onChange(); }); - Δlistener('reset', function() { return ctx.onReset(); }); + ɵɵlistener('change', function() { return ctx.onChange(); }); + ɵɵlistener('reset', function() { return ctx.onReset(); }); } - ΔelementEnd(); + ɵɵelementEnd(); } } @@ -128,11 +128,11 @@ describe('outputs', () => { /** */ function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'button-toggle'); + ɵɵelementStart(0, 'button-toggle'); { - Δlistener('change', function() { return ctx.counter++; }); + ɵɵlistener('change', function() { return ctx.counter++; }); } - ΔelementEnd(); + ɵɵelementEnd(); } } @@ -155,24 +155,24 @@ describe('outputs', () => { */ function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.condition) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'button-toggle'); + ɵɵelementStart(0, 'button-toggle'); { - Δlistener('change', function() { return ctx.onChange(); }); + ɵɵlistener('change', function() { return ctx.onChange(); }); } - ΔelementEnd(); + ɵɵelementEnd(); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } @@ -201,35 +201,35 @@ describe('outputs', () => { */ function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.condition) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.condition2) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'button-toggle'); + ɵɵelementStart(0, 'button-toggle'); { - Δlistener('change', function() { return ctx.onChange(); }); + ɵɵlistener('change', function() { return ctx.onChange(); }); } - ΔelementEnd(); + ɵɵelementEnd(); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); - ΔembeddedViewEnd(); + ɵɵcontainerRefreshEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } @@ -257,31 +257,31 @@ describe('outputs', () => { */ function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.condition) { - let rf1 = ΔembeddedViewStart(0, 4, 0); + let rf1 = ɵɵembeddedViewStart(0, 4, 0); if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'button'); + ɵɵelementStart(0, 'button'); { - Δlistener('click', function() { return ctx.onClick(); }); - Δtext(1, 'Click me'); + ɵɵlistener('click', function() { return ctx.onClick(); }); + ɵɵtext(1, 'Click me'); } - ΔelementEnd(); - ΔelementStart(2, 'button-toggle'); + ɵɵelementEnd(); + ɵɵelementStart(2, 'button-toggle'); { - Δlistener('change', function() { return ctx.onChange(); }); + ɵɵlistener('change', function() { return ctx.onChange(); }); } - ΔelementEnd(); - Δelement(3, 'destroy-comp'); + ɵɵelementEnd(); + ɵɵelement(3, 'destroy-comp'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } @@ -313,11 +313,11 @@ describe('outputs', () => { it('should fire event listeners along with outputs if they match', () => { function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'button', ['myButton', '']); + ɵɵelementStart(0, 'button', ['myButton', '']); { - Δlistener('click', function() { return ctx.onClick(); }); + ɵɵlistener('click', function() { return ctx.onClick(); }); } - ΔelementEnd(); + ɵɵelementEnd(); } } @@ -338,11 +338,11 @@ describe('outputs', () => { /** */ function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'button-toggle', ['otherDir', '']); + ɵɵelementStart(0, 'button-toggle', ['otherDir', '']); { - Δlistener('change', function() { return ctx.onChange(); }); + ɵɵlistener('change', function() { return ctx.onChange(); }); } - ΔelementEnd(); + ɵɵelementEnd(); } } @@ -363,7 +363,7 @@ describe('outputs', () => { // TODO(issue/24571): remove '!'. change !: boolean; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: OtherChangeDir, selectors: [['', 'otherChangeDir', '']], factory: () => otherDir = new OtherChangeDir, @@ -374,14 +374,14 @@ describe('outputs', () => { /** */ function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'button-toggle', ['otherChangeDir', '']); + ɵɵelementStart(0, 'button-toggle', ['otherChangeDir', '']); { - Δlistener('change', function() { return ctx.onChange(); }); + ɵɵlistener('change', function() { return ctx.onChange(); }); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'change', Δbind(ctx.change)); + ɵɵelementProperty(0, 'change', ɵɵbind(ctx.change)); } } @@ -409,39 +409,39 @@ describe('outputs', () => { */ function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'button'); + ɵɵelementStart(0, 'button'); { - Δlistener('click', function() { return ctx.onClick(); }); - Δtext(1, 'Click me'); + ɵɵlistener('click', function() { return ctx.onClick(); }); + ɵɵtext(1, 'Click me'); } - ΔelementEnd(); - Δcontainer(2); + ɵɵelementEnd(); + ɵɵcontainer(2); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(2); + ɵɵcontainerRefreshStart(2); { if (ctx.condition) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'button-toggle'); + ɵɵelementStart(0, 'button-toggle'); { - Δlistener('change', function() { return ctx.onChange(); }); + ɵɵlistener('change', function() { return ctx.onChange(); }); } - ΔelementEnd(); + ɵɵelementEnd(); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } else { - if (ΔembeddedViewStart(1, 1, 0)) { - ΔelementStart(0, 'div', ['otherDir', '']); + if (ɵɵembeddedViewStart(1, 1, 0)) { + ɵɵelementStart(0, 'div', ['otherDir', '']); { - Δlistener('change', function() { return ctx.onChange(); }); + ɵɵlistener('change', function() { return ctx.onChange(); }); } - ΔelementEnd(); + ɵɵelementEnd(); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } diff --git a/packages/core/test/render3/pipe_spec.ts b/packages/core/test/render3/pipe_spec.ts index 5f1ff5ae63..8f6acedb54 100644 --- a/packages/core/test/render3/pipe_spec.ts +++ b/packages/core/test/render3/pipe_spec.ts @@ -6,14 +6,14 @@ * found in the LICENSE file at https://angular.io/license */ -import {Directive as _Directive, InjectionToken, OnChanges, OnDestroy, Pipe as _Pipe, PipeTransform, WrappedValue, ɵNgModuleDef as NgModuleDef, ΔdefineComponent as defineComponent, ΔdefineInjectable, ΔdefineInjector, ΔdirectiveInject as directiveInject} from '@angular/core'; +import {Directive as _Directive, InjectionToken, OnChanges, OnDestroy, Pipe as _Pipe, PipeTransform, WrappedValue, ɵNgModuleDef as NgModuleDef, ɵɵdefineComponent as defineComponent, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdirectiveInject as directiveInject} from '@angular/core'; import {expect} from '@angular/platform-browser/testing/src/matchers'; import {createInjector} from '../../src/di/r3_injector'; -import {ΔdefineDirective, ΔdefinePipe} from '../../src/render3/definition'; -import {Δbind, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, ΔelementEnd, ΔelementProperty, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, Δinterpolation1, Δload, Δtext, ΔtextBinding} from '../../src/render3/instructions/all'; +import {ɵɵdefineDirective, ɵɵdefinePipe} from '../../src/render3/definition'; +import {ɵɵbind, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵinterpolation1, ɵɵload, ɵɵtext, ɵɵtextBinding} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; -import {Δpipe, ΔpipeBind1, ΔpipeBind3, ΔpipeBind4, ΔpipeBindV} from '../../src/render3/pipe'; +import {ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV} from '../../src/render3/pipe'; import {RenderLog, getRendererFactory2, patchLoggingRenderer2} from './imported_renderer2'; import {ComponentFixture, TemplateFixture, createComponent, getDirectiveOnNode, renderToHtml} from './render_util'; @@ -46,11 +46,11 @@ describe('pipe', () => { it('should support interpolation', () => { function Template(rf: RenderFlags, person: Person) { if (rf & RenderFlags.Create) { - Δtext(0); - Δpipe(1, 'countingPipe'); + ɵɵtext(0); + ɵɵpipe(1, 'countingPipe'); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δinterpolation1('', ΔpipeBind1(1, 1, person.name), '')); + ɵɵtextBinding(0, ɵɵinterpolation1('', ɵɵpipeBind1(1, 1, person.name), '')); } } @@ -61,11 +61,11 @@ describe('pipe', () => { it('should throw if pipe is not found', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtext(0); - Δpipe(1, 'randomPipeName'); + ɵɵtext(0); + ɵɵpipe(1, 'randomPipeName'); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δinterpolation1('', ΔpipeBind1(1, 1, ctx.value), '')); + ɵɵtextBinding(0, ɵɵinterpolation1('', ɵɵpipeBind1(1, 1, ctx.value), '')); } }, 2, 3, [], pipes); @@ -83,7 +83,7 @@ describe('pipe', () => { constructor() { this.dirProp = ''; } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: MyDir, selectors: [['', 'myDir', '']], factory: () => new MyDir(), @@ -95,7 +95,7 @@ describe('pipe', () => { class DoublePipe implements PipeTransform { transform(value: any) { return `${value}${value}`; } - static ngPipeDef = ΔdefinePipe({ + static ngPipeDef = ɵɵdefinePipe({ name: 'double', type: DoublePipe, factory: function DoublePipe_Factory() { return new DoublePipe(); }, @@ -104,12 +104,12 @@ describe('pipe', () => { function Template(rf: RenderFlags, ctx: string) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['myDir', '']); - Δpipe(1, 'double'); - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['myDir', '']); + ɵɵpipe(1, 'double'); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'elprop', Δbind(ΔpipeBind1(1, 1, ctx))); + ɵɵelementProperty(0, 'elprop', ɵɵbind(ɵɵpipeBind1(1, 1, ctx))); directive = getDirectiveOnNode(0); } } @@ -120,13 +120,13 @@ describe('pipe', () => { it('should support arguments in pipes', () => { function Template(rf: RenderFlags, person: Person) { if (rf & RenderFlags.Create) { - Δtext(0); - Δpipe(1, 'multiArgPipe'); + ɵɵtext(0); + ɵɵpipe(1, 'multiArgPipe'); } if (rf & RenderFlags.Update) { - ΔtextBinding( + ɵɵtextBinding( 0, - Δinterpolation1('', ΔpipeBind3(1, 1, person.name, 'one', person.address !.city), '')); + ɵɵinterpolation1('', ɵɵpipeBind3(1, 1, person.name, 'one', person.address !.city), '')); } } @@ -137,14 +137,14 @@ describe('pipe', () => { it('should support calling pipes with different number of arguments', () => { function Template(rf: RenderFlags, person: Person) { if (rf & RenderFlags.Create) { - Δtext(0); - Δpipe(1, 'multiArgPipe'); - Δpipe(2, 'multiArgPipe'); + ɵɵtext(0); + ɵɵpipe(1, 'multiArgPipe'); + ɵɵpipe(2, 'multiArgPipe'); } if (rf & RenderFlags.Update) { - ΔtextBinding( - 0, Δinterpolation1( - '', ΔpipeBind4(2, 5, ΔpipeBindV(1, 1, [person.name, 'a', 'b']), 0, 1, 2), '')); + ɵɵtextBinding( + 0, ɵɵinterpolation1( + '', ɵɵpipeBind4(2, 5, ɵɵpipeBindV(1, 1, [person.name, 'a', 'b']), 0, 1, 2), '')); } } @@ -157,7 +157,7 @@ describe('pipe', () => { class IdentityPipe implements PipeTransform { transform(value: any) { return value; } - static ngPipeDef = ΔdefinePipe({ + static ngPipeDef = ɵɵdefinePipe({ name: 'identityPipe', type: IdentityPipe, factory: function IdentityPipe_Factory() { return new IdentityPipe(); }, @@ -166,12 +166,12 @@ describe('pipe', () => { function Template(rf: RenderFlags, person: Person) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - Δpipe(1, 'identityPipe'); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵpipe(1, 'identityPipe'); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'id', Δbind(ΔpipeBind1(1, 1, 'Megatron'))); + ɵɵelementProperty(0, 'id', ɵɵbind(ɵɵpipeBind1(1, 1, 'Megatron'))); } } @@ -186,11 +186,11 @@ describe('pipe', () => { it('should support duplicates by using the later entry', () => { function Template(rf: RenderFlags, person: Person) { if (rf & RenderFlags.Create) { - Δtext(0); - Δpipe(1, 'duplicatePipe'); + ɵɵtext(0); + ɵɵpipe(1, 'duplicatePipe'); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δinterpolation1('', ΔpipeBind1(1, 1, person.name), '')); + ɵɵtextBinding(0, ɵɵinterpolation1('', ɵɵpipeBind1(1, 1, person.name), '')); } } @@ -202,11 +202,11 @@ describe('pipe', () => { it('should call pure pipes only if the arguments change', () => { function Template(rf: RenderFlags, person: Person) { if (rf & RenderFlags.Create) { - Δtext(0); - Δpipe(1, 'countingPipe'); + ɵɵtext(0); + ɵɵpipe(1, 'countingPipe'); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δinterpolation1('', ΔpipeBind1(1, 1, person.name), '')); + ɵɵtextBinding(0, ɵɵinterpolation1('', ɵɵpipeBind1(1, 1, person.name), '')); } } @@ -231,11 +231,11 @@ describe('pipe', () => { it('should call impure pipes on each change detection run', () => { function Template(rf: RenderFlags, person: Person) { if (rf & RenderFlags.Create) { - Δtext(0); - Δpipe(1, 'countingImpurePipe'); + ɵɵtext(0); + ɵɵpipe(1, 'countingImpurePipe'); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δinterpolation1('', ΔpipeBind1(1, 1, person.name), '')); + ɵɵtextBinding(0, ɵɵinterpolation1('', ɵɵpipeBind1(1, 1, person.name), '')); } } @@ -247,37 +247,37 @@ describe('pipe', () => { it('should not cache impure pipes', () => { function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - Δpipe(1, 'countingImpurePipe'); - ΔelementEnd(); - ΔelementStart(2, 'div'); - Δpipe(3, 'countingImpurePipe'); - ΔelementEnd(); - Δcontainer(4); + ɵɵelementStart(0, 'div'); + ɵɵpipe(1, 'countingImpurePipe'); + ɵɵelementEnd(); + ɵɵelementStart(2, 'div'); + ɵɵpipe(3, 'countingImpurePipe'); + ɵɵelementEnd(); + ɵɵcontainer(4); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'id', Δbind(ΔpipeBind1(1, 2, true))); - ΔelementProperty(2, 'id', Δbind(ΔpipeBind1(3, 4, true))); - pipeInstances.push(Δload(1), Δload(3)); - ΔcontainerRefreshStart(4); + ɵɵelementProperty(0, 'id', ɵɵbind(ɵɵpipeBind1(1, 2, true))); + ɵɵelementProperty(2, 'id', ɵɵbind(ɵɵpipeBind1(3, 4, true))); + pipeInstances.push(ɵɵload(1), ɵɵload(3)); + ɵɵcontainerRefreshStart(4); { for (let i of [1, 2]) { - let rf1 = ΔembeddedViewStart(1, 2, 3); + let rf1 = ɵɵembeddedViewStart(1, 2, 3); { if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'div'); - Δpipe(1, 'countingImpurePipe'); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵpipe(1, 'countingImpurePipe'); + ɵɵelementEnd(); } if (rf1 & RenderFlags.Update) { - ΔelementProperty(0, 'id', Δbind(ΔpipeBind1(1, 1, true))); - pipeInstances.push(Δload(1)); + ɵɵelementProperty(0, 'id', ɵɵbind(ɵɵpipeBind1(1, 1, true))); + pipeInstances.push(ɵɵload(1)); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } @@ -301,7 +301,7 @@ describe('pipe', () => { transform(value: any): any { return null; } - static ngPipeDef = ΔdefinePipe({ + static ngPipeDef = ɵɵdefinePipe({ name: 'pipeWithOnDestroy', type: PipeWithOnDestroy, factory: function PipeWithOnDestroy_Factory() { return new PipeWithOnDestroy(); }, @@ -311,26 +311,26 @@ describe('pipe', () => { it('should call ngOnDestroy on pipes', () => { function Template(rf: RenderFlags, person: Person) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (person.age > 20) { - let rf1 = ΔembeddedViewStart(1, 2, 3); + let rf1 = ɵɵembeddedViewStart(1, 2, 3); { if (rf1 & RenderFlags.Create) { - Δtext(0); - Δpipe(1, 'pipeWithOnDestroy'); + ɵɵtext(0); + ɵɵpipe(1, 'pipeWithOnDestroy'); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δinterpolation1('', ΔpipeBind1(1, 1, person.age), '')); + ɵɵtextBinding(0, ɵɵinterpolation1('', ɵɵpipeBind1(1, 1, person.age), '')); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } const pipes = [PipeWithOnDestroy]; @@ -363,11 +363,12 @@ describe('pipe', () => { title = 'ServiceB Title'; static ngInjectableDef = - ΔdefineInjectable({providedIn: 'root', factory: () => new ServiceB()}); + ɵɵdefineInjectable({providedIn: 'root', factory: () => new ServiceB()}); } class ModuleA { - static ngInjectorDef = ΔdefineInjector({factory: () => new ModuleA(), providers: [ServiceA]}); + static ngInjectorDef = + ɵɵdefineInjector({factory: () => new ModuleA(), providers: [ServiceA]}); static ngModuleDef: NgModuleDef = { bootstrap: [] } as any; } @@ -377,7 +378,7 @@ describe('pipe', () => { transform(value: string): string { return `${value} - ${this.obj.title}`; } - static ngPipeDef = ΔdefinePipe({ + static ngPipeDef = ɵɵdefinePipe({ name: 'myConcatPipe', type: MyConcatPipe, factory: () => new MyConcatPipe(directiveInject(InjectionType)), @@ -399,11 +400,11 @@ describe('pipe', () => { // '{{ title | myConcatPipe }}' template: (rf: RenderFlags, ctx: MyComponent) => { if (rf & 1) { - Δtext(0); - Δpipe(1, 'myConcatPipe'); + ɵɵtext(0); + ɵɵpipe(1, 'myConcatPipe'); } if (rf & 2) { - ΔtextBinding(0, Δinterpolation1('', ΔpipeBind1(1, 1, ctx.title), '')); + ɵɵtextBinding(0, ɵɵinterpolation1('', ɵɵpipeBind1(1, 1, ctx.title), '')); } }, ...overrides @@ -439,7 +440,7 @@ describe('pipe', () => { class WrappingPipe implements PipeTransform { transform(value: any) { return new WrappedValue('Bar'); } - static ngPipeDef = ΔdefinePipe({ + static ngPipeDef = ɵɵdefinePipe({ name: 'wrappingPipe', type: WrappingPipe, factory: function WrappingPipe_Factory() { return new WrappingPipe(); }, @@ -448,11 +449,13 @@ describe('pipe', () => { } function createTemplate() { - Δtext(0); - Δpipe(1, 'wrappingPipe'); + ɵɵtext(0); + ɵɵpipe(1, 'wrappingPipe'); } - function updateTemplate() { ΔtextBinding(0, Δinterpolation1('', ΔpipeBind1(1, 1, null), '')); } + function updateTemplate() { + ɵɵtextBinding(0, ɵɵinterpolation1('', ɵɵpipeBind1(1, 1, null), '')); + } it('should unwrap', () => { const fixture = @@ -481,7 +484,7 @@ class CountingPipe implements PipeTransform { transform(value: any) { return `${value} state:${this.state++}`; } - static ngPipeDef = ΔdefinePipe({ + static ngPipeDef = ɵɵdefinePipe({ name: 'countingPipe', type: CountingPipe, factory: function CountingPipe_Factory() { return new CountingPipe(); }, @@ -494,7 +497,7 @@ class CountingImpurePipe implements PipeTransform { transform(value: any) { return `${value} state:${this.state++}`; } - static ngPipeDef = ΔdefinePipe({ + static ngPipeDef = ɵɵdefinePipe({ name: 'countingImpurePipe', type: CountingImpurePipe, factory: function CountingImpurePipe_Factory() { return new CountingImpurePipe(); }, @@ -508,7 +511,7 @@ class MultiArgPipe implements PipeTransform { return `${value} ${arg1} ${arg2} ${arg3}`; } - static ngPipeDef = ΔdefinePipe({ + static ngPipeDef = ɵɵdefinePipe({ name: 'multiArgPipe', type: MultiArgPipe, factory: function MultiArgPipe_Factory() { return new MultiArgPipe(); }, @@ -519,7 +522,7 @@ class MultiArgPipe implements PipeTransform { class DuplicatePipe1 implements PipeTransform { transform(value: any) { return `${value} from duplicate 1`; } - static ngPipeDef = ΔdefinePipe({ + static ngPipeDef = ɵɵdefinePipe({ name: 'duplicatePipe', type: DuplicatePipe1, factory: function DuplicatePipe1_Factory() { return new DuplicatePipe1(); }, @@ -530,7 +533,7 @@ class DuplicatePipe1 implements PipeTransform { class DuplicatePipe2 implements PipeTransform { transform(value: any) { return `${value} from duplicate 2`; } - static ngPipeDef = ΔdefinePipe({ + static ngPipeDef = ɵɵdefinePipe({ name: 'duplicatePipe', type: DuplicatePipe2, factory: function DuplicatePipe2_Factory() { return new DuplicatePipe2(); }, diff --git a/packages/core/test/render3/properties_spec.ts b/packages/core/test/render3/properties_spec.ts index fc28b0d203..d7efadec1a 100644 --- a/packages/core/test/render3/properties_spec.ts +++ b/packages/core/test/render3/properties_spec.ts @@ -8,8 +8,8 @@ import {EventEmitter} from '@angular/core'; -import {ΔdefineComponent, ΔdefineDirective} from '../../src/render3/index'; -import {Δbind, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, Δelement, ΔelementEnd, ΔelementProperty, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, Δinterpolation1, Δlistener, Δload, Δreference, Δtext, ΔtextBinding} from '../../src/render3/instructions/all'; +import {ɵɵdefineComponent, ɵɵdefineDirective} from '../../src/render3/index'; +import {ɵɵbind, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵelement, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵinterpolation1, ɵɵlistener, ɵɵload, ɵɵreference, ɵɵtext, ɵɵtextBinding} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; import {ComponentFixture, createComponent, renderToHtml} from './render_util'; @@ -19,10 +19,10 @@ describe('elementProperty', () => { it('should support bindings to properties', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'span'); + ɵɵelement(0, 'span'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'id', Δbind(ctx.id)); + ɵɵelementProperty(0, 'id', ɵɵbind(ctx.id)); } }, 1, 1); @@ -47,8 +47,8 @@ describe('elementProperty', () => { function Template(rf: RenderFlags, ctx: string) { if (rf & RenderFlags.Create) { - Δelement(0, 'span'); - ΔelementProperty(0, 'id', expensive(ctx)); + ɵɵelement(0, 'span'); + ɵɵelementProperty(0, 'id', expensive(ctx)); } } @@ -59,10 +59,10 @@ describe('elementProperty', () => { it('should support interpolation for properties', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'span'); + ɵɵelement(0, 'span'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'id', Δinterpolation1('_', ctx.id, '_')); + ɵɵelementProperty(0, 'id', ɵɵinterpolation1('_', ctx.id, '_')); } }, 1, 1); @@ -86,7 +86,7 @@ describe('elementProperty', () => { // TODO(issue/24571): remove '!'. disabled !: boolean; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: MyButton, selectors: [['', 'myButton', '']], factory: () => button = new MyButton(), @@ -99,7 +99,7 @@ describe('elementProperty', () => { id !: number; clickStream = new EventEmitter(); - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: OtherDir, selectors: [['', 'otherDir', '']], factory: () => otherDir = new OtherDir(), @@ -112,7 +112,7 @@ describe('elementProperty', () => { // TODO(issue/24571): remove '!'. disabled !: boolean; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: OtherDisabledDir, selectors: [['', 'otherDisabledDir', '']], factory: () => otherDisabledDir = new OtherDisabledDir(), @@ -124,7 +124,7 @@ describe('elementProperty', () => { // TODO(issue/24571): remove '!'. idNumber !: string; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: IdDir, selectors: [['', 'idDir', '']], factory: () => idDir = new IdDir(), @@ -140,13 +140,13 @@ describe('elementProperty', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'button', ['otherDir', '', 'myButton', '']); - { Δtext(1, 'Click me'); } - ΔelementEnd(); + ɵɵelementStart(0, 'button', ['otherDir', '', 'myButton', '']); + { ɵɵtext(1, 'Click me'); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'disabled', Δbind(ctx.isDisabled)); - ΔelementProperty(0, 'id', Δbind(ctx.id)); + ɵɵelementProperty(0, 'disabled', ɵɵbind(ctx.isDisabled)); + ɵɵelementProperty(0, 'id', ɵɵbind(ctx.id)); } }, 2, 2, deps); @@ -171,13 +171,13 @@ describe('elementProperty', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'button', ['myButton', '']); - { Δtext(1, 'Click me'); } - ΔelementEnd(); + ɵɵelementStart(0, 'button', ['myButton', '']); + { ɵɵtext(1, 'Click me'); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'disabled', Δbind(ctx.isDisabled)); - ΔelementProperty(0, 'id', Δbind(ctx.id)); + ɵɵelementProperty(0, 'disabled', ɵɵbind(ctx.isDisabled)); + ɵɵelementProperty(0, 'id', ɵɵbind(ctx.id)); } }, 2, 2, deps); @@ -203,7 +203,7 @@ describe('elementProperty', () => { // TODO(issue/24571): remove '!'. id !: number; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Comp, selectors: [['comp']], consts: 0, @@ -217,10 +217,10 @@ describe('elementProperty', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'id', Δbind(ctx.id)); + ɵɵelementProperty(0, 'id', ɵɵbind(ctx.id)); } }, 1, 1, [Comp]); @@ -241,12 +241,12 @@ describe('elementProperty', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'button', ['myButton', '', 'otherDisabledDir', '']); - { Δtext(1, 'Click me'); } - ΔelementEnd(); + ɵɵelementStart(0, 'button', ['myButton', '', 'otherDisabledDir', '']); + { ɵɵtext(1, 'Click me'); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'disabled', Δbind(ctx.isDisabled)); + ɵɵelementProperty(0, 'disabled', ɵɵbind(ctx.isDisabled)); } }, 2, 1, deps); @@ -268,15 +268,15 @@ describe('elementProperty', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'button', ['otherDir', '']); + ɵɵelementStart(0, 'button', ['otherDir', '']); { - Δlistener('click', () => ctx.onClick()); - Δtext(1, 'Click me'); + ɵɵlistener('click', () => ctx.onClick()); + ɵɵtext(1, 'Click me'); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'id', Δbind(ctx.id)); + ɵɵelementProperty(0, 'id', ɵɵbind(ctx.id)); } }, 2, 1, deps); @@ -308,40 +308,40 @@ describe('elementProperty', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'button', ['idDir', '']); - { Δtext(1, 'Click me'); } - ΔelementEnd(); - Δcontainer(2); + ɵɵelementStart(0, 'button', ['idDir', '']); + { ɵɵtext(1, 'Click me'); } + ɵɵelementEnd(); + ɵɵcontainer(2); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'id', Δbind(ctx.id1)); - ΔcontainerRefreshStart(2); + ɵɵelementProperty(0, 'id', ɵɵbind(ctx.id1)); + ɵɵcontainerRefreshStart(2); { if (ctx.condition) { - let rf0 = ΔembeddedViewStart(0, 2, 1); + let rf0 = ɵɵembeddedViewStart(0, 2, 1); if (rf0 & RenderFlags.Create) { - ΔelementStart(0, 'button'); - { Δtext(1, 'Click me too'); } - ΔelementEnd(); + ɵɵelementStart(0, 'button'); + { ɵɵtext(1, 'Click me too'); } + ɵɵelementEnd(); } if (rf0 & RenderFlags.Update) { - ΔelementProperty(0, 'id', Δbind(ctx.id2)); + ɵɵelementProperty(0, 'id', ɵɵbind(ctx.id2)); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } else { - let rf1 = ΔembeddedViewStart(1, 2, 1); + let rf1 = ɵɵembeddedViewStart(1, 2, 1); if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'button', ['otherDir', '']); - { Δtext(1, 'Click me too'); } - ΔelementEnd(); + ɵɵelementStart(0, 'button', ['otherDir', '']); + { ɵɵtext(1, 'Click me too'); } + ɵɵelementEnd(); } if (rf1 & RenderFlags.Update) { - ΔelementProperty(0, 'id', Δbind(ctx.id3)); + ɵɵelementProperty(0, 'id', ɵɵbind(ctx.id3)); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 3, 1, deps); @@ -375,7 +375,7 @@ describe('elementProperty', () => { direction !: string; changeStream = new EventEmitter(); - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: MyDir, selectors: [['', 'myDir', '']], factory: () => myDir = new MyDir(), @@ -390,7 +390,7 @@ describe('elementProperty', () => { // TODO(issue/24571): remove '!'. roleB !: string; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: MyDirB, selectors: [['', 'myDirB', '']], factory: () => dirB = new MyDirB(), @@ -405,7 +405,7 @@ describe('elementProperty', () => { /**
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['role', 'button', 'myDir', '']); + ɵɵelement(0, 'div', ['role', 'button', 'myDir', '']); } }, 1, 0, deps); @@ -419,10 +419,10 @@ describe('elementProperty', () => { /**
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['role', 'button', 'myDir', '']); + ɵɵelement(0, 'div', ['role', 'button', 'myDir', '']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'role', Δbind(ctx.role)); + ɵɵelementProperty(0, 'role', ɵɵbind(ctx.role)); } }, 1, 1, deps); @@ -442,7 +442,7 @@ describe('elementProperty', () => { /**
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['role', 'button', 'myDir', '', 'myDirB', '']); + ɵɵelement(0, 'div', ['role', 'button', 'myDir', '', 'myDirB', '']); } }, 1, 0, deps); @@ -457,7 +457,7 @@ describe('elementProperty', () => { /**
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['role', 'button', 'dir', 'rtl', 'myDir', '']); + ɵɵelement(0, 'div', ['role', 'button', 'dir', 'rtl', 'myDir', '']); } }, 1, 0, deps); @@ -472,9 +472,9 @@ describe('elementProperty', () => { /**
*/ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['role', 'button', 'myDir', '']); - { Δlistener('change', () => ctx.onChange()); } - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['role', 'button', 'myDir', '']); + { ɵɵlistener('change', () => ctx.onChange()); } + ɵɵelementEnd(); } }, 1, 0, deps); @@ -497,8 +497,8 @@ describe('elementProperty', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['role', 'button', 'dir', 'rtl', 'myDir', '']); - Δelement(1, 'div', ['role', 'listbox', 'myDirB', '']); + ɵɵelement(0, 'div', ['role', 'button', 'dir', 'rtl', 'myDir', '']); + ɵɵelement(1, 'div', ['role', 'listbox', 'myDirB', '']); } }, 2, 0, deps); @@ -523,27 +523,27 @@ describe('elementProperty', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['role', 'listbox', 'myDir', '']); - Δcontainer(1); + ɵɵelement(0, 'div', ['role', 'listbox', 'myDir', '']); + ɵɵcontainer(1); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { if (ctx.condition) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - Δelement(0, 'div', ['role', 'button', 'myDirB', '']); + ɵɵelement(0, 'div', ['role', 'button', 'myDirB', '']); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } else { - let rf2 = ΔembeddedViewStart(1, 1, 0); + let rf2 = ɵɵembeddedViewStart(1, 1, 0); if (rf2 & RenderFlags.Create) { - Δelement(0, 'div', ['role', 'menu']); + ɵɵelement(0, 'div', ['role', 'menu']); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 2, 0, deps); @@ -565,7 +565,7 @@ describe('elementProperty', () => { it('should process attributes properly inside a for loop', () => { class Comp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Comp, selectors: [['comp']], consts: 3, @@ -573,12 +573,12 @@ describe('elementProperty', () => { /**
{{ dir.role }} */ template: function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['role', 'button', 'myDir', ''], ['dir', 'myDir']); - Δtext(2); + ɵɵelement(0, 'div', ['role', 'button', 'myDir', ''], ['dir', 'myDir']); + ɵɵtext(2); } if (rf & RenderFlags.Update) { - const tmp = Δreference(1) as any; - ΔtextBinding(2, Δbind(tmp.role)); + const tmp = ɵɵreference(1) as any; + ɵɵtextBinding(2, ɵɵbind(tmp.role)); } }, factory: () => new Comp(), @@ -593,20 +593,20 @@ describe('elementProperty', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { for (let i = 0; i < 2; i++) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); if (rf1 & RenderFlags.Create) { - Δelement(0, 'comp'); + ɵɵelement(0, 'comp'); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1, 0, [Comp]); diff --git a/packages/core/test/render3/providers_spec.ts b/packages/core/test/render3/providers_spec.ts index 021b7a18db..0e64029c90 100644 --- a/packages/core/test/render3/providers_spec.ts +++ b/packages/core/test/render3/providers_spec.ts @@ -6,11 +6,11 @@ * found in the LICENSE file at https://angular.io/license */ -import {Component as _Component, ComponentFactoryResolver, ElementRef, InjectFlags, Injectable as _Injectable, InjectionToken, InjectorType, Provider, RendererFactory2, ViewContainerRef, ɵNgModuleDef as NgModuleDef, ΔdefineInjectable, ΔdefineInjector, Δinject} from '../../src/core'; +import {Component as _Component, ComponentFactoryResolver, ElementRef, InjectFlags, Injectable as _Injectable, InjectionToken, InjectorType, Provider, RendererFactory2, ViewContainerRef, ɵNgModuleDef as NgModuleDef, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵinject} from '../../src/core'; import {forwardRef} from '../../src/di/forward_ref'; import {createInjector} from '../../src/di/r3_injector'; -import {injectComponentFactoryResolver, ΔProvidersFeature, ΔdefineComponent, ΔdefineDirective, ΔdirectiveInject} from '../../src/render3/index'; -import {Δbind, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, Δelement, ΔelementEnd, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, Δinterpolation1, Δtext, ΔtextBinding} from '../../src/render3/instructions/all'; +import {injectComponentFactoryResolver, ɵɵProvidersFeature, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdirectiveInject} from '../../src/render3/index'; +import {ɵɵbind, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵelement, ɵɵelementEnd, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵinterpolation1, ɵɵtext, ɵɵtextBinding} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; import {NgModuleFactory} from '../../src/render3/ng_module_ref'; import {getInjector} from '../../src/render3/util/discovery_utils'; @@ -59,7 +59,7 @@ describe('providers', () => { constructor(private provider: GreeterProvider) { this.greet = this.provider.provide(); } static ngInjectableDef = - ΔdefineInjectable({factory: () => new GreeterInj(Δinject(GreeterProvider as any))}); + ɵɵdefineInjectable({factory: () => new GreeterInj(ɵɵinject(GreeterProvider as any))}); } it('TypeProvider', () => { @@ -67,7 +67,7 @@ describe('providers', () => { parent: { providers: [GreeterClass], componentAssertion: - () => { expect(ΔdirectiveInject(GreeterClass).greet).toEqual('Class'); } + () => { expect(ɵɵdirectiveInject(GreeterClass).greet).toEqual('Class'); } } }); }); @@ -76,7 +76,7 @@ describe('providers', () => { expectProvidersScenario({ parent: { providers: [{provide: GREETER, useValue: {greet: 'Value'}}], - componentAssertion: () => { expect(ΔdirectiveInject(GREETER).greet).toEqual('Value'); } + componentAssertion: () => { expect(ɵɵdirectiveInject(GREETER).greet).toEqual('Value'); } } }); }); @@ -85,7 +85,7 @@ describe('providers', () => { expectProvidersScenario({ parent: { providers: [{provide: GREETER, useClass: GreeterClass}], - componentAssertion: () => { expect(ΔdirectiveInject(GREETER).greet).toEqual('Class'); } + componentAssertion: () => { expect(ɵɵdirectiveInject(GREETER).greet).toEqual('Class'); } } }); }); @@ -94,7 +94,7 @@ describe('providers', () => { expectProvidersScenario({ parent: { providers: [GreeterClass, {provide: GREETER, useExisting: GreeterClass}], - componentAssertion: () => { expect(ΔdirectiveInject(GREETER).greet).toEqual('Class'); } + componentAssertion: () => { expect(ɵɵdirectiveInject(GREETER).greet).toEqual('Class'); } } }); }); @@ -103,7 +103,7 @@ describe('providers', () => { expectProvidersScenario({ parent: { providers: [GreeterClass, {provide: GREETER, useFactory: () => new GreeterClass()}], - componentAssertion: () => { expect(ΔdirectiveInject(GREETER).greet).toEqual('Class'); } + componentAssertion: () => { expect(ɵɵdirectiveInject(GREETER).greet).toEqual('Class'); } } }); }); @@ -117,7 +117,7 @@ describe('providers', () => { {provide: MESSAGE, useValue: 'Message'}, {provide: GREETER, useClass: GreeterDeps, deps: [MESSAGE]} ], - componentAssertion: () => { expect(ΔdirectiveInject(GREETER).greet).toEqual('Message'); } + componentAssertion: () => { expect(ɵɵdirectiveInject(GREETER).greet).toEqual('Message'); } } }); }); @@ -130,7 +130,7 @@ describe('providers', () => { {provide: GREETER, useClass: GreeterBuiltInDeps, deps: [MESSAGE, ElementRef]} ], componentAssertion: - () => { expect(ΔdirectiveInject(GREETER).greet).toEqual('Message from PARENT'); } + () => { expect(ɵɵdirectiveInject(GREETER).greet).toEqual('Message from PARENT'); } } }); }); @@ -142,7 +142,7 @@ describe('providers', () => { {provide: MESSAGE, useValue: 'Message'}, {provide: GREETER, useFactory: (msg: string) => new GreeterDeps(msg), deps: [MESSAGE]} ], - componentAssertion: () => { expect(ΔdirectiveInject(GREETER).greet).toEqual('Message'); } + componentAssertion: () => { expect(ɵɵdirectiveInject(GREETER).greet).toEqual('Message'); } } }); }); @@ -159,7 +159,7 @@ describe('providers', () => { } ], componentAssertion: - () => { expect(ΔdirectiveInject(GREETER).greet).toEqual('Message from PARENT'); } + () => { expect(ɵɵdirectiveInject(GREETER).greet).toEqual('Message from PARENT'); } } }); }); @@ -168,7 +168,8 @@ describe('providers', () => { expectProvidersScenario({ parent: { providers: [GreeterProvider, {provide: GREETER, useClass: GreeterInj}], - componentAssertion: () => { expect(ΔdirectiveInject(GREETER).greet).toEqual('Provided'); } + componentAssertion: + () => { expect(ɵɵdirectiveInject(GREETER).greet).toEqual('Provided'); } } }); }); @@ -180,7 +181,7 @@ describe('providers', () => { parent: { providers: [forwardRef(() => ForLater)], componentAssertion: - () => { expect(ΔdirectiveInject(ForLater) instanceof ForLater).toBeTruthy(); } + () => { expect(ɵɵdirectiveInject(ForLater) instanceof ForLater).toBeTruthy(); } } }); done(); @@ -195,7 +196,7 @@ describe('providers', () => { parent: { providers: [{provide: GREETER, useValue: forwardRef(() => { return {greet: 'Value'}; })}], - componentAssertion: () => { expect(ΔdirectiveInject(GREETER).greet).toEqual('Value'); } + componentAssertion: () => { expect(ɵɵdirectiveInject(GREETER).greet).toEqual('Value'); } } }); }); @@ -204,7 +205,7 @@ describe('providers', () => { expectProvidersScenario({ parent: { providers: [{provide: GREETER, useClass: forwardRef(() => GreeterClass)}], - componentAssertion: () => { expect(ΔdirectiveInject(GREETER).greet).toEqual('Class'); } + componentAssertion: () => { expect(ɵɵdirectiveInject(GREETER).greet).toEqual('Class'); } } }); }); @@ -214,7 +215,7 @@ describe('providers', () => { parent: { providers: [GreeterClass, {provide: GREETER, useExisting: forwardRef(() => GreeterClass)}], - componentAssertion: () => { expect(ΔdirectiveInject(GREETER).greet).toEqual('Class'); } + componentAssertion: () => { expect(ɵɵdirectiveInject(GREETER).greet).toEqual('Class'); } } }); }); @@ -225,7 +226,7 @@ describe('providers', () => { parent: { providers: [{provide: GREETER, useValue: {greet: 'Value'}}], componentAssertion: () => { - expect(ΔdirectiveInject(forwardRef(() => GREETER)).greet).toEqual('Value'); + expect(ɵɵdirectiveInject(forwardRef(() => GREETER)).greet).toEqual('Value'); } } }); @@ -255,7 +256,7 @@ describe('providers', () => { parent: { providers: [{provide: String, useValue: 'Message 1'}], directiveProviders: [{provide: String, useValue: 'Message 2'}], - componentAssertion: () => { expect(ΔdirectiveInject(String)).toEqual('Message 2'); } + componentAssertion: () => { expect(ɵɵdirectiveInject(String)).toEqual('Message 2'); } } }); }); @@ -265,7 +266,7 @@ describe('providers', () => { parent: { providers: [{provide: String, useValue: 'Message 1'}], viewProviders: [{provide: String, useValue: 'Message 2'}], - componentAssertion: () => { expect(ΔdirectiveInject(String)).toEqual('Message 2'); } + componentAssertion: () => { expect(ɵɵdirectiveInject(String)).toEqual('Message 2'); } } }); }); @@ -275,7 +276,7 @@ describe('providers', () => { parent: { directiveProviders: [{provide: String, useValue: 'Message 1'}], viewProviders: [{provide: String, useValue: 'Message 2'}], - componentAssertion: () => { expect(ΔdirectiveInject(String)).toEqual('Message 2'); } + componentAssertion: () => { expect(ɵɵdirectiveInject(String)).toEqual('Message 2'); } } }); }); @@ -285,7 +286,7 @@ describe('providers', () => { parent: { directive2Providers: [{provide: String, useValue: 'Message 1'}], directiveProviders: [{provide: String, useValue: 'Message 2'}], - componentAssertion: () => { expect(ΔdirectiveInject(String)).toEqual('Message 2'); } + componentAssertion: () => { expect(ɵɵdirectiveInject(String)).toEqual('Message 2'); } } }); }); @@ -295,7 +296,7 @@ describe('providers', () => { parent: { providers: [{provide: String, useValue: 'Message 1'}, {provide: String, useValue: 'Message 2'}], - componentAssertion: () => { expect(ΔdirectiveInject(String)).toEqual('Message 2'); } + componentAssertion: () => { expect(ɵɵdirectiveInject(String)).toEqual('Message 2'); } } }); }); @@ -305,7 +306,7 @@ describe('providers', () => { parent: { viewProviders: [{provide: String, useValue: 'Message 1'}, {provide: String, useValue: 'Message 2'}], - componentAssertion: () => { expect(ΔdirectiveInject(String)).toEqual('Message 2'); } + componentAssertion: () => { expect(ɵɵdirectiveInject(String)).toEqual('Message 2'); } } }); }); @@ -315,7 +316,7 @@ describe('providers', () => { parent: { directiveProviders: [{provide: String, useValue: 'Message 1'}, {provide: String, useValue: 'Message 2'}], - componentAssertion: () => { expect(ΔdirectiveInject(String)).toEqual('Message 2'); } + componentAssertion: () => { expect(ɵɵdirectiveInject(String)).toEqual('Message 2'); } } }); }); @@ -323,7 +324,7 @@ describe('providers', () => { describe('single', () => { class MyModule { - static ngInjectorDef = ΔdefineInjector( + static ngInjectorDef = ɵɵdefineInjector( {factory: () => new MyModule(), providers: [{provide: String, useValue: 'From module'}]}); } @@ -331,16 +332,16 @@ describe('providers', () => { it('should work without providers nor viewProviders in component', () => { expectProvidersScenario({ parent: { - componentAssertion: () => { expect(ΔdirectiveInject(String)).toEqual('From module'); }, - directiveAssertion: () => { expect(ΔdirectiveInject(String)).toEqual('From module'); } + componentAssertion: () => { expect(ɵɵdirectiveInject(String)).toEqual('From module'); }, + directiveAssertion: () => { expect(ɵɵdirectiveInject(String)).toEqual('From module'); } }, viewChild: { - componentAssertion: () => { expect(ΔdirectiveInject(String)).toEqual('From module'); }, - directiveAssertion: () => { expect(ΔdirectiveInject(String)).toEqual('From module'); } + componentAssertion: () => { expect(ɵɵdirectiveInject(String)).toEqual('From module'); }, + directiveAssertion: () => { expect(ɵɵdirectiveInject(String)).toEqual('From module'); } }, contentChild: { - componentAssertion: () => { expect(ΔdirectiveInject(String)).toEqual('From module'); }, - directiveAssertion: () => { expect(ΔdirectiveInject(String)).toEqual('From module'); } + componentAssertion: () => { expect(ɵɵdirectiveInject(String)).toEqual('From module'); }, + directiveAssertion: () => { expect(ɵɵdirectiveInject(String)).toEqual('From module'); } }, ngModule: MyModule }); @@ -351,21 +352,21 @@ describe('providers', () => { parent: { providers: [{provide: String, useValue: 'From providers'}], componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From providers'); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual('From providers'); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From providers'); } + () => { expect(ɵɵdirectiveInject(String)).toEqual('From providers'); } }, viewChild: { componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From providers'); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual('From providers'); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From providers'); } + () => { expect(ɵɵdirectiveInject(String)).toEqual('From providers'); } }, contentChild: { componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From providers'); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual('From providers'); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From providers'); } + () => { expect(ɵɵdirectiveInject(String)).toEqual('From providers'); } }, ngModule: MyModule }); @@ -376,18 +377,18 @@ describe('providers', () => { parent: { viewProviders: [{provide: String, useValue: 'From viewProviders'}], componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From viewProviders'); }, - directiveAssertion: () => { expect(ΔdirectiveInject(String)).toEqual('From module'); } + () => { expect(ɵɵdirectiveInject(String)).toEqual('From viewProviders'); }, + directiveAssertion: () => { expect(ɵɵdirectiveInject(String)).toEqual('From module'); } }, viewChild: { componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From viewProviders'); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual('From viewProviders'); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From viewProviders'); } + () => { expect(ɵɵdirectiveInject(String)).toEqual('From viewProviders'); } }, contentChild: { - componentAssertion: () => { expect(ΔdirectiveInject(String)).toEqual('From module'); }, - directiveAssertion: () => { expect(ΔdirectiveInject(String)).toEqual('From module'); } + componentAssertion: () => { expect(ɵɵdirectiveInject(String)).toEqual('From module'); }, + directiveAssertion: () => { expect(ɵɵdirectiveInject(String)).toEqual('From module'); } }, ngModule: MyModule }); @@ -399,21 +400,21 @@ describe('providers', () => { providers: [{provide: String, useValue: 'From providers'}], viewProviders: [{provide: String, useValue: 'From viewProviders'}], componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From viewProviders'); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual('From viewProviders'); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From providers'); } + () => { expect(ɵɵdirectiveInject(String)).toEqual('From providers'); } }, viewChild: { componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From viewProviders'); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual('From viewProviders'); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From viewProviders'); } + () => { expect(ɵɵdirectiveInject(String)).toEqual('From viewProviders'); } }, contentChild: { componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From providers'); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual('From providers'); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From providers'); } + () => { expect(ɵɵdirectiveInject(String)).toEqual('From providers'); } }, ngModule: MyModule }); @@ -427,21 +428,21 @@ describe('providers', () => { directiveProviders: [{provide: String, useValue: 'From directive'}], directive2Providers: [{provide: String, useValue: 'Never'}], componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From directive'); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual('From directive'); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From directive'); } + () => { expect(ɵɵdirectiveInject(String)).toEqual('From directive'); } }, viewChild: { componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From directive'); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual('From directive'); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From directive'); } + () => { expect(ɵɵdirectiveInject(String)).toEqual('From directive'); } }, contentChild: { componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From directive'); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual('From directive'); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From directive'); } + () => { expect(ɵɵdirectiveInject(String)).toEqual('From directive'); } }, ngModule: MyModule }); @@ -454,21 +455,21 @@ describe('providers', () => { directiveProviders: [{provide: String, useValue: 'From directive'}], directive2Providers: [{provide: String, useValue: 'Never'}], componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From directive'); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual('From directive'); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From directive'); } + () => { expect(ɵɵdirectiveInject(String)).toEqual('From directive'); } }, viewChild: { componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From directive'); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual('From directive'); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From directive'); } + () => { expect(ɵɵdirectiveInject(String)).toEqual('From directive'); } }, contentChild: { componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From directive'); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual('From directive'); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From directive'); } + () => { expect(ɵɵdirectiveInject(String)).toEqual('From directive'); } }, ngModule: MyModule }); @@ -481,21 +482,21 @@ describe('providers', () => { directiveProviders: [{provide: String, useValue: 'From directive'}], directive2Providers: [{provide: String, useValue: 'Never'}], componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From viewProviders'); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual('From viewProviders'); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From directive'); } + () => { expect(ɵɵdirectiveInject(String)).toEqual('From directive'); } }, viewChild: { componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From viewProviders'); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual('From viewProviders'); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From viewProviders'); } + () => { expect(ɵɵdirectiveInject(String)).toEqual('From viewProviders'); } }, contentChild: { componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From directive'); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual('From directive'); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From directive'); } + () => { expect(ɵɵdirectiveInject(String)).toEqual('From directive'); } }, ngModule: MyModule }); @@ -509,21 +510,21 @@ describe('providers', () => { directiveProviders: [{provide: String, useValue: 'From directive'}], directive2Providers: [{provide: String, useValue: 'Never'}], componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From viewProviders'); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual('From viewProviders'); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From directive'); } + () => { expect(ɵɵdirectiveInject(String)).toEqual('From directive'); } }, viewChild: { componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From viewProviders'); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual('From viewProviders'); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From viewProviders'); } + () => { expect(ɵɵdirectiveInject(String)).toEqual('From viewProviders'); } }, contentChild: { componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From directive'); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual('From directive'); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual('From directive'); } + () => { expect(ɵɵdirectiveInject(String)).toEqual('From directive'); } }, ngModule: MyModule }); @@ -533,7 +534,7 @@ describe('providers', () => { describe('multi', () => { class MyModule { - static ngInjectorDef = ΔdefineInjector({ + static ngInjectorDef = ɵɵdefineInjector({ factory: () => new MyModule(), providers: [{provide: String, useValue: 'From module', multi: true}] }); @@ -544,18 +545,21 @@ describe('providers', () => { expectProvidersScenario({ parent: { componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual(['From module']); }, - directiveAssertion: () => { expect(ΔdirectiveInject(String)).toEqual(['From module']); } + () => { expect(ɵɵdirectiveInject(String)).toEqual(['From module']); }, + directiveAssertion: + () => { expect(ɵɵdirectiveInject(String)).toEqual(['From module']); } }, viewChild: { componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual(['From module']); }, - directiveAssertion: () => { expect(ΔdirectiveInject(String)).toEqual(['From module']); } + () => { expect(ɵɵdirectiveInject(String)).toEqual(['From module']); }, + directiveAssertion: + () => { expect(ɵɵdirectiveInject(String)).toEqual(['From module']); } }, contentChild: { componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual(['From module']); }, - directiveAssertion: () => { expect(ΔdirectiveInject(String)).toEqual(['From module']); } + () => { expect(ɵɵdirectiveInject(String)).toEqual(['From module']); }, + directiveAssertion: + () => { expect(ɵɵdirectiveInject(String)).toEqual(['From module']); } }, ngModule: MyModule }); @@ -566,21 +570,21 @@ describe('providers', () => { parent: { providers: [{provide: String, useValue: 'From providers', multi: true}], componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual(['From providers']); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual(['From providers']); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual(['From providers']); } + () => { expect(ɵɵdirectiveInject(String)).toEqual(['From providers']); } }, viewChild: { componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual(['From providers']); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual(['From providers']); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual(['From providers']); } + () => { expect(ɵɵdirectiveInject(String)).toEqual(['From providers']); } }, contentChild: { componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual(['From providers']); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual(['From providers']); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual(['From providers']); } + () => { expect(ɵɵdirectiveInject(String)).toEqual(['From providers']); } }, ngModule: MyModule }); @@ -591,19 +595,21 @@ describe('providers', () => { parent: { viewProviders: [{provide: String, useValue: 'From viewProviders', multi: true}], componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual(['From viewProviders']); }, - directiveAssertion: () => { expect(ΔdirectiveInject(String)).toEqual(['From module']); } + () => { expect(ɵɵdirectiveInject(String)).toEqual(['From viewProviders']); }, + directiveAssertion: + () => { expect(ɵɵdirectiveInject(String)).toEqual(['From module']); } }, viewChild: { componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual(['From viewProviders']); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual(['From viewProviders']); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual(['From viewProviders']); } + () => { expect(ɵɵdirectiveInject(String)).toEqual(['From viewProviders']); } }, contentChild: { componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual(['From module']); }, - directiveAssertion: () => { expect(ΔdirectiveInject(String)).toEqual(['From module']); } + () => { expect(ɵɵdirectiveInject(String)).toEqual(['From module']); }, + directiveAssertion: + () => { expect(ɵɵdirectiveInject(String)).toEqual(['From module']); } }, ngModule: MyModule }); @@ -615,24 +621,24 @@ describe('providers', () => { providers: [{provide: String, useValue: 'From providers', multi: true}], viewProviders: [{provide: String, useValue: 'From viewProviders', multi: true}], componentAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual(['From providers', 'From viewProviders']); + expect(ɵɵdirectiveInject(String)).toEqual(['From providers', 'From viewProviders']); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual(['From providers']); } + () => { expect(ɵɵdirectiveInject(String)).toEqual(['From providers']); } }, viewChild: { componentAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual(['From providers', 'From viewProviders']); + expect(ɵɵdirectiveInject(String)).toEqual(['From providers', 'From viewProviders']); }, directiveAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual(['From providers', 'From viewProviders']); + expect(ɵɵdirectiveInject(String)).toEqual(['From providers', 'From viewProviders']); } }, contentChild: { componentAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual(['From providers']); }, + () => { expect(ɵɵdirectiveInject(String)).toEqual(['From providers']); }, directiveAssertion: - () => { expect(ΔdirectiveInject(String)).toEqual(['From providers']); } + () => { expect(ɵɵdirectiveInject(String)).toEqual(['From providers']); } }, ngModule: MyModule }); @@ -646,26 +652,26 @@ describe('providers', () => { directiveProviders: [{provide: String, useValue: 'From directive 1', multi: true}], directive2Providers: [{provide: String, useValue: 'From directive 2', multi: true}], componentAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual(['From directive 2', 'From directive 1']); + expect(ɵɵdirectiveInject(String)).toEqual(['From directive 2', 'From directive 1']); }, directiveAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual(['From directive 2', 'From directive 1']); + expect(ɵɵdirectiveInject(String)).toEqual(['From directive 2', 'From directive 1']); } }, viewChild: { componentAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual(['From directive 2', 'From directive 1']); + expect(ɵɵdirectiveInject(String)).toEqual(['From directive 2', 'From directive 1']); }, directiveAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual(['From directive 2', 'From directive 1']); + expect(ɵɵdirectiveInject(String)).toEqual(['From directive 2', 'From directive 1']); } }, contentChild: { componentAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual(['From directive 2', 'From directive 1']); + expect(ɵɵdirectiveInject(String)).toEqual(['From directive 2', 'From directive 1']); }, directiveAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual(['From directive 2', 'From directive 1']); + expect(ɵɵdirectiveInject(String)).toEqual(['From directive 2', 'From directive 1']); } }, ngModule: MyModule @@ -679,36 +685,36 @@ describe('providers', () => { directiveProviders: [{provide: String, useValue: 'From directive 1', multi: true}], directive2Providers: [{provide: String, useValue: 'From directive 2', multi: true}], componentAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual([ + expect(ɵɵdirectiveInject(String)).toEqual([ 'From providers', 'From directive 2', 'From directive 1' ]); }, directiveAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual([ + expect(ɵɵdirectiveInject(String)).toEqual([ 'From providers', 'From directive 2', 'From directive 1' ]); } }, viewChild: { componentAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual([ + expect(ɵɵdirectiveInject(String)).toEqual([ 'From providers', 'From directive 2', 'From directive 1' ]); }, directiveAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual([ + expect(ɵɵdirectiveInject(String)).toEqual([ 'From providers', 'From directive 2', 'From directive 1' ]); } }, contentChild: { componentAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual([ + expect(ɵɵdirectiveInject(String)).toEqual([ 'From providers', 'From directive 2', 'From directive 1' ]); }, directiveAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual([ + expect(ɵɵdirectiveInject(String)).toEqual([ 'From providers', 'From directive 2', 'From directive 1' ]); } @@ -724,32 +730,32 @@ describe('providers', () => { directiveProviders: [{provide: String, useValue: 'From directive 1', multi: true}], directive2Providers: [{provide: String, useValue: 'From directive 2', multi: true}], componentAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual([ + expect(ɵɵdirectiveInject(String)).toEqual([ 'From viewProviders', 'From directive 2', 'From directive 1' ]); }, directiveAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual(['From directive 2', 'From directive 1']); + expect(ɵɵdirectiveInject(String)).toEqual(['From directive 2', 'From directive 1']); } }, viewChild: { componentAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual([ + expect(ɵɵdirectiveInject(String)).toEqual([ 'From viewProviders', 'From directive 2', 'From directive 1' ]); }, directiveAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual([ + expect(ɵɵdirectiveInject(String)).toEqual([ 'From viewProviders', 'From directive 2', 'From directive 1' ]); } }, contentChild: { componentAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual(['From directive 2', 'From directive 1']); + expect(ɵɵdirectiveInject(String)).toEqual(['From directive 2', 'From directive 1']); }, directiveAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual(['From directive 2', 'From directive 1']); + expect(ɵɵdirectiveInject(String)).toEqual(['From directive 2', 'From directive 1']); } }, ngModule: MyModule @@ -764,36 +770,36 @@ describe('providers', () => { directiveProviders: [{provide: String, useValue: 'From directive 1', multi: true}], directive2Providers: [{provide: String, useValue: 'From directive 2', multi: true}], componentAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual([ + expect(ɵɵdirectiveInject(String)).toEqual([ 'From providers', 'From viewProviders', 'From directive 2', 'From directive 1' ]); }, directiveAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual([ + expect(ɵɵdirectiveInject(String)).toEqual([ 'From providers', 'From directive 2', 'From directive 1' ]); } }, viewChild: { componentAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual([ + expect(ɵɵdirectiveInject(String)).toEqual([ 'From providers', 'From viewProviders', 'From directive 2', 'From directive 1' ]); }, directiveAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual([ + expect(ɵɵdirectiveInject(String)).toEqual([ 'From providers', 'From viewProviders', 'From directive 2', 'From directive 1' ]); } }, contentChild: { componentAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual([ + expect(ɵɵdirectiveInject(String)).toEqual([ 'From providers', 'From directive 2', 'From directive 1' ]); }, directiveAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual([ + expect(ɵɵdirectiveInject(String)).toEqual([ 'From providers', 'From directive 2', 'From directive 1' ]); } @@ -809,20 +815,20 @@ describe('providers', () => { @Injectable({providedIn: 'root'}) class FooForRoot { static ngInjectableDef = - ΔdefineInjectable({factory: () => new FooForRoot(), providedIn: 'root'}); + ɵɵdefineInjectable({factory: () => new FooForRoot(), providedIn: 'root'}); } expectProvidersScenario({ parent: { componentAssertion: - () => { expect(ΔdirectiveInject(FooForRoot) instanceof FooForRoot).toBeTruthy(); } + () => { expect(ɵɵdirectiveInject(FooForRoot) instanceof FooForRoot).toBeTruthy(); } } }); }); it('should work with a module', () => { class MyModule { - static ngInjectorDef = ΔdefineInjector({ + static ngInjectorDef = ɵɵdefineInjector({ factory: () => new MyModule(), providers: [{provide: String, useValue: 'From module'}] }); @@ -831,13 +837,14 @@ describe('providers', () => { @Injectable({providedIn: MyModule}) class FooForModule { static ngInjectableDef = - ΔdefineInjectable({factory: () => new FooForModule(), providedIn: MyModule}); + ɵɵdefineInjectable({factory: () => new FooForModule(), providedIn: MyModule}); } expectProvidersScenario({ parent: { - componentAssertion: - () => { expect(ΔdirectiveInject(FooForModule) instanceof FooForModule).toBeTruthy(); } + componentAssertion: () => { + expect(ɵɵdirectiveInject(FooForModule) instanceof FooForModule).toBeTruthy(); + } }, ngModule: MyModule }); @@ -852,20 +859,20 @@ describe('providers', () => { class Repeated { constructor(private s: String, private n: Number) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Repeated, selectors: [['repeated']], - factory: () => new Repeated(ΔdirectiveInject(String), ΔdirectiveInject(Number)), + factory: () => new Repeated(ɵɵdirectiveInject(String), ɵɵdirectiveInject(Number)), consts: 2, vars: 2, template: function(fs: RenderFlags, ctx: Repeated) { if (fs & RenderFlags.Create) { - Δtext(0); - Δtext(1); + ɵɵtext(0); + ɵɵtext(1); } if (fs & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.s)); - ΔtextBinding(1, Δbind(ctx.n)); + ɵɵtextBinding(0, ɵɵbind(ctx.s)); + ɵɵtextBinding(1, ɵɵbind(ctx.n)); } } }); @@ -882,7 +889,7 @@ describe('providers', () => { [{provide: String, useValue: 'foo'}, {provide: Number, useValue: 2, multi: true}], }) class ComponentWithProviders { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ComponentWithProviders, selectors: [['component-with-providers']], factory: () => new ComponentWithProviders(), @@ -890,28 +897,28 @@ describe('providers', () => { vars: 0, template: function(fs: RenderFlags, ctx: ComponentWithProviders) { if (fs & RenderFlags.Create) { - ΔelementStart(0, 'div'); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } if (fs & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { for (let i = 0; i < 3; i++) { - let rf1 = ΔembeddedViewStart(1, 1, 0); + let rf1 = ɵɵembeddedViewStart(1, 1, 0); { if (rf1 & RenderFlags.Create) { - Δelement(0, 'repeated'); + ɵɵelement(0, 'repeated'); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, features: [ - ΔProvidersFeature( + ɵɵProvidersFeature( [{provide: Number, useValue: 1, multi: true}], [{provide: String, useValue: 'foo'}, {provide: Number, useValue: 2, multi: true}]), ], @@ -935,24 +942,24 @@ describe('providers', () => { class Repeated { constructor(private s: String, private n: Number) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Repeated, selectors: [['repeated']], - factory: () => new Repeated(ΔdirectiveInject(String), ΔdirectiveInject(Number)), + factory: () => new Repeated(ɵɵdirectiveInject(String), ɵɵdirectiveInject(Number)), consts: 2, vars: 2, template: function(fs: RenderFlags, ctx: Repeated) { if (fs & RenderFlags.Create) { - Δtext(0); - Δtext(1); + ɵɵtext(0); + ɵɵtext(1); } if (fs & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.s)); - ΔtextBinding(1, Δbind(ctx.n)); + ɵɵtextBinding(0, ɵɵbind(ctx.s)); + ɵɵtextBinding(1, ɵɵbind(ctx.n)); } }, features: [ - ΔProvidersFeature( + ɵɵProvidersFeature( [{provide: Number, useValue: 1, multi: true}], [{provide: String, useValue: 'bar'}, {provide: Number, useValue: 2, multi: true}]), ], @@ -968,7 +975,7 @@ describe('providers', () => { viewProviders: [{provide: toString, useValue: 'foo'}], }) class ComponentWithProviders { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ComponentWithProviders, selectors: [['component-with-providers']], factory: () => new ComponentWithProviders(), @@ -976,27 +983,27 @@ describe('providers', () => { vars: 0, template: function(fs: RenderFlags, ctx: ComponentWithProviders) { if (fs & RenderFlags.Create) { - ΔelementStart(0, 'div'); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } if (fs & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { for (let i = 0; i < 3; i++) { - let rf1 = ΔembeddedViewStart(1, 1, 0); + let rf1 = ɵɵembeddedViewStart(1, 1, 0); { if (rf1 & RenderFlags.Create) { - Δelement(0, 'repeated'); + ɵɵelement(0, 'repeated'); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, - features: [ΔProvidersFeature([], [{provide: String, useValue: 'foo'}])], + features: [ɵɵProvidersFeature([], [{provide: String, useValue: 'foo'}])], directives: [Repeated] }); } @@ -1017,18 +1024,18 @@ describe('providers', () => { class EmbeddedComponent { constructor(private s: String) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: EmbeddedComponent, selectors: [['embedded-cmp']], - factory: () => new EmbeddedComponent(ΔdirectiveInject(String)), + factory: () => new EmbeddedComponent(ɵɵdirectiveInject(String)), consts: 1, vars: 1, template: (rf: RenderFlags, cmp: EmbeddedComponent) => { if (rf & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δinterpolation1('', cmp.s, '')); + ɵɵtextBinding(0, ɵɵinterpolation1('', cmp.s, '')); } } }); @@ -1038,20 +1045,20 @@ describe('providers', () => { class HostComponent { constructor(public vcref: ViewContainerRef, public cfr: ComponentFactoryResolver) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: HostComponent, selectors: [['host-cmp']], factory: () => hostComponent = new HostComponent( - ΔdirectiveInject(ViewContainerRef as any), injectComponentFactoryResolver()), + ɵɵdirectiveInject(ViewContainerRef as any), injectComponentFactoryResolver()), consts: 1, vars: 0, template: (rf: RenderFlags, cmp: HostComponent) => { if (rf & RenderFlags.Create) { - Δtext(0, 'foo'); + ɵɵtext(0, 'foo'); } }, features: [ - ΔProvidersFeature([{provide: String, useValue: 'From host component'}]), + ɵɵProvidersFeature([{provide: String, useValue: 'From host component'}]), ], }); } @@ -1063,7 +1070,7 @@ describe('providers', () => { class AppComponent { constructor() {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: AppComponent, selectors: [['app-cmp']], factory: () => new AppComponent(), @@ -1071,11 +1078,11 @@ describe('providers', () => { vars: 0, template: (rf: RenderFlags, cmp: AppComponent) => { if (rf & RenderFlags.Create) { - Δelement(0, 'host-cmp'); + ɵɵelement(0, 'host-cmp'); } }, features: [ - ΔProvidersFeature([{provide: String, useValue: 'From app component'}]), + ɵɵProvidersFeature([{provide: String, useValue: 'From app component'}]), ], directives: [HostComponent] }); @@ -1104,7 +1111,7 @@ describe('providers', () => { expect(fixture.html).toEqual('foo'); class MyAppModule { - static ngInjectorDef = ΔdefineInjector({ + static ngInjectorDef = ɵɵdefineInjector({ factory: () => new MyAppModule(), imports: [], providers: [ @@ -1147,7 +1154,7 @@ describe('providers', () => { constructor(public value: String) {} static ngInjectableDef = - ΔdefineInjectable({factory: () => new MyService(Δinject(String))}); + ɵɵdefineInjectable({factory: () => new MyService(ɵɵinject(String))}); } expectProvidersScenario({ @@ -1155,8 +1162,8 @@ describe('providers', () => { providers: [MyService, {provide: String, useValue: 'providers'}], viewProviders: [{provide: String, useValue: 'viewProviders'}], componentAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual('viewProviders'); - expect(ΔdirectiveInject(MyService).value).toEqual('providers'); + expect(ɵɵdirectiveInject(String)).toEqual('viewProviders'); + expect(ɵɵdirectiveInject(MyService).value).toEqual('providers'); } } }); @@ -1164,7 +1171,7 @@ describe('providers', () => { it('should make sure that parent service does not see overrides in child directives', () => { class Greeter { - static ngInjectableDef = ΔdefineInjectable({factory: () => new Greeter(Δinject(String))}); + static ngInjectableDef = ɵɵdefineInjectable({factory: () => new Greeter(ɵɵinject(String))}); constructor(public greeting: String) {} } @@ -1175,7 +1182,7 @@ describe('providers', () => { viewChild: { providers: [{provide: String, useValue: 'view'}], componentAssertion: - () => { expect(ΔdirectiveInject(Greeter).greeting).toEqual('parent'); }, + () => { expect(ɵɵdirectiveInject(Greeter).greeting).toEqual('parent'); }, }, }); }); @@ -1183,7 +1190,7 @@ describe('providers', () => { describe('injection flags', () => { class MyModule { - static ngInjectorDef = ΔdefineInjector( + static ngInjectorDef = ɵɵdefineInjector( {factory: () => new MyModule(), providers: [{provide: String, useValue: 'Module'}]}); } it('should not fall through to ModuleInjector if flags limit the scope', () => { @@ -1191,9 +1198,9 @@ describe('providers', () => { ngModule: MyModule, parent: { componentAssertion: () => { - expect(ΔdirectiveInject(String)).toEqual('Module'); - expect(ΔdirectiveInject(String, InjectFlags.Optional | InjectFlags.Self)).toBeNull(); - expect(ΔdirectiveInject(String, InjectFlags.Optional | InjectFlags.Host)).toBeNull(); + expect(ɵɵdirectiveInject(String)).toEqual('Module'); + expect(ɵɵdirectiveInject(String, InjectFlags.Optional | InjectFlags.Self)).toBeNull(); + expect(ɵɵdirectiveInject(String, InjectFlags.Optional | InjectFlags.Host)).toBeNull(); } } }); @@ -1206,7 +1213,7 @@ describe('providers', () => { class SomeInj implements Some { constructor(public location: String) {} - static ngInjectableDef = ΔdefineInjectable({factory: () => new SomeInj(Δinject(String))}); + static ngInjectableDef = ɵɵdefineInjectable({factory: () => new SomeInj(ɵɵinject(String))}); } @Component({ @@ -1217,7 +1224,7 @@ describe('providers', () => { class MyComponent { constructor() {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComponent, selectors: [['my-cmp']], factory: () => new MyComponent(), @@ -1225,11 +1232,11 @@ describe('providers', () => { vars: 0, template: (rf: RenderFlags, cmp: MyComponent) => { if (rf & RenderFlags.Create) { - Δelement(0, 'p'); + ɵɵelement(0, 'p'); } }, features: [ - ΔProvidersFeature( + ɵɵProvidersFeature( [{provide: String, useValue: 'From my component'}], [{provide: Number, useValue: 123}]), ], @@ -1244,7 +1251,7 @@ describe('providers', () => { class AppComponent { constructor() {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: AppComponent, selectors: [['app-cmp']], factory: () => new AppComponent(), @@ -1252,11 +1259,11 @@ describe('providers', () => { vars: 0, template: (rf: RenderFlags, cmp: AppComponent) => { if (rf & RenderFlags.Create) { - Δelement(0, 'my-cmp'); + ɵɵelement(0, 'my-cmp'); } }, features: [ - ΔProvidersFeature([ + ɵɵProvidersFeature([ {provide: String, useValue: 'From app component'}, {provide: Some, useClass: SomeInj} ]), ], @@ -1307,18 +1314,18 @@ describe('providers', () => { class MyComponent { constructor(foo: InjectableWithLifeCycleHooks) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComponent, selectors: [['my-comp']], - factory: () => new MyComponent(ΔdirectiveInject(InjectableWithLifeCycleHooks)), + factory: () => new MyComponent(ɵɵdirectiveInject(InjectableWithLifeCycleHooks)), consts: 1, vars: 0, template: (rf: RenderFlags, ctx: MyComponent) => { if (rf & RenderFlags.Create) { - Δelement(0, 'span'); + ɵɵelement(0, 'span'); } }, - features: [ΔProvidersFeature([InjectableWithLifeCycleHooks])] + features: [ɵɵProvidersFeature([InjectableWithLifeCycleHooks])] }); } @@ -1334,7 +1341,7 @@ describe('providers', () => { class App { public condition = true; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: App, selectors: [['app-cmp']], factory: () => new App(), @@ -1342,24 +1349,24 @@ describe('providers', () => { vars: 0, template: (rf: RenderFlags, ctx: App) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { if (ctx.condition) { - let rf1 = ΔembeddedViewStart(1, 2, 1); + let rf1 = ɵɵembeddedViewStart(1, 2, 1); { if (rf1 & RenderFlags.Create) { - Δelement(0, 'my-comp'); + ɵɵelement(0, 'my-comp'); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, directives: [MyComponent] @@ -1409,7 +1416,7 @@ function expectProvidersScenario(defs: { } class ViewChildComponent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ViewChildComponent, selectors: [['view-child']], consts: 1, @@ -1417,27 +1424,27 @@ function expectProvidersScenario(defs: { factory: () => testComponentInjection(defs.viewChild, new ViewChildComponent()), template: function(fs: RenderFlags, ctx: ViewChildComponent) { if (fs & RenderFlags.Create) { - Δtext(0, 'view-child'); + ɵɵtext(0, 'view-child'); } }, features: defs.viewChild && [ - ΔProvidersFeature(defs.viewChild.providers || [], defs.viewChild.viewProviders || []), + ɵɵProvidersFeature(defs.viewChild.providers || [], defs.viewChild.viewProviders || []), ], }); } class ViewChildDirective { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: ViewChildDirective, selectors: [['view-child']], factory: () => testDirectiveInjection(defs.viewChild, new ViewChildDirective()), - features: defs.viewChild && [ΔProvidersFeature(defs.viewChild.directiveProviders || [])], + features: defs.viewChild && [ɵɵProvidersFeature(defs.viewChild.directiveProviders || [])], }); } class ContentChildComponent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ContentChildComponent, selectors: [['content-child']], consts: 1, @@ -1445,28 +1452,28 @@ function expectProvidersScenario(defs: { factory: () => testComponentInjection(defs.contentChild, new ContentChildComponent()), template: function(fs: RenderFlags, ctx: ParentComponent) { if (fs & RenderFlags.Create) { - Δtext(0, 'content-child'); + ɵɵtext(0, 'content-child'); } }, features: defs.contentChild && - [ΔProvidersFeature( + [ɵɵProvidersFeature( defs.contentChild.providers || [], defs.contentChild.viewProviders || [])], }); } class ContentChildDirective { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: ContentChildDirective, selectors: [['content-child']], factory: () => testDirectiveInjection(defs.contentChild, new ContentChildDirective()), features: - defs.contentChild && [ΔProvidersFeature(defs.contentChild.directiveProviders || [])], + defs.contentChild && [ɵɵProvidersFeature(defs.contentChild.directiveProviders || [])], }); } class ParentComponent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ParentComponent, selectors: [['parent']], consts: 1, @@ -1474,36 +1481,36 @@ function expectProvidersScenario(defs: { factory: () => testComponentInjection(defs.parent, new ParentComponent()), template: function(fs: RenderFlags, ctx: ParentComponent) { if (fs & RenderFlags.Create) { - Δelement(0, 'view-child'); + ɵɵelement(0, 'view-child'); } }, features: defs.parent && - [ΔProvidersFeature(defs.parent.providers || [], defs.parent.viewProviders || [])], + [ɵɵProvidersFeature(defs.parent.providers || [], defs.parent.viewProviders || [])], directives: [ViewChildComponent, ViewChildDirective] }); } class ParentDirective { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: ParentDirective, selectors: [['parent']], factory: () => testDirectiveInjection(defs.parent, new ParentDirective()), - features: defs.parent && [ΔProvidersFeature(defs.parent.directiveProviders || [])], + features: defs.parent && [ɵɵProvidersFeature(defs.parent.directiveProviders || [])], }); } class ParentDirective2 { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: ParentDirective2, selectors: [['parent']], factory: () => testDirectiveInjection(defs.parent, new ParentDirective2()), - features: defs.parent && [ΔProvidersFeature(defs.parent.directive2Providers || [])], + features: defs.parent && [ɵɵProvidersFeature(defs.parent.directive2Providers || [])], }); } class App { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: App, selectors: [['app']], consts: 2, @@ -1511,13 +1518,13 @@ function expectProvidersScenario(defs: { factory: () => testComponentInjection(defs.app, new App()), template: function(fs: RenderFlags, ctx: App) { if (fs & RenderFlags.Create) { - ΔelementStart(0, 'parent'); - Δelement(1, 'content-child'); - ΔelementEnd(); + ɵɵelementStart(0, 'parent'); + ɵɵelement(1, 'content-child'); + ɵɵelementEnd(); } }, features: - defs.app && [ΔProvidersFeature(defs.app.providers || [], defs.app.viewProviders || [])], + defs.app && [ɵɵProvidersFeature(defs.app.providers || [], defs.app.viewProviders || [])], directives: [ ParentComponent, ParentDirective2, ParentDirective, ContentChildComponent, ContentChildDirective diff --git a/packages/core/test/render3/pure_function_spec.ts b/packages/core/test/render3/pure_function_spec.ts index a8978585a8..2824d8ee2a 100644 --- a/packages/core/test/render3/pure_function_spec.ts +++ b/packages/core/test/render3/pure_function_spec.ts @@ -5,10 +5,10 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import {AttributeMarker, ΔdefineComponent, Δtemplate} from '../../src/render3/index'; -import {Δbind, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, Δelement, ΔelementEnd, ΔelementProperty, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, ΔnextContext} from '../../src/render3/instructions/all'; +import {AttributeMarker, ɵɵdefineComponent, ɵɵtemplate} from '../../src/render3/index'; +import {ɵɵbind, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵelement, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵnextContext} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; -import {ΔpureFunction1, ΔpureFunction2, ΔpureFunction3, ΔpureFunction4, ΔpureFunction5, ΔpureFunction6, ΔpureFunction7, ΔpureFunction8, ΔpureFunctionV} from '../../src/render3/pure_function'; +import {ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV} from '../../src/render3/pure_function'; import {ComponentFixture, createComponent, getDirectiveOnNode, renderToHtml} from '../../test/render3/render_util'; import {NgIf} from './common_with_def'; @@ -20,7 +20,7 @@ describe('array literals', () => { // TODO(issue/24571): remove '!'. names !: string[]; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComp, selectors: [['my-comp']], factory: function MyComp_Factory() { return myComp = new MyComp(); }, @@ -39,10 +39,10 @@ describe('array literals', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'my-comp'); + ɵɵelement(0, 'my-comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'names', Δbind(ΔpureFunction1(1, e0_ff, ctx.customName))); + ɵɵelementProperty(0, 'names', ɵɵbind(ɵɵpureFunction1(1, e0_ff, ctx.customName))); } }, 1, 3, directives); @@ -75,11 +75,11 @@ describe('array literals', () => { function IfTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'my-comp'); + ɵɵelement(0, 'my-comp'); } if (rf & RenderFlags.Update) { - const comp = ΔnextContext(); - ΔelementProperty(0, 'names', Δbind(ΔpureFunction1(1, e0_ff, comp.customName))); + const comp = ɵɵnextContext(); + ɵɵelementProperty(0, 'names', ɵɵbind(ɵɵpureFunction1(1, e0_ff, comp.customName))); } } @@ -88,12 +88,12 @@ describe('array literals', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, IfTemplate, 1, 3, 'my-comp', [AttributeMarker.Bindings, 'names', AttributeMarker.Template, 'ngIf']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'ngIf', Δbind(ctx.showing)); + ɵɵelementProperty(0, 'ngIf', ɵɵbind(ctx.showing)); } }, 1, 1, [MyComp, NgIf]); @@ -114,7 +114,7 @@ describe('array literals', () => { // TODO(issue/24571): remove '!'. names2 !: string[]; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ManyPropComp, selectors: [['many-prop-comp']], factory: function ManyPropComp_Factory() { return manyPropComp = new ManyPropComp(); }, @@ -134,11 +134,11 @@ describe('array literals', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'many-prop-comp'); + ɵɵelement(0, 'many-prop-comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'names1', Δbind(ΔpureFunction1(2, e0_ff, ctx.customName))); - ΔelementProperty(0, 'names2', Δbind(ΔpureFunction1(4, e0_ff_1, ctx.customName2))); + ɵɵelementProperty(0, 'names1', ɵɵbind(ɵɵpureFunction1(2, e0_ff, ctx.customName))); + ɵɵelementProperty(0, 'names2', ɵɵbind(ɵɵpureFunction1(4, e0_ff_1, ctx.customName2))); } }, 1, 6, [ManyPropComp]); @@ -170,7 +170,7 @@ describe('array literals', () => { return arr; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ParentComp, selectors: [['parent-comp']], factory: () => new ParentComp(), @@ -178,13 +178,13 @@ describe('array literals', () => { vars: 3, template: function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'my-comp'); + ɵɵelementStart(0, 'my-comp'); myComps.push(getDirectiveOnNode(0)); - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty( - 0, 'names', Δbind(ctx.someFn(ΔpureFunction1(1, e0_ff, ctx.customName)))); + ɵɵelementProperty( + 0, 'names', ɵɵbind(ctx.someFn(ɵɵpureFunction1(1, e0_ff, ctx.customName)))); } }, directives: directives @@ -193,8 +193,8 @@ describe('array literals', () => { const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'parent-comp'); - Δelement(1, 'parent-comp'); + ɵɵelement(0, 'parent-comp'); + ɵɵelement(1, 'parent-comp'); } }, 2, 0, [ParentComp]); @@ -218,11 +218,11 @@ describe('array literals', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'my-comp'); + ɵɵelement(0, 'my-comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty( - 0, 'names', Δbind(ΔpureFunction2(1, e0_ff, ctx.customName, ctx.customName2))); + ɵɵelementProperty( + 0, 'names', ɵɵbind(ɵɵpureFunction2(1, e0_ff, ctx.customName, ctx.customName2))); } }, 1, 4, directives); @@ -279,37 +279,38 @@ describe('array literals', () => { function Template(rf: RenderFlags, c: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'my-comp'); + ɵɵelementStart(0, 'my-comp'); f3Comp = getDirectiveOnNode(0); - ΔelementEnd(); - ΔelementStart(1, 'my-comp'); + ɵɵelementEnd(); + ɵɵelementStart(1, 'my-comp'); f4Comp = getDirectiveOnNode(1); - ΔelementEnd(); - ΔelementStart(2, 'my-comp'); + ɵɵelementEnd(); + ɵɵelementStart(2, 'my-comp'); f5Comp = getDirectiveOnNode(2); - ΔelementEnd(); - ΔelementStart(3, 'my-comp'); + ɵɵelementEnd(); + ɵɵelementStart(3, 'my-comp'); f6Comp = getDirectiveOnNode(3); - ΔelementEnd(); - ΔelementStart(4, 'my-comp'); + ɵɵelementEnd(); + ɵɵelementStart(4, 'my-comp'); f7Comp = getDirectiveOnNode(4); - ΔelementEnd(); - ΔelementStart(5, 'my-comp'); + ɵɵelementEnd(); + ɵɵelementStart(5, 'my-comp'); f8Comp = getDirectiveOnNode(5); - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'names', Δbind(ΔpureFunction3(6, e0_ff, c[5], c[6], c[7]))); - ΔelementProperty(1, 'names', Δbind(ΔpureFunction4(10, e2_ff, c[4], c[5], c[6], c[7]))); - ΔelementProperty( - 2, 'names', Δbind(ΔpureFunction5(15, e4_ff, c[3], c[4], c[5], c[6], c[7]))); - ΔelementProperty( - 3, 'names', Δbind(ΔpureFunction6(21, e6_ff, c[2], c[3], c[4], c[5], c[6], c[7]))); - ΔelementProperty( - 4, 'names', Δbind(ΔpureFunction7(28, e8_ff, c[1], c[2], c[3], c[4], c[5], c[6], c[7]))); - ΔelementProperty( + ɵɵelementProperty(0, 'names', ɵɵbind(ɵɵpureFunction3(6, e0_ff, c[5], c[6], c[7]))); + ɵɵelementProperty(1, 'names', ɵɵbind(ɵɵpureFunction4(10, e2_ff, c[4], c[5], c[6], c[7]))); + ɵɵelementProperty( + 2, 'names', ɵɵbind(ɵɵpureFunction5(15, e4_ff, c[3], c[4], c[5], c[6], c[7]))); + ɵɵelementProperty( + 3, 'names', ɵɵbind(ɵɵpureFunction6(21, e6_ff, c[2], c[3], c[4], c[5], c[6], c[7]))); + ɵɵelementProperty( + 4, 'names', + ɵɵbind(ɵɵpureFunction7(28, e8_ff, c[1], c[2], c[3], c[4], c[5], c[6], c[7]))); + ɵɵelementProperty( 5, 'names', - Δbind(ΔpureFunction8(36, e10_ff, c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7]))); + ɵɵbind(ɵɵpureFunction8(36, e10_ff, c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7]))); } } @@ -352,12 +353,12 @@ describe('array literals', () => { */ function Template(rf: RenderFlags, c: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'my-comp'); + ɵɵelement(0, 'my-comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty( - 0, 'names', Δbind(ΔpureFunctionV(3, e0_ff, [ - c[0], c[1], c[2], c[3], ΔpureFunction1(1, e0_ff_1, c[4]), c[5], c[6], c[7], c[8] + ɵɵelementProperty( + 0, 'names', ɵɵbind(ɵɵpureFunctionV(3, e0_ff, [ + c[0], c[1], c[2], c[3], ɵɵpureFunction1(1, e0_ff_1, c[4]), c[5], c[6], c[7], c[8] ]))); } } @@ -386,7 +387,7 @@ describe('object literals', () => { // TODO(issue/24571): remove '!'. config !: {[key: string]: any}; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ObjectComp, selectors: [['object-comp']], factory: function ObjectComp_Factory() { return objectComp = new ObjectComp(); }, @@ -405,10 +406,10 @@ describe('object literals', () => { /** */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'object-comp'); + ɵɵelement(0, 'object-comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'config', Δbind(ΔpureFunction1(1, e0_ff, ctx.name))); + ɵɵelementProperty(0, 'config', ɵɵbind(ɵɵpureFunction1(1, e0_ff, ctx.name))); } }, 1, 3, defs); @@ -442,14 +443,14 @@ describe('object literals', () => { */ const App = createComponent('app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'object-comp'); + ɵɵelement(0, 'object-comp'); } if (rf & RenderFlags.Update) { - ΔelementProperty( + ɵɵelementProperty( 0, 'config', - Δbind(ΔpureFunction2( + ɵɵbind(ɵɵpureFunction2( 5, e0_ff, ctx.name, - ΔpureFunction1(3, e0_ff_1, ΔpureFunction1(1, e0_ff_2, ctx.duration))))); + ɵɵpureFunction1(3, e0_ff_1, ɵɵpureFunction1(1, e0_ff_2, ctx.duration))))); } }, 1, 8, defs); @@ -511,27 +512,27 @@ describe('object literals', () => { */ function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { for (let i = 0; i < 2; i++) { - let rf1 = ΔembeddedViewStart(0, 1, 4); + let rf1 = ɵɵembeddedViewStart(0, 1, 4); if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'object-comp'); + ɵɵelementStart(0, 'object-comp'); objectComps.push(getDirectiveOnNode(0)); - ΔelementEnd(); + ɵɵelementEnd(); } if (rf1 & RenderFlags.Update) { - ΔelementProperty( - 0, 'config', - Δbind(ΔpureFunction2(1, e0_ff, ctx.configs[i].opacity, ctx.configs[i].duration))); + ɵɵelementProperty( + 0, 'config', ɵɵbind(ɵɵpureFunction2( + 1, e0_ff, ctx.configs[i].opacity, ctx.configs[i].duration))); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } diff --git a/packages/core/test/render3/query_spec.ts b/packages/core/test/render3/query_spec.ts index 033fc2ea72..7d730c8e3a 100644 --- a/packages/core/test/render3/query_spec.ts +++ b/packages/core/test/render3/query_spec.ts @@ -10,13 +10,13 @@ import {NgForOfContext} from '@angular/common'; import {ElementRef, QueryList, TemplateRef, ViewContainerRef} from '@angular/core'; import {EventEmitter} from '../..'; -import {AttributeMarker, detectChanges, ΔProvidersFeature, ΔdefineComponent, ΔdefineDirective} from '../../src/render3/index'; -import {Δbind, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, ΔdirectiveInject, Δelement, ΔelementContainerEnd, ΔelementContainerStart, ΔelementEnd, ΔelementProperty, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, Δload, Δreference, Δtemplate, Δtext} from '../../src/render3/instructions/all'; +import {AttributeMarker, detectChanges, ɵɵProvidersFeature, ɵɵdefineComponent, ɵɵdefineDirective} from '../../src/render3/index'; +import {ɵɵbind, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵdirectiveInject, ɵɵelement, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵload, ɵɵreference, ɵɵtemplate, ɵɵtext} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; -import {query, ΔcontentQuery, ΔloadContentQuery, ΔloadViewQuery, ΔqueryRefresh, ΔviewQuery} from '../../src/render3/query'; +import {query, ɵɵcontentQuery, ɵɵloadContentQuery, ɵɵloadViewQuery, ɵɵqueryRefresh, ɵɵviewQuery} from '../../src/render3/query'; import {getLView} from '../../src/render3/state'; import {getNativeByIndex} from '../../src/render3/util/view_utils'; -import {ΔtemplateRefExtractor} from '../../src/render3/view_engine_compatibility_prebound'; +import {ɵɵtemplateRefExtractor} from '../../src/render3/view_engine_compatibility_prebound'; import {NgForOf, NgIf, NgTemplateOutlet} from './common_with_def'; import {ComponentFixture, TemplateFixture, createComponent, createDirective, getDirectiveOnNode, renderComponent} from './render_util'; @@ -70,9 +70,9 @@ describe('query', () => { * } */ if (rf & RenderFlags.Create) { - ΔelementStart(0, 'child'); - { Δelement(1, 'child'); } - ΔelementEnd(); + ɵɵelementStart(0, 'child'); + { ɵɵelement(1, 'child'); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { child1 = getDirectiveOnNode(0); @@ -82,14 +82,14 @@ describe('query', () => { 2, 0, [Child], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(Child, false, null); - ΔviewQuery(Child, true, null); + ɵɵviewQuery(Child, false, null); + ɵɵviewQuery(Child, true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query0 = tmp as QueryList); - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query1 = tmp as QueryList); } }); @@ -115,18 +115,18 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['child', '']); + ɵɵelement(0, 'div', ['child', '']); elToQuery = getNativeByIndex(0, getLView()); } }, 1, 0, [Child], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(Child, false, ElementRef); + ɵɵviewQuery(Child, false, ElementRef); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -152,19 +152,19 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['child', '', 'otherChild', '']); + ɵɵelementStart(0, 'div', ['child', '', 'otherChild', '']); { otherChildInstance = getDirectiveOnNode(0, 1); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 1, 0, [Child, OtherChild], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(Child, false, OtherChild); + ɵɵviewQuery(Child, false, OtherChild); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -188,17 +188,17 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['child', '']); + ɵɵelement(0, 'div', ['child', '']); } }, 1, 0, [Child, OtherChild], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(Child, false, OtherChild); + ɵɵviewQuery(Child, false, OtherChild); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -219,13 +219,13 @@ describe('query', () => { class MyDirective { constructor(public service: Service) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: MyDirective, selectors: [['', 'myDir', '']], factory: function MyDirective_Factory() { - return directive = new MyDirective(ΔdirectiveInject(Service)); + return directive = new MyDirective(ɵɵdirectiveInject(Service)); }, - features: [ΔProvidersFeature([Service, {provide: Alias, useExisting: Service}])], + features: [ɵɵProvidersFeature([Service, {provide: Alias, useExisting: Service}])], }); } @@ -247,7 +247,7 @@ describe('query', () => { service?: Service; alias?: Alias; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: App, selectors: [['app']], consts: 1, @@ -255,21 +255,22 @@ describe('query', () => { factory: function App_Factory() { return new App(); }, template: function App_Template(rf: RenderFlags, ctx: App) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['myDir']); + ɵɵelement(0, 'div', ['myDir']); } }, viewQuery: function(rf: RenderFlags, ctx: App) { if (rf & RenderFlags.Create) { - ΔviewQuery(MyDirective, false, null); - ΔviewQuery(Service, false, null); - ΔviewQuery(Alias, false, null); + ɵɵviewQuery(MyDirective, false, null); + ɵɵviewQuery(Service, false, null); + ɵɵviewQuery(Alias, false, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.directive = tmp.first); - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && (ctx.service = tmp.first); - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && (ctx.alias = tmp.first); + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && + (ctx.service = tmp.first); + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.alias = tmp.first); } }, directives: [MyDirective] @@ -293,7 +294,7 @@ describe('query', () => { class App { service?: Service; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: App, selectors: [['app']], consts: 1, @@ -301,16 +302,17 @@ describe('query', () => { factory: function App_Factory() { return new App(); }, template: function App_Template(rf: RenderFlags, ctx: App) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['myDir']); + ɵɵelement(0, 'div', ['myDir']); } }, viewQuery: function(rf: RenderFlags, ctx: App) { let tmp: any; if (rf & RenderFlags.Create) { - ΔviewQuery(MyDirective, false, Alias); + ɵɵviewQuery(MyDirective, false, Alias); } if (rf & RenderFlags.Update) { - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && (ctx.service = tmp.first); + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && + (ctx.service = tmp.first); } }, directives: [MyDirective] @@ -339,19 +341,19 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', null, ['foo', '']); + ɵɵelement(0, 'div', null, ['foo', '']); elToQuery = getNativeByIndex(0, getLView()); - Δelement(2, 'div'); + ɵɵelement(2, 'div'); } }, 3, 0, [], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], false, null); + ɵɵviewQuery(['foo'], false, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -377,22 +379,22 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', null, ['foo', '', 'bar', '']); + ɵɵelement(0, 'div', null, ['foo', '', 'bar', '']); elToQuery = getNativeByIndex(0, getLView()); - Δelement(3, 'div'); + ɵɵelement(3, 'div'); } }, 4, 0, [], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], false, null); - ΔviewQuery(['bar'], false, null); + ɵɵviewQuery(['foo'], false, null); + ɵɵviewQuery(['bar'], false, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.fooQuery = tmp as QueryList); - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.barQuery = tmp as QueryList); } }); @@ -424,21 +426,21 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', null, ['foo', '']); + ɵɵelement(0, 'div', null, ['foo', '']); el1ToQuery = getNativeByIndex(0, getLView()); - Δelement(2, 'div'); - Δelement(3, 'div', null, ['bar', '']); + ɵɵelement(2, 'div'); + ɵɵelement(3, 'div', null, ['bar', '']); el2ToQuery = getNativeByIndex(3, getLView()); } }, 5, 0, [], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo', 'bar'], false, null); + ɵɵviewQuery(['foo', 'bar'], false, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -464,19 +466,19 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', null, ['foo', '']); + ɵɵelement(0, 'div', null, ['foo', '']); elToQuery = getNativeByIndex(0, getLView()); - Δelement(2, 'div'); + ɵɵelement(2, 'div'); } }, 3, 0, [], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], false, null); + ɵɵviewQuery(['foo'], false, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -501,19 +503,19 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementContainerStart(0, null, ['foo', '']); + ɵɵelementContainerStart(0, null, ['foo', '']); elToQuery = getNativeByIndex(0, getLView()); - ΔelementContainerEnd(); + ɵɵelementContainerEnd(); } }, 2, 0, [], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], false, ElementRef); + ɵɵviewQuery(['foo'], false, ElementRef); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -537,19 +539,19 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementContainerStart(0, null, ['foo', '']); + ɵɵelementContainerStart(0, null, ['foo', '']); elToQuery = getNativeByIndex(0, getLView()); - ΔelementContainerEnd(); + ɵɵelementContainerEnd(); } }, 2, 0, [], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], true, null); + ɵɵviewQuery(['foo'], true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -599,25 +601,25 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementContainerStart(0); + ɵɵelementContainerStart(0); { - Δelement(1, 'div', null, ['foo', '']); + ɵɵelement(1, 'div', null, ['foo', '']); elToQuery = getNativeByIndex(3, getLView()); } - ΔelementContainerEnd(); + ɵɵelementContainerEnd(); } }, 3, 0, [], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], true, ElementRef); - ΔviewQuery(['foo'], false, ElementRef); + ɵɵviewQuery(['foo'], true, ElementRef); + ɵɵviewQuery(['foo'], false, ElementRef); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.deep = tmp as QueryList); - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.shallow = tmp as QueryList); } }); @@ -640,17 +642,17 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', null, ['foo', '']); + ɵɵelement(0, 'div', null, ['foo', '']); } }, 2, 0, [], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], false, ViewContainerRef); + ɵɵviewQuery(['foo'], false, ViewContainerRef); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -672,17 +674,17 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate(0, null, 0, 0, 'ng-template', null, ['foo', '']); + ɵɵtemplate(0, null, 0, 0, 'ng-template', null, ['foo', '']); } }, 2, 0, [], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], false, ViewContainerRef); + ɵɵviewQuery(['foo'], false, ViewContainerRef); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -705,18 +707,18 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate(0, null, 0, 0, 'ng-template', null, ['foo', '']); + ɵɵtemplate(0, null, 0, 0, 'ng-template', null, ['foo', '']); } }, 2, 0, [], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], false, ElementRef); + ɵɵviewQuery(['foo'], false, ElementRef); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -740,17 +742,17 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate(0, null, 0, 0, 'ng-template', null, ['foo', '']); + ɵɵtemplate(0, null, 0, 0, 'ng-template', null, ['foo', '']); } }, 2, 0, [], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], false, null); + ɵɵviewQuery(['foo'], false, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -773,17 +775,17 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate(0, null, 0, 0, 'ng-template', null, ['foo', '']); + ɵɵtemplate(0, null, 0, 0, 'ng-template', null, ['foo', '']); } }, 2, 0, [], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], false, TemplateRef); + ɵɵviewQuery(['foo'], false, TemplateRef); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -808,7 +810,7 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'child', null, ['foo', '']); + ɵɵelement(0, 'child', null, ['foo', '']); } if (rf & RenderFlags.Update) { childInstance = getDirectiveOnNode(0); @@ -817,11 +819,11 @@ describe('query', () => { 2, 0, [Child], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], true, null); + ɵɵviewQuery(['foo'], true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -836,7 +838,7 @@ describe('query', () => { let childInstance: Child; class Child { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Child, selectors: [['child']], factory: () => childInstance = new Child(), @@ -857,17 +859,17 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'child', null, ['foo', 'child']); + ɵɵelement(0, 'child', null, ['foo', 'child']); } }, 2, 0, [Child], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], true, null); + ɵɵviewQuery(['foo'], true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -893,7 +895,7 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['child', ''], ['foo', 'child']); + ɵɵelement(0, 'div', ['child', ''], ['foo', 'child']); } if (rf & RenderFlags.Update) { childInstance = getDirectiveOnNode(0); @@ -902,11 +904,11 @@ describe('query', () => { 2, 0, [Child], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], true, null); + ɵɵviewQuery(['foo'], true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -932,7 +934,7 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement( + ɵɵelement( 0, 'div', ['child1', '', 'child2', ''], ['foo', 'child1', 'bar', 'child2']); } if (rf & RenderFlags.Update) { @@ -943,11 +945,11 @@ describe('query', () => { 3, 0, [Child1, Child2], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo', 'bar'], true, null); + ɵɵviewQuery(['foo', 'bar'], true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -974,7 +976,7 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['child', ''], ['foo', 'child', 'bar', 'child']); + ɵɵelement(0, 'div', ['child', ''], ['foo', 'child', 'bar', 'child']); } if (rf & RenderFlags.Update) { childInstance = getDirectiveOnNode(0); @@ -983,14 +985,14 @@ describe('query', () => { 3, 0, [Child], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], true, null); - ΔviewQuery(['bar'], true, null); + ɵɵviewQuery(['foo'], true, null); + ɵɵviewQuery(['bar'], true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.fooQuery = tmp as QueryList); - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.barQuery = tmp as QueryList); } }); @@ -1020,18 +1022,18 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['child', ''], ['foo', 'child']); + ɵɵelement(0, 'div', ['child', ''], ['foo', 'child']); div = getNativeByIndex(0, getLView()); } }, 2, 0, [Child], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], false, ElementRef); + ɵɵviewQuery(['foo'], false, ElementRef); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -1056,7 +1058,7 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['child', ''], ['foo', '', 'bar', 'child']); + ɵɵelement(0, 'div', ['child', ''], ['foo', '', 'bar', 'child']); div = getNativeByIndex(0, getLView()); } if (rf & RenderFlags.Update) { @@ -1066,11 +1068,11 @@ describe('query', () => { 3, 0, [Child], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo', 'bar'], false, null); + ɵɵviewQuery(['foo', 'bar'], false, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -1095,17 +1097,17 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['foo', '']); + ɵɵelement(0, 'div', ['foo', '']); } }, 2, 0, [Child], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], false, Child); + ɵɵviewQuery(['foo'], false, Child); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -1129,17 +1131,17 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['child', '']); + ɵɵelement(0, 'div', ['child', '']); } }, 1, 0, [Child, OtherChild], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(Child, false, OtherChild); + ɵɵviewQuery(Child, false, OtherChild); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -1163,17 +1165,17 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['child', '']); + ɵɵelement(0, 'div', ['child', '']); } }, 1, 0, [Child, OtherChild], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(OtherChild, false, Child); + ɵɵviewQuery(OtherChild, false, Child); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -1194,17 +1196,17 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div'); + ɵɵelement(0, 'div'); } }, 1, 0, [], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(TemplateRef as any, false, ElementRef); + ɵɵviewQuery(TemplateRef as any, false, ElementRef); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -1227,17 +1229,17 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['child', ''], ['foo', '']); + ɵɵelement(0, 'div', ['child', ''], ['foo', '']); } }, 2, 0, [Child], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], false, Child); + ɵɵviewQuery(['foo'], false, Child); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -1261,17 +1263,17 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['child', '']); + ɵɵelement(0, 'div', ['child', '']); } }, 1, 0, [Child], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(TemplateRef as any, false, null); + ɵɵviewQuery(TemplateRef as any, false, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -1284,9 +1286,9 @@ describe('query', () => { it('should query templates if the type is TemplateRef (and respect "read" option)', () => { function Cmpt_Template_1(rf: RenderFlags, ctx1: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - Δtext(1, 'Test'); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵtext(1, 'Test'); + ɵɵelementEnd(); } } /** @@ -1302,28 +1304,28 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, Cmpt_Template_1, 2, 0, 'ng-template', null, ['foo', ''], - ΔtemplateRefExtractor); - Δtemplate( + ɵɵtemplateRefExtractor); + ɵɵtemplate( 2, Cmpt_Template_1, 2, 0, 'ng-template', null, ['bar', ''], - ΔtemplateRefExtractor); - Δtemplate( + ɵɵtemplateRefExtractor); + ɵɵtemplate( 4, Cmpt_Template_1, 2, 0, 'ng-template', null, ['baz', ''], - ΔtemplateRefExtractor); + ɵɵtemplateRefExtractor); } }, 6, 0, [], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(TemplateRef as any, false, null); - ΔviewQuery(TemplateRef as any, false, ElementRef); + ɵɵviewQuery(TemplateRef as any, false, null); + ɵɵviewQuery(TemplateRef as any, false, ElementRef); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.tmplQuery = tmp as QueryList); - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.elemQuery = tmp as QueryList); } }); @@ -1351,12 +1353,12 @@ describe('query', () => { let directiveInstances: ViewContainerManipulatorDirective[] = []; class ViewContainerManipulatorDirective { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: ViewContainerManipulatorDirective, selectors: [['', 'vc', '']], factory: () => { const directiveInstance = - new ViewContainerManipulatorDirective(ΔdirectiveInject(ViewContainerRef as any)); + new ViewContainerManipulatorDirective(ɵɵdirectiveInject(ViewContainerRef as any)); directiveInstances.push(directiveInstance); return directiveInstance; } @@ -1377,7 +1379,7 @@ describe('query', () => { function Cmpt_Template_1(rf: RenderFlags, ctx1: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', null, ['foo', '']); + ɵɵelement(0, 'div', null, ['foo', '']); } } @@ -1393,21 +1395,21 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, Cmpt_Template_1, 2, 0, 'ng-template', [AttributeMarker.Bindings, 'ngIf']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'ngIf', Δbind(ctx.value)); + ɵɵelementProperty(0, 'ngIf', ɵɵbind(ctx.value)); } }, 2, 1, [NgIf], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], true, null); + ɵɵviewQuery(['foo'], true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -1429,10 +1431,10 @@ describe('query', () => { function Cmpt_Template_1(rf1: RenderFlags, row: NgForOfContext) { if (rf1 & RenderFlags.Create) { - Δelement(0, 'div', null, ['foo', '']); + ɵɵelement(0, 'div', null, ['foo', '']); } if (rf1 & RenderFlags.Update) { - ΔelementProperty(0, 'id', Δbind(row.$implicit)); + ɵɵelementProperty(0, 'id', ɵɵbind(row.$implicit)); } } @@ -1448,7 +1450,7 @@ describe('query', () => { // TODO(issue/24571): remove '!'. value !: string[]; query: any; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Cmpt, factory: () => new Cmpt(), selectors: [['my-app']], @@ -1456,19 +1458,19 @@ describe('query', () => { vars: 1, template: function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate(0, Cmpt_Template_1, 2, 1, 'ng-template', ['ngForOf', '']); + ɵɵtemplate(0, Cmpt_Template_1, 2, 1, 'ng-template', ['ngForOf', '']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'ngForOf', Δbind(ctx.value)); + ɵɵelementProperty(0, 'ngForOf', ɵɵbind(ctx.value)); } }, viewQuery: function(rf: RenderFlags, ctx: Cmpt) { let tmp: any; if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], true, null); + ɵɵviewQuery(['foo'], true, null); } if (rf & RenderFlags.Update) { - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }, @@ -1502,19 +1504,19 @@ describe('query', () => { function Cmpt_Template_1(rf: RenderFlags, ctx: {idx: number}) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', null, ['foo', '']); + ɵɵelement(0, 'div', null, ['foo', '']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'id', Δbind('foo1_' + ctx.idx)); + ɵɵelementProperty(0, 'id', ɵɵbind('foo1_' + ctx.idx)); } } function Cmpt_Template_5(rf: RenderFlags, ctx: {idx: number}) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', null, ['foo', '']); + ɵɵelement(0, 'div', null, ['foo', '']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'id', Δbind('foo2_' + ctx.idx)); + ɵɵelementProperty(0, 'id', ɵɵbind('foo2_' + ctx.idx)); } } @@ -1535,30 +1537,30 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, Cmpt_Template_1, 2, 1, 'ng-template', null, ['tpl1', ''], - ΔtemplateRefExtractor); - Δelement(2, 'div', ['id', 'middle'], ['foo', '']); - Δtemplate( + ɵɵtemplateRefExtractor); + ɵɵelement(2, 'div', ['id', 'middle'], ['foo', '']); + ɵɵtemplate( 4, Cmpt_Template_5, 2, 1, 'ng-template', null, ['tpl2', ''], - ΔtemplateRefExtractor); - Δtemplate(6, null, 0, 0, 'ng-template', [AttributeMarker.Bindings, 'vc']); + ɵɵtemplateRefExtractor); + ɵɵtemplate(6, null, 0, 0, 'ng-template', [AttributeMarker.Bindings, 'vc']); } if (rf & RenderFlags.Update) { - tpl1 = Δreference(1); - tpl2 = Δreference(5); + tpl1 = ɵɵreference(1); + tpl2 = ɵɵreference(5); } }, 8, 0, [ViewContainerManipulatorDirective], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], true, null); + ɵɵviewQuery(['foo'], true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -1611,10 +1613,10 @@ describe('query', () => { function Cmpt_Template_1(rf: RenderFlags, ctx: {idx: number, container_idx: number}) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', null, ['foo', '']); + ɵɵelement(0, 'div', null, ['foo', '']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'id', Δbind('foo_' + ctx.container_idx + '_' + ctx.idx)); + ɵɵelementProperty(0, 'id', ɵɵbind('foo_' + ctx.container_idx + '_' + ctx.idx)); } } @@ -1628,7 +1630,7 @@ describe('query', () => { */ class Cmpt { query: any; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Cmpt, factory: () => new Cmpt(), selectors: [['my-app']], @@ -1637,25 +1639,25 @@ describe('query', () => { template: function(rf: RenderFlags, ctx: any) { let tmp: any; if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, Cmpt_Template_1, 2, 1, 'ng-template', [], ['tpl', ''], - ΔtemplateRefExtractor); - Δtemplate(2, null, 0, 0, 'ng-template', [AttributeMarker.Bindings, 'vc']); - Δtemplate(3, null, 0, 0, 'ng-template', [AttributeMarker.Bindings, 'vc']); + ɵɵtemplateRefExtractor); + ɵɵtemplate(2, null, 0, 0, 'ng-template', [AttributeMarker.Bindings, 'vc']); + ɵɵtemplate(3, null, 0, 0, 'ng-template', [AttributeMarker.Bindings, 'vc']); } if (rf & RenderFlags.Update) { - tpl = Δreference(1); + tpl = ɵɵreference(1); } }, viewQuery: (rf: RenderFlags, cmpt: Cmpt) => { let tmp: any; if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], true, null); + ɵɵviewQuery(['foo'], true, null); } if (rf & RenderFlags.Update) { - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (cmpt.query = tmp as QueryList); } }, @@ -1691,14 +1693,14 @@ describe('query', () => { function MyApp_Template_1(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'span', ['id', 'from_tpl'], ['foo', '']); + ɵɵelement(0, 'span', ['id', 'from_tpl'], ['foo', '']); } } class MyApp { show = false; query: any; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyApp, factory: () => new MyApp(), selectors: [['my-app']], @@ -1710,25 +1712,25 @@ describe('query', () => { */ template: (rf: RenderFlags, myApp: MyApp) => { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, MyApp_Template_1, 2, 0, 'ng-template', undefined, ['tpl', ''], - ΔtemplateRefExtractor); - Δtemplate( + ɵɵtemplateRefExtractor); + ɵɵtemplate( 2, null, 0, 0, 'ng-template', [AttributeMarker.Bindings, 'ngTemplateOutlet']); } if (rf & RenderFlags.Update) { - const tplRef = Δreference(1); - ΔelementProperty(2, 'ngTemplateOutlet', Δbind(myApp.show ? tplRef : null)); + const tplRef = ɵɵreference(1); + ɵɵelementProperty(2, 'ngTemplateOutlet', ɵɵbind(myApp.show ? tplRef : null)); } }, directives: () => [NgTemplateOutlet], viewQuery: (rf: RenderFlags, myApp: MyApp) => { let tmp: any; if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], true, null); + ɵɵviewQuery(['foo'], true, null); } if (rf & RenderFlags.Update) { - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (myApp.query = tmp as QueryList); } } @@ -1768,33 +1770,33 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.exp) { - let rf1 = ΔembeddedViewStart(1, 2, 0); + let rf1 = ɵɵembeddedViewStart(1, 2, 0); { if (rf1 & RenderFlags.Create) { - Δelement(0, 'div', null, ['foo', '']); + ɵɵelement(0, 'div', null, ['foo', '']); firstEl = getNativeByIndex(0, getLView()); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1, 0, [], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], true, null); + ɵɵviewQuery(['foo'], true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -1830,37 +1832,37 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'span', null, ['foo', '']); + ɵɵelement(0, 'span', null, ['foo', '']); firstEl = getNativeByIndex(0, getLView()); - Δcontainer(2); - Δelement(3, 'span', null, ['foo', '']); + ɵɵcontainer(2); + ɵɵelement(3, 'span', null, ['foo', '']); lastEl = getNativeByIndex(3, getLView()); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(2); + ɵɵcontainerRefreshStart(2); { if (ctx.exp) { - let rf1 = ΔembeddedViewStart(1, 2, 0); + let rf1 = ɵɵembeddedViewStart(1, 2, 0); { if (rf1 & RenderFlags.Create) { - Δelement(0, 'div', null, ['foo', '']); + ɵɵelement(0, 'div', null, ['foo', '']); viewEl = getNativeByIndex(0, getLView()); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 5, 0, [], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], true, null); + ɵɵviewQuery(['foo'], true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -1901,43 +1903,43 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.exp1) { - let rf0 = ΔembeddedViewStart(0, 2, 0); + let rf0 = ɵɵembeddedViewStart(0, 2, 0); { if (rf0 & RenderFlags.Create) { - Δelement(0, 'div', null, ['foo', '']); + ɵɵelement(0, 'div', null, ['foo', '']); firstEl = getNativeByIndex(0, getLView()); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } if (ctx.exp2) { - let rf1 = ΔembeddedViewStart(1, 2, 0); + let rf1 = ɵɵembeddedViewStart(1, 2, 0); { if (rf1 & RenderFlags.Create) { - Δelement(0, 'span', null, ['foo', '']); + ɵɵelement(0, 'span', null, ['foo', '']); lastEl = getNativeByIndex(0, getLView()); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1, 0, [], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], true, null); + ɵɵviewQuery(['foo'], true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -1975,50 +1977,50 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.exp1) { - let rf0 = ΔembeddedViewStart(0, 3, 0); + let rf0 = ɵɵembeddedViewStart(0, 3, 0); { if (rf0 & RenderFlags.Create) { - Δelement(0, 'div', null, ['foo', '']); + ɵɵelement(0, 'div', null, ['foo', '']); firstEl = getNativeByIndex(0, getLView()); - Δcontainer(2); + ɵɵcontainer(2); } if (rf0 & RenderFlags.Update) { - ΔcontainerRefreshStart(2); + ɵɵcontainerRefreshStart(2); { if (ctx.exp2) { - let rf2 = ΔembeddedViewStart(0, 2, 0); + let rf2 = ɵɵembeddedViewStart(0, 2, 0); { if (rf2) { - Δelement(0, 'span', null, ['foo', '']); + ɵɵelement(0, 'span', null, ['foo', '']); lastEl = getNativeByIndex(0, getLView()); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1, 0, [], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], true, null); + ɵɵviewQuery(['foo'], true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -2060,38 +2062,38 @@ describe('query', () => { 'cmpt', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); - Δelement(1, 'span', null, ['foo', '']); + ɵɵcontainer(0); + ɵɵelement(1, 'span', null, ['foo', '']); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (ctx.exp) { - let rf0 = ΔembeddedViewStart(0, 4, 0); + let rf0 = ɵɵembeddedViewStart(0, 4, 0); { if (rf0 & RenderFlags.Create) { - ΔelementStart(0, 'div', null, ['foo', '']); - { Δelement(2, 'div', null, ['foo', '']); } - ΔelementEnd(); + ɵɵelementStart(0, 'div', null, ['foo', '']); + { ɵɵelement(2, 'div', null, ['foo', '']); } + ɵɵelementEnd(); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 3, 0, [], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], true, null); - ΔviewQuery(['foo'], false, null); + ɵɵviewQuery(['foo'], true, null); + ɵɵviewQuery(['foo'], false, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.deep = tmp as QueryList); - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.shallow = tmp as QueryList); } }); @@ -2130,37 +2132,37 @@ describe('query', () => { 'some-component-with-query', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', null, ['foo', '']); + ɵɵelement(0, 'div', null, ['foo', '']); } }, 2, 0, [], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], false, null); + ɵɵviewQuery(['foo'], false, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = queryInstance = tmp as QueryList); } }); - function createTemplate() { Δcontainer(0); } + function createTemplate() { ɵɵcontainer(0); } function updateTemplate() { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { if (condition) { - let rf1 = ΔembeddedViewStart(1, 1, 0); + let rf1 = ɵɵembeddedViewStart(1, 1, 0); { if (rf1 & RenderFlags.Create) { - Δelement(0, 'some-component-with-query'); + ɵɵelement(0, 'some-component-with-query'); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } /** @@ -2187,18 +2189,18 @@ describe('query', () => { this.vcr.createEmbeddedView(this.temp); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: SomeDir, selectors: [['', 'someDir', '']], factory: () => new SomeDir( - ΔdirectiveInject(ViewContainerRef as any), ΔdirectiveInject(TemplateRef as any)) + ɵɵdirectiveInject(ViewContainerRef as any), ɵɵdirectiveInject(TemplateRef as any)) }); } function AppComponent_Template_1(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div'); + ɵɵelement(0, 'div'); } } @@ -2210,19 +2212,19 @@ describe('query', () => { 'app', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, AppComponent_Template_1, 1, 0, 'div', [AttributeMarker.Template, 'someDir']); - Δelement(1, 'div', null, ['foo', '']); + ɵɵelement(1, 'div', null, ['foo', '']); } }, 3, 0, [SomeDir], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], true, null); + ɵɵviewQuery(['foo'], true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }); @@ -2252,17 +2254,17 @@ describe('query', () => { this.contentCheckedQuerySnapshot = this.foos ? this.foos.length : 0; } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: WithContentDirective, selectors: [['', 'with-content', '']], factory: () => withContentInstance = new WithContentDirective(), contentQueries: (rf: RenderFlags, ctx: any, dirIndex: number) => { if (rf & RenderFlags.Create) { - ΔcontentQuery(dirIndex, ['foo'], true, null); + ɵɵcontentQuery(dirIndex, ['foo'], true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadContentQuery()) && (ctx.foos = tmp); + ɵɵqueryRefresh(tmp = ɵɵloadContentQuery()) && (ctx.foos = tmp); } } }); @@ -2272,7 +2274,7 @@ describe('query', () => { // @ContentChildren('foo', {descendants: false}) foos !: QueryList; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ShallowComp, selectors: [['shallow-comp']], factory: () => shallowCompInstance = new ShallowComp(), @@ -2281,11 +2283,11 @@ describe('query', () => { vars: 0, contentQueries: (rf: RenderFlags, ctx: any, dirIndex: number) => { if (rf & RenderFlags.Create) { - ΔcontentQuery(dirIndex, ['foo'], false, null); + ɵɵcontentQuery(dirIndex, ['foo'], false, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadContentQuery()) && (ctx.foos = tmp); + ɵɵqueryRefresh(tmp = ɵɵloadContentQuery()) && (ctx.foos = tmp); } } }); @@ -2299,9 +2301,9 @@ describe('query', () => { */ const AppComponent = createComponent('app-component', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', [AttributeMarker.Bindings, 'with-content']); - { Δelement(1, 'span', null, ['foo', '']); } - ΔelementEnd(); + ɵɵelementStart(0, 'div', [AttributeMarker.Bindings, 'with-content']); + { ɵɵelement(1, 'span', null, ['foo', '']); } + ɵɵelementEnd(); } }, 3, 0, [WithContentDirective]); @@ -2330,23 +2332,23 @@ describe('query', () => { */ const AppComponent = createComponent('app-component', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δcontainer(0); + ɵɵcontainer(0); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(0); + ɵɵcontainerRefreshStart(0); { for (let i = 0; i < 3; i++) { - let rf = ΔembeddedViewStart(1, 3, 0); + let rf = ɵɵembeddedViewStart(1, 3, 0); if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', [AttributeMarker.Bindings, 'with-content']); - { Δelement(1, 'span', null, ['foo', '']); } - ΔelementEnd(); + ɵɵelementStart(0, 'div', [AttributeMarker.Bindings, 'with-content']); + { ɵɵelement(1, 'span', null, ['foo', '']); } + ɵɵelementEnd(); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, 1, 0, [WithContentDirective]); @@ -2372,7 +2374,7 @@ describe('query', () => { */ const AppComponent = createComponent('app-component', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['with-content', ''], ['foo', '']); + ɵɵelement(0, 'div', ['with-content', ''], ['foo', '']); } }, 2, 0, [WithContentDirective]); @@ -2384,7 +2386,7 @@ describe('query', () => { it('should match shallow content queries in views inserted / removed by ngIf', () => { function IfTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div', null, ['foo', '']); + ɵɵelement(0, 'div', null, ['foo', '']); } } @@ -2395,12 +2397,12 @@ describe('query', () => { */ const AppComponent = createComponent('app-component', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'shallow-comp'); - { Δtemplate(1, IfTemplate, 2, 0, 'div', [AttributeMarker.Template, 'ngIf', '']); } - ΔelementEnd(); + ɵɵelementStart(0, 'shallow-comp'); + { ɵɵtemplate(1, IfTemplate, 2, 0, 'div', [AttributeMarker.Template, 'ngIf', '']); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(1, 'ngIf', Δbind(ctx.showing)); + ɵɵelementProperty(1, 'ngIf', ɵɵbind(ctx.showing)); } }, 2, 1, [ShallowComp, NgIf]); @@ -2433,20 +2435,20 @@ describe('query', () => { 'app-component', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['with-content', '']); - { Δelement(1, 'div', null, ['foo', '']); } - ΔelementEnd(); - Δelement(3, 'div', ['id', 'after'], ['bar', '']); + ɵɵelementStart(0, 'div', ['with-content', '']); + { ɵɵelement(1, 'div', null, ['foo', '']); } + ɵɵelementEnd(); + ɵɵelement(3, 'div', ['id', 'after'], ['bar', '']); } }, 5, 0, [WithContentDirective], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo', 'bar'], true, null); + ɵɵviewQuery(['foo', 'bar'], true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.foos = tmp as QueryList); } }); @@ -2474,20 +2476,20 @@ describe('query', () => { 'app-component', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['with-content', '']); - { Δelement(1, 'div', ['id', 'yes'], ['foo', '']); } - ΔelementEnd(); - Δelement(3, 'div', null, ['foo', '']); + ɵɵelementStart(0, 'div', ['with-content', '']); + { ɵɵelement(1, 'div', ['id', 'yes'], ['foo', '']); } + ɵɵelementEnd(); + ɵɵelement(3, 'div', null, ['foo', '']); } }, 5, 0, [WithContentDirective], [], function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['bar'], true, null); + ɵɵviewQuery(['bar'], true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.bars = tmp as QueryList); } }); @@ -2500,7 +2502,7 @@ describe('query', () => { it('should report results to appropriate queries where deep content queries are nested', () => { class QueryDirective { fooBars: any; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: QueryDirective, selectors: [['', 'query', '']], exportAs: ['query'], @@ -2509,11 +2511,11 @@ describe('query', () => { // @ContentChildren('foo, bar, baz', {descendants: true}) // fooBars: QueryList; if (rf & RenderFlags.Create) { - ΔcontentQuery(dirIndex, ['foo', 'bar', 'baz'], true, null); + ɵɵcontentQuery(dirIndex, ['foo', 'bar', 'baz'], true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadContentQuery()) && (ctx.fooBars = tmp); + ɵɵqueryRefresh(tmp = ɵɵloadContentQuery()) && (ctx.fooBars = tmp); } } }); @@ -2535,19 +2537,19 @@ describe('query', () => { */ function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', [AttributeMarker.Bindings, 'query'], ['out', 'query']); + ɵɵelementStart(0, 'div', [AttributeMarker.Bindings, 'query'], ['out', 'query']); { - Δelement(2, 'span', ['id', 'foo'], ['foo', '']); - ΔelementStart(4, 'div', [AttributeMarker.Bindings, 'query'], ['in', 'query']); - { Δelement(6, 'span', ['id', 'bar'], ['bar', '']); } - ΔelementEnd(); - Δelement(8, 'span', ['id', 'baz'], ['baz', '']); + ɵɵelement(2, 'span', ['id', 'foo'], ['foo', '']); + ɵɵelementStart(4, 'div', [AttributeMarker.Bindings, 'query'], ['in', 'query']); + { ɵɵelement(6, 'span', ['id', 'bar'], ['bar', '']); } + ɵɵelementEnd(); + ɵɵelement(8, 'span', ['id', 'baz'], ['baz', '']); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - outInstance = Δload(1); - inInstance = Δload(5); + outInstance = ɵɵload(1); + inInstance = ɵɵload(5); } }, 10, 0, [QueryDirective]); @@ -2564,7 +2566,7 @@ describe('query', () => { class QueryDirective { fooBars: any; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: QueryDirective, selectors: [['', 'query', '']], exportAs: ['query'], @@ -2573,11 +2575,11 @@ describe('query', () => { // @ContentChildren('foo', {descendants: true}) // fooBars: QueryList; if (rf & RenderFlags.Create) { - ΔcontentQuery(dirIndex, ['foo'], false, null); + ɵɵcontentQuery(dirIndex, ['foo'], false, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadContentQuery()) && (ctx.fooBars = tmp); + ɵɵqueryRefresh(tmp = ɵɵloadContentQuery()) && (ctx.fooBars = tmp); } } }); @@ -2594,17 +2596,17 @@ describe('query', () => { */ function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['query', ''], ['out', 'query']); + ɵɵelementStart(0, 'div', ['query', ''], ['out', 'query']); { - ΔelementStart(2, 'div', ['query', ''], ['in', 'query', 'foo', '']); - { Δelement(5, 'span', ['id', 'bar'], ['foo', '']); } - ΔelementEnd(); + ɵɵelementStart(2, 'div', ['query', ''], ['in', 'query', 'foo', '']); + { ɵɵelement(5, 'span', ['id', 'bar'], ['foo', '']); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - outInstance = Δload(1); - inInstance = Δload(3); + outInstance = ɵɵload(1); + inInstance = ɵɵload(3); } }, 7, 0, [QueryDirective]); @@ -2620,7 +2622,7 @@ describe('query', () => { class QueryDirective { fooBars: any; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: QueryDirective, selectors: [['', 'query', '']], exportAs: ['query'], @@ -2629,11 +2631,11 @@ describe('query', () => { // @ContentChildren('foo', {descendants: true}) // fooBars: QueryList; if (rf & RenderFlags.Create) { - ΔcontentQuery(dirIndex, ['foo'], false, null); + ɵɵcontentQuery(dirIndex, ['foo'], false, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadContentQuery()) && (ctx.fooBars = tmp); + ɵɵqueryRefresh(tmp = ɵɵloadContentQuery()) && (ctx.fooBars = tmp); } } }); @@ -2650,17 +2652,17 @@ describe('query', () => { */ function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['query', ''], ['out', 'query']); + ɵɵelementStart(0, 'div', ['query', ''], ['out', 'query']); { - ΔelementStart(2, 'div', ['query', ''], ['in', 'query', 'foo', '']); - { Δelement(5, 'span', ['id', 'bar'], ['foo', '']); } - ΔelementEnd(); + ɵɵelementStart(2, 'div', ['query', ''], ['in', 'query', 'foo', '']); + { ɵɵelement(5, 'span', ['id', 'bar'], ['foo', '']); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - outInstance = Δload(1); - inInstance = Δload(3); + outInstance = ɵɵload(1); + inInstance = ɵɵload(3); } }, 7, 0, [QueryDirective]); @@ -2680,7 +2682,7 @@ describe('query', () => { () => { class ShallowQueryDirective { foos: any; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: ShallowQueryDirective, selectors: [['', 'shallow-query', '']], exportAs: ['shallow-query'], @@ -2689,11 +2691,11 @@ describe('query', () => { // @ContentChildren('foo', {descendants: false}) // foos: QueryList; if (rf & RenderFlags.Create) { - ΔcontentQuery(dirIndex, ['foo'], false, null); + ɵɵcontentQuery(dirIndex, ['foo'], false, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadContentQuery()) && (ctx.foos = tmp); + ɵɵqueryRefresh(tmp = ɵɵloadContentQuery()) && (ctx.foos = tmp); } } }); @@ -2701,7 +2703,7 @@ describe('query', () => { class DeepQueryDirective { foos: any; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DeepQueryDirective, selectors: [['', 'deep-query', '']], exportAs: ['deep-query'], @@ -2710,11 +2712,11 @@ describe('query', () => { // @ContentChildren('foo', {descendants: true}) // foos: QueryList; if (rf & RenderFlags.Create) { - ΔcontentQuery(dirIndex, ['foo'], true, null); + ɵɵcontentQuery(dirIndex, ['foo'], true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadContentQuery()) && (ctx.foos = tmp); + ɵɵqueryRefresh(tmp = ɵɵloadContentQuery()) && (ctx.foos = tmp); } } }); @@ -2735,20 +2737,20 @@ describe('query', () => { */ function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart( + ɵɵelementStart( 0, 'div', [AttributeMarker.Bindings, 'shallow-query', 'deep-query'], ['shallow', 'shallow-query', 'deep', 'deep-query']); { - Δelement(3, 'span', null, ['foo', '']); - ΔelementStart(5, 'div'); - { Δelement(6, 'span', null, ['foo', '']); } - ΔelementEnd(); + ɵɵelement(3, 'span', null, ['foo', '']); + ɵɵelementStart(5, 'div'); + { ɵɵelement(6, 'span', null, ['foo', '']); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - shallowInstance = Δload(1); - deepInstance = Δload(2); + shallowInstance = ɵɵload(1); + deepInstance = ɵɵload(2); } }, 8, 0, [ShallowQueryDirective, DeepQueryDirective]); @@ -2763,7 +2765,7 @@ describe('query', () => { class TextDirective { value !: string; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: TextDirective, selectors: [['', 'text', '']], factory: () => new TextDirective(), @@ -2778,7 +2780,7 @@ describe('query', () => { // @ContentChildren(TextDirective) texts !: QueryList; - static ngComponentDef = ΔdefineDirective({ + static ngComponentDef = ɵɵdefineDirective({ type: ContentQueryDirective, selectors: [['', 'content-query', '']], factory: () => contentQueryDirective = new ContentQueryDirective(), @@ -2786,11 +2788,11 @@ describe('query', () => { // @ContentChildren(TextDirective, {descendants: true}) // texts: QueryList; if (rf & RenderFlags.Create) { - ΔcontentQuery(dirIndex, TextDirective, true, null); + ɵɵcontentQuery(dirIndex, TextDirective, true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadContentQuery()) && (ctx.texts = tmp); + ɵɵqueryRefresh(tmp = ɵɵloadContentQuery()) && (ctx.texts = tmp); } } }); @@ -2811,17 +2813,17 @@ describe('query', () => { */ function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['content-query']); + ɵɵelementStart(0, 'div', ['content-query']); { - Δelement(1, 'span', ['text', 'A']); - ΔelementStart(2, 'div', ['text', 'B']); - ΔelementStart(3, 'span', ['text', 'C']); - { Δelement(4, 'span', ['text', 'D']); } - ΔelementEnd(); - ΔelementEnd(); - Δelement(5, 'span', ['text', 'E']); + ɵɵelement(1, 'span', ['text', 'A']); + ɵɵelementStart(2, 'div', ['text', 'B']); + ɵɵelementStart(3, 'span', ['text', 'C']); + { ɵɵelement(4, 'span', ['text', 'D']); } + ɵɵelementEnd(); + ɵɵelementEnd(); + ɵɵelement(5, 'span', ['text', 'E']); } - ΔelementEnd(); + ɵɵelementEnd(); } }, 6, 0, [TextDirective, ContentQueryDirective]); @@ -2846,19 +2848,19 @@ describe('query', () => { // @ViewChildren(TextDirective) texts !: QueryList; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ViewQueryComponent, selectors: [['view-query']], factory: () => new ViewQueryComponent(), template: function(rf: RenderFlags, ctx: ViewQueryComponent) { if (rf & RenderFlags.Create) { - Δelement(0, 'span', ['text', 'A']); - ΔelementStart(1, 'div', ['text', 'B']); - ΔelementStart(2, 'span', ['text', 'C']); - { Δelement(3, 'span', ['text', 'D']); } - ΔelementEnd(); - ΔelementEnd(); - Δelement(4, 'span', ['text', 'E']); + ɵɵelement(0, 'span', ['text', 'A']); + ɵɵelementStart(1, 'div', ['text', 'B']); + ɵɵelementStart(2, 'span', ['text', 'C']); + { ɵɵelement(3, 'span', ['text', 'D']); } + ɵɵelementEnd(); + ɵɵelementEnd(); + ɵɵelement(4, 'span', ['text', 'E']); } }, consts: 5, @@ -2866,10 +2868,10 @@ describe('query', () => { viewQuery: function(rf: RenderFlags, ctx: ViewQueryComponent) { let tmp: any; if (rf & RenderFlags.Create) { - ΔviewQuery(TextDirective, true, null); + ɵɵviewQuery(TextDirective, true, null); } if (rf & RenderFlags.Update) { - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.texts = tmp as QueryList); } }, diff --git a/packages/core/test/render3/render_util.ts b/packages/core/test/render3/render_util.ts index f52e1e6409..63069703cc 100644 --- a/packages/core/test/render3/render_util.ts +++ b/packages/core/test/render3/render_util.ts @@ -27,7 +27,7 @@ import {CreateComponentOptions} from '../../src/render3/component'; import {getDirectivesAtNodeIndex, getLContext, isComponentInstance} from '../../src/render3/context_discovery'; import {extractDirectiveDef, extractPipeDef} from '../../src/render3/definition'; import {NG_ELEMENT_ID} from '../../src/render3/fields'; -import {ComponentTemplate, ComponentType, DirectiveDef, DirectiveType, RenderFlags, renderComponent as _renderComponent, tick, ΔProvidersFeature, ΔdefineComponent, ΔdefineDirective} from '../../src/render3/index'; +import {ComponentTemplate, ComponentType, DirectiveDef, DirectiveType, RenderFlags, renderComponent as _renderComponent, tick, ɵɵProvidersFeature, ɵɵdefineComponent, ɵɵdefineDirective} from '../../src/render3/index'; import {DirectiveDefList, DirectiveTypesOrFactory, HostBindingsFunction, PipeDef, PipeDefList, PipeTypesOrFactory} from '../../src/render3/interfaces/definition'; import {PlayerHandler} from '../../src/render3/interfaces/player'; import {ProceduralRenderer3, RComment, RElement, RNode, RText, Renderer3, RendererFactory3, RendererStyleFlags3, domRendererFactory3} from '../../src/render3/interfaces/renderer'; @@ -317,7 +317,7 @@ export function createComponent( viewProviders: Provider[] = [], hostBindings?: HostBindingsFunction): ComponentType { return class Component { value: any; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Component, selectors: [[name]], consts: consts, @@ -328,7 +328,7 @@ export function createComponent( directives: directives, hostBindings, pipes: pipes, features: (providers.length > 0 || viewProviders.length > 0)? - [ΔProvidersFeature(providers || [], viewProviders || [])]: [] + [ɵɵProvidersFeature(providers || [], viewProviders || [])]: [] }); }; } @@ -336,7 +336,7 @@ export function createComponent( export function createDirective( name: string, {exportAs}: {exportAs?: string[]} = {}): DirectiveType { return class Directive { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: Directive, selectors: [['', name, '']], factory: () => new Directive(), diff --git a/packages/core/test/render3/renderer_factory_spec.ts b/packages/core/test/render3/renderer_factory_spec.ts index 82a4708aae..4d3952b83c 100644 --- a/packages/core/test/render3/renderer_factory_spec.ts +++ b/packages/core/test/render3/renderer_factory_spec.ts @@ -10,8 +10,8 @@ import {AnimationEvent} from '@angular/animations'; import {MockAnimationDriver, MockAnimationPlayer} from '@angular/animations/browser/testing'; import {RendererType2, ViewEncapsulation} from '../../src/core'; -import {ΔdefineComponent} from '../../src/render3/index'; -import {tick, Δbind, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, Δelement, ΔelementEnd, ΔelementProperty, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, Δlistener, Δtext} from '../../src/render3/instructions/all'; +import {ɵɵdefineComponent} from '../../src/render3/index'; +import {tick, ɵɵbind, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵelement, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵlistener, ɵɵtext} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; import {getAnimationRendererFactory2, getRendererFactory2} from './imported_renderer2'; @@ -29,7 +29,7 @@ describe('renderer factory lifecycle', () => { rendererFactory.end = () => logs.push('end'); class SomeComponent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: SomeComponent, encapsulation: ViewEncapsulation.None, selectors: [['some-component']], @@ -38,7 +38,7 @@ describe('renderer factory lifecycle', () => { template: function(rf: RenderFlags, ctx: SomeComponent) { if (rf & RenderFlags.Create) { logs.push('component create'); - Δtext(0, 'foo'); + ɵɵtext(0, 'foo'); } if (rf & RenderFlags.Update) { logs.push('component update'); @@ -49,7 +49,7 @@ describe('renderer factory lifecycle', () => { } class SomeComponentWhichThrows { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: SomeComponentWhichThrows, encapsulation: ViewEncapsulation.None, selectors: [['some-component-with-Error']], @@ -65,7 +65,7 @@ describe('renderer factory lifecycle', () => { function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { logs.push('function create'); - Δtext(0, 'bar'); + ɵɵtext(0, 'bar'); } if (rf & RenderFlags.Update) { logs.push('function update'); @@ -77,8 +77,8 @@ describe('renderer factory lifecycle', () => { function TemplateWithComponent(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { logs.push('function_with_component create'); - Δtext(0, 'bar'); - Δelement(1, 'some-component'); + ɵɵtext(0, 'bar'); + ɵɵelement(1, 'some-component'); } if (rf & RenderFlags.Update) { logs.push('function_with_component update'); @@ -139,7 +139,7 @@ describe('animation renderer factory', () => { }); class SomeComponent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: SomeComponent, encapsulation: ViewEncapsulation.None, selectors: [['some-component']], @@ -147,7 +147,7 @@ describe('animation renderer factory', () => { vars: 0, template: function(rf: RenderFlags, ctx: SomeComponent) { if (rf & RenderFlags.Create) { - Δtext(0, 'foo'); + ɵɵtext(0, 'foo'); } }, factory: () => new SomeComponent @@ -160,23 +160,23 @@ describe('animation renderer factory', () => { callback(event: AnimationEvent) { eventLogs.push(`${event.fromState ? event.fromState : event.toState} - ${event.phaseName}`); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: SomeComponentWithAnimation, selectors: [['some-component']], consts: 2, vars: 1, template: function(rf: RenderFlags, ctx: SomeComponentWithAnimation) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); + ɵɵelementStart(0, 'div'); { - Δlistener('@myAnimation.start', ctx.callback.bind(ctx)); - Δlistener('@myAnimation.done', ctx.callback.bind(ctx)); - Δtext(1, 'foo'); + ɵɵlistener('@myAnimation.start', ctx.callback.bind(ctx)); + ɵɵlistener('@myAnimation.done', ctx.callback.bind(ctx)); + ɵɵtext(1, 'foo'); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, '@myAnimation', Δbind(ctx.exp)); + ɵɵelementProperty(0, '@myAnimation', ɵɵbind(ctx.exp)); } }, factory: () => new SomeComponentWithAnimation, @@ -234,27 +234,27 @@ describe('Renderer2 destruction hooks', () => { let condition = true; function createTemplate() { - ΔelementStart(0, 'div'); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } function updateTemplate() { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { if (condition) { - let rf1 = ΔembeddedViewStart(1, 3, 0); + let rf1 = ɵɵembeddedViewStart(1, 3, 0); { if (rf1 & RenderFlags.Create) { - Δelement(0, 'span'); - Δelement(1, 'span'); - Δelement(2, 'span'); + ɵɵelement(0, 'span'); + ɵɵelement(1, 'span'); + ɵɵelement(2, 'span'); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } const t = new TemplateFixture( @@ -270,7 +270,7 @@ describe('Renderer2 destruction hooks', () => { it('should call renderer.destroy for each component destroyed', () => { class SimpleComponent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: SimpleComponent, encapsulation: ViewEncapsulation.None, selectors: [['simple']], @@ -278,7 +278,7 @@ describe('Renderer2 destruction hooks', () => { vars: 0, template: function(rf: RenderFlags, ctx: SimpleComponent) { if (rf & RenderFlags.Create) { - Δelement(0, 'span'); + ɵɵelement(0, 'span'); } }, factory: () => new SimpleComponent, @@ -288,27 +288,27 @@ describe('Renderer2 destruction hooks', () => { let condition = true; function createTemplate() { - ΔelementStart(0, 'div'); - { Δcontainer(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵcontainer(1); } + ɵɵelementEnd(); } function updateTemplate() { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); { if (condition) { - let rf1 = ΔembeddedViewStart(1, 3, 0); + let rf1 = ɵɵembeddedViewStart(1, 3, 0); { if (rf1 & RenderFlags.Create) { - Δelement(0, 'simple'); - Δelement(1, 'span'); - Δelement(2, 'simple'); + ɵɵelement(0, 'simple'); + ɵɵelement(1, 'span'); + ɵɵelement(2, 'simple'); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } const t = new TemplateFixture( diff --git a/packages/core/test/render3/styling/class_and_style_bindings_spec.ts b/packages/core/test/render3/styling/class_and_style_bindings_spec.ts index 83294c6fa6..6613c9d877 100644 --- a/packages/core/test/render3/styling/class_and_style_bindings_spec.ts +++ b/packages/core/test/render3/styling/class_and_style_bindings_spec.ts @@ -9,7 +9,7 @@ import {createLView, createTView} from '@angular/core/src/render3/instructions/s import {createRootContext} from '../../../src/render3/component'; import {getLContext} from '../../../src/render3/context_discovery'; -import {ΔdefineComponent, ΔdefineDirective, ΔelementClassProp, ΔelementEnd, ΔelementHostClassProp, ΔelementHostStyleProp, ΔelementHostStyling, ΔelementHostStylingApply, ΔelementStart, ΔelementStyleProp, ΔelementStyling, ΔelementStylingApply, ΔelementStylingMap, ΔnamespaceSVG} from '../../../src/render3/index'; +import {ɵɵdefineComponent, ɵɵdefineDirective, ɵɵelementClassProp, ɵɵelementEnd, ɵɵelementHostClassProp, ɵɵelementHostStyleProp, ɵɵelementHostStyling, ɵɵelementHostStylingApply, ɵɵelementStart, ɵɵelementStyleProp, ɵɵelementStyling, ɵɵelementStylingApply, ɵɵelementStylingMap, ɵɵnamespaceSVG} from '../../../src/render3/index'; import {RenderFlags} from '../../../src/render3/interfaces/definition'; import {AttributeMarker, TAttributes} from '../../../src/render3/interfaces/node'; import {BindingStore, BindingType, PlayState, Player, PlayerContext, PlayerFactory, PlayerHandler} from '../../../src/render3/interfaces/player'; @@ -22,7 +22,7 @@ import {CorePlayerHandler} from '../../../src/render3/styling/core_player_handle import {registerHostDirective} from '../../../src/render3/styling/host_instructions_queue'; import {BoundPlayerFactory, bindPlayerFactory} from '../../../src/render3/styling/player_factory'; import {allocStylingContext, createEmptyStylingContext} from '../../../src/render3/styling/util'; -import {ΔdefaultStyleSanitizer} from '../../../src/sanitization/sanitization'; +import {ɵɵdefaultStyleSanitizer} from '../../../src/sanitization/sanitization'; import {StyleSanitizeFn} from '../../../src/sanitization/style_sanitizer'; import {ComponentFixture, renderToHtml} from '../render_util'; @@ -376,7 +376,7 @@ describe('style and class based bindings', () => { () => { function Template(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span', [ + ɵɵelementStart(0, 'span', [ AttributeMarker.Styles, 'width', '200px', @@ -385,13 +385,13 @@ describe('style and class based bindings', () => { 'opacity', '0.5', ]); - ΔelementStyling(null, ['width']); - ΔelementEnd(); + ɵɵelementStyling(null, ['width']); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementStylingMap(0, null, ctx.myStyles); - ΔelementStyleProp(0, 0, ctx.myWidth); - ΔelementStylingApply(0); + ɵɵelementStylingMap(0, null, ctx.myStyles); + ɵɵelementStyleProp(0, 0, ctx.myWidth); + ɵɵelementStylingApply(0); } } @@ -411,7 +411,7 @@ describe('style and class based bindings', () => { class Comp { diameter: number = 100; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Comp, selectors: [['comp']], factory: () => new Comp(), @@ -419,17 +419,17 @@ describe('style and class based bindings', () => { vars: 0, template: (rf: RenderFlags, ctx: Comp) => { if (rf & RenderFlags.Create) { - ΔnamespaceSVG(); - ΔelementStart(0, 'svg'); - ΔelementStyling(null, ['width', 'height']); - ΔelementStart(1, 'circle', ['stroke', 'green', 'fill', 'yellow']); - ΔelementEnd(); - ΔelementEnd(); + ɵɵnamespaceSVG(); + ɵɵelementStart(0, 'svg'); + ɵɵelementStyling(null, ['width', 'height']); + ɵɵelementStart(1, 'circle', ['stroke', 'green', 'fill', 'yellow']); + ɵɵelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementStyleProp(0, 0, ctx.diameter, 'px'); - ΔelementStyleProp(0, 1, ctx.diameter, 'px'); - ΔelementStylingApply(0); + ɵɵelementStyleProp(0, 0, ctx.diameter, 'px'); + ɵɵelementStyleProp(0, 1, ctx.diameter, 'px'); + ɵɵelementStylingApply(0); } } }); @@ -453,7 +453,7 @@ describe('style and class based bindings', () => { borderWidth: string = '3px'; borderColor: string = 'red'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Comp, selectors: [['comp']], factory: () => new Comp(), @@ -461,14 +461,14 @@ describe('style and class based bindings', () => { vars: 0, template: (rf: RenderFlags, ctx: Comp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - ΔelementStyling(null, ['borderWidth', 'border-color']); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵelementStyling(null, ['borderWidth', 'border-color']); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementStyleProp(0, 0, ctx.borderWidth); - ΔelementStyleProp(0, 1, ctx.borderColor); - ΔelementStylingApply(0); + ɵɵelementStyleProp(0, 0, ctx.borderWidth); + ɵɵelementStyleProp(0, 1, ctx.borderColor); + ɵɵelementStylingApply(0); } } }); @@ -1269,7 +1269,7 @@ describe('style and class based bindings', () => { () => { const getStyles = trackStylesFactory(); const styleBindings = ['border-image', 'border-width']; - const styleSanitizer = ΔdefaultStyleSanitizer; + const styleSanitizer = ɵɵdefaultStyleSanitizer; const stylingContext = createStylingContext(null, styleBindings, null, null, styleSanitizer); @@ -3086,7 +3086,7 @@ describe('style and class based bindings', () => { const fooFactory = bindPlayerFactory(classBuildFn, true); class Comp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Comp, selectors: [['comp']], directives: [Comp], @@ -3095,15 +3095,15 @@ describe('style and class based bindings', () => { vars: 0, template: (rf: RenderFlags, ctx: Comp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - ΔelementStyling(['foo'], ['width']); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵelementStyling(['foo'], ['width']); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementStylingMap(0, classMapFactory, styleMapFactory); - ΔelementStyleProp(0, 0, widthFactory); - ΔelementClassProp(0, 0, fooFactory); - ΔelementStylingApply(0); + ɵɵelementStylingMap(0, classMapFactory, styleMapFactory); + ɵɵelementStyleProp(0, 0, widthFactory); + ɵɵelementClassProp(0, 0, fooFactory); + ɵɵelementStylingApply(0); } } }); @@ -3159,7 +3159,7 @@ describe('style and class based bindings', () => { let fooFactory = bindPlayerFactory(buildFn, true) as BoundPlayerFactory; class Comp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Comp, selectors: [['comp']], directives: [Comp], @@ -3168,15 +3168,15 @@ describe('style and class based bindings', () => { vars: 0, template: (rf: RenderFlags, ctx: Comp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - ΔelementStyling(['foo'], ['width']); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵelementStyling(['foo'], ['width']); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementStylingMap(0, classMapFactory, styleMapFactory); - ΔelementStyleProp(0, 0, widthFactory); - ΔelementClassProp(0, 0, fooFactory); - ΔelementStylingApply(0); + ɵɵelementStylingMap(0, classMapFactory, styleMapFactory); + ɵɵelementStyleProp(0, 0, widthFactory); + ɵɵelementClassProp(0, 0, fooFactory); + ɵɵelementStylingApply(0); } } }); @@ -3234,18 +3234,18 @@ describe('style and class based bindings', () => { const fooFactory2 = bindPlayerFactory(classBuildFn, true); class MyDir { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: MyDir, selectors: [['', 'my-dir', '']], factory: () => new MyDir(), hostBindings: function(rf: RenderFlags, ctx: MyDir, elementIndex: number) { if (rf & RenderFlags.Create) { - ΔelementHostStyling(['foo'], ['width']); + ɵɵelementHostStyling(['foo'], ['width']); } if (rf & RenderFlags.Update) { - ΔelementHostStyleProp(0, ctx.widthFactory); - ΔelementHostClassProp(0, ctx.fooFactory); - ΔelementHostStylingApply(); + ɵɵelementHostStyleProp(0, ctx.widthFactory); + ɵɵelementHostClassProp(0, ctx.fooFactory); + ɵɵelementHostStylingApply(); } } }); @@ -3255,7 +3255,7 @@ describe('style and class based bindings', () => { } class Comp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Comp, selectors: [['comp']], directives: [Comp, MyDir], @@ -3264,14 +3264,14 @@ describe('style and class based bindings', () => { vars: 0, template: (rf: RenderFlags, ctx: Comp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['my-dir', '']); - ΔelementStyling(['foo'], ['width']); - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['my-dir', '']); + ɵɵelementStyling(['foo'], ['width']); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementStyleProp(0, 0, ctx.widthFactory); - ΔelementClassProp(0, 0, ctx.fooFactory); - ΔelementStylingApply(0); + ɵɵelementStyleProp(0, 0, ctx.widthFactory); + ɵɵelementClassProp(0, 0, ctx.fooFactory); + ɵɵelementStylingApply(0); } } }); diff --git a/packages/core/test/render3/styling/players_spec.ts b/packages/core/test/render3/styling/players_spec.ts index 1cf5d8d934..f92b65d141 100644 --- a/packages/core/test/render3/styling/players_spec.ts +++ b/packages/core/test/render3/styling/players_spec.ts @@ -8,12 +8,12 @@ import {QueryList} from '@angular/core'; import {RenderFlags} from '@angular/core/src/render3'; -import {getHostElement, ΔdefineComponent, ΔloadViewQuery, ΔviewQuery} from '../../../src/render3/index'; -import {markDirty, Δelement, ΔelementEnd, ΔelementStart, ΔelementStyling, ΔelementStylingApply} from '../../../src/render3/instructions/all'; +import {getHostElement, ɵɵdefineComponent, ɵɵloadViewQuery, ɵɵviewQuery} from '../../../src/render3/index'; +import {markDirty, ɵɵelement, ɵɵelementEnd, ɵɵelementStart, ɵɵelementStyling, ɵɵelementStylingApply} from '../../../src/render3/instructions/all'; import {PlayState, Player, PlayerHandler} from '../../../src/render3/interfaces/player'; import {RElement} from '../../../src/render3/interfaces/renderer'; import {addPlayer, getPlayers} from '../../../src/render3/players'; -import {ΔqueryRefresh} from '../../../src/render3/query'; +import {ɵɵqueryRefresh} from '../../../src/render3/query'; import {getOrCreatePlayerContext} from '../../../src/render3/styling/util'; import {ComponentFixture} from '../render_util'; @@ -228,7 +228,7 @@ function buildElementWithStyling() { } class Comp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Comp, exportAs: ['child'], selectors: [['child-comp']], @@ -237,7 +237,7 @@ class Comp { vars: 0, template: (rf: RenderFlags, ctx: Comp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div'); + ɵɵelement(0, 'div'); } ctx.logger(); } @@ -248,7 +248,7 @@ class Comp { } class CompWithStyling { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: CompWithStyling, exportAs: ['child-styled'], selectors: [['child-styled-comp']], @@ -257,12 +257,12 @@ class CompWithStyling { vars: 0, template: (rf: RenderFlags, ctx: CompWithStyling) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - ΔelementStyling(['fooClass']); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵelementStyling(['fooClass']); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementStylingApply(0); + ɵɵelementStylingApply(0); } } }); @@ -271,7 +271,7 @@ class CompWithStyling { } class SuperComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: SuperComp, selectors: [['super-comp']], factory: () => new SuperComp(), @@ -279,18 +279,18 @@ class SuperComp { vars: 0, template: (rf: RenderFlags, ctx: SuperComp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - Δelement(1, 'child-comp', ['child', ''], ['child', 'child']); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵelement(1, 'child-comp', ['child', ''], ['child', 'child']); + ɵɵelementEnd(); } }, viewQuery: function(rf: RenderFlags, ctx: SuperComp) { if (rf & RenderFlags.Create) { - ΔviewQuery(['child'], true, null); + ɵɵviewQuery(['child'], true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.query = tmp as QueryList); } }, diff --git a/packages/core/test/render3/template_ref_spec.ts b/packages/core/test/render3/template_ref_spec.ts index d5059f366e..36b2b70b93 100644 --- a/packages/core/test/render3/template_ref_spec.ts +++ b/packages/core/test/render3/template_ref_spec.ts @@ -8,8 +8,8 @@ import {TemplateRef} from '@angular/core'; -import {AttributeMarker, RenderFlags, ΔdefineDirective} from '../../src/render3/index'; -import {Δbind, ΔdirectiveInject, Δelement, ΔelementContainerEnd, ΔelementContainerStart, ΔelementProperty, Δtemplate, Δtext} from '../../src/render3/instructions/all'; +import {AttributeMarker, RenderFlags, ɵɵdefineDirective} from '../../src/render3/index'; +import {ɵɵbind, ɵɵdirectiveInject, ɵɵelement, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementProperty, ɵɵtemplate, ɵɵtext} from '../../src/render3/instructions/all'; import {NgIf} from './common_with_def'; import {ComponentFixture, createComponent, getDirectiveOnNode} from './render_util'; @@ -19,10 +19,10 @@ describe('TemplateRef', () => { describe('rootNodes', () => { class DirectiveWithTplRef { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirectiveWithTplRef, selectors: [['', 'tplRef', '']], - factory: () => new DirectiveWithTplRef(ΔdirectiveInject(TemplateRef as any)) + factory: () => new DirectiveWithTplRef(ɵɵdirectiveInject(TemplateRef as any)) }); // injecting a ViewContainerRef to create a dynamic container in which embedded views will be @@ -35,9 +35,9 @@ describe('TemplateRef', () => { function embeddedTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'div'); - Δtext(1, 'some text'); - Δelement(2, 'span'); + ɵɵelement(0, 'div'); + ɵɵtext(1, 'some text'); + ɵɵelement(2, 'span'); } } @@ -50,7 +50,7 @@ describe('TemplateRef', () => { */ const AppComponent = createComponent('app-cmp', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate(0, embeddedTemplate, 3, 0, 'ng-template', ['tplRef', '']); + ɵɵtemplate(0, embeddedTemplate, 3, 0, 'ng-template', ['tplRef', '']); directiveWithTplRef = getDirectiveOnNode(0, 0); } }, 1, 0, [DirectiveWithTplRef]); @@ -79,7 +79,7 @@ describe('TemplateRef', () => { */ const AppComponent = createComponent('app-cmp', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate(0, () => {}, 0, 0, 'ng-template', ['tplRef', '']); + ɵɵtemplate(0, () => {}, 0, 0, 'ng-template', ['tplRef', '']); directiveWithTplRef = getDirectiveOnNode(0, 0); } }, 1, 0, [DirectiveWithTplRef]); @@ -102,16 +102,16 @@ describe('TemplateRef', () => { function ngIfTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtext(0, 'text'); + ɵɵtext(0, 'text'); } } function embeddedTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate(0, ngIfTemplate, 1, 0, 'ng-template', [AttributeMarker.Bindings, 'ngIf']); + ɵɵtemplate(0, ngIfTemplate, 1, 0, 'ng-template', [AttributeMarker.Bindings, 'ngIf']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'ngIf', Δbind(ctx.showing)); + ɵɵelementProperty(0, 'ngIf', ɵɵbind(ctx.showing)); } } @@ -120,7 +120,7 @@ describe('TemplateRef', () => { */ const AppComponent = createComponent('app-cmp', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate(0, embeddedTemplate, 1, 1, 'ng-template', ['tplRef', '']); + ɵɵtemplate(0, embeddedTemplate, 1, 1, 'ng-template', ['tplRef', '']); directiveWithTplRef = getDirectiveOnNode(0, 0); } }, 1, 0, [DirectiveWithTplRef, NgIf]); @@ -147,9 +147,9 @@ describe('TemplateRef', () => { function embeddedTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementContainerStart(0); - { Δtext(1, 'text'); } - ΔelementContainerEnd(); + ɵɵelementContainerStart(0); + { ɵɵtext(1, 'text'); } + ɵɵelementContainerEnd(); } } @@ -158,7 +158,7 @@ describe('TemplateRef', () => { */ const AppComponent = createComponent('app-cmp', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate(0, embeddedTemplate, 2, 0, 'ng-template', ['tplRef', '']); + ɵɵtemplate(0, embeddedTemplate, 2, 0, 'ng-template', ['tplRef', '']); directiveWithTplRef = getDirectiveOnNode(0, 0); } }, 1, 0, [DirectiveWithTplRef]); diff --git a/packages/core/test/render3/view_container_ref_spec.ts b/packages/core/test/render3/view_container_ref_spec.ts index d0c1462cd7..0e1ab26879 100644 --- a/packages/core/test/render3/view_container_ref_spec.ts +++ b/packages/core/test/render3/view_container_ref_spec.ts @@ -6,19 +6,19 @@ * found in the LICENSE file at https://angular.io/license */ -import {ChangeDetectorRef, Component as _Component, ComponentFactoryResolver, ComponentRef, ΔdefineInjector, ElementRef, EmbeddedViewRef, NgModuleRef, Pipe, PipeTransform, QueryList, RendererFactory2, TemplateRef, ViewContainerRef, ViewRef, ɵAPP_ROOT as APP_ROOT, ɵNgModuleDef as NgModuleDef,} from '../../src/core'; +import {ChangeDetectorRef, Component as _Component, ComponentFactoryResolver, ComponentRef, ɵɵdefineInjector, ElementRef, EmbeddedViewRef, NgModuleRef, Pipe, PipeTransform, QueryList, RendererFactory2, TemplateRef, ViewContainerRef, ViewRef, ɵAPP_ROOT as APP_ROOT, ɵNgModuleDef as NgModuleDef,} from '../../src/core'; import {createInjector} from '../../src/di/r3_injector'; import {ViewEncapsulation} from '../../src/metadata'; -import {AttributeMarker, ΔdefineComponent, ΔdefineDirective, ΔdefinePipe, injectComponentFactoryResolver, Δlistener, ΔloadViewQuery, ΔNgOnChangesFeature, ΔqueryRefresh, ΔviewQuery,} from '../../src/render3/index'; +import {AttributeMarker, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefinePipe, injectComponentFactoryResolver, ɵɵlistener, ɵɵloadViewQuery, ɵɵNgOnChangesFeature, ɵɵqueryRefresh, ɵɵviewQuery,} from '../../src/render3/index'; -import {ΔallocHostVars, Δbind, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, ΔdirectiveInject, Δelement, ΔelementEnd, ΔelementHostAttrs, ΔelementProperty, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, Δinterpolation1, Δinterpolation3, ΔnextContext, Δprojection, ΔprojectionDef, Δreference, Δtemplate, Δtext, ΔtextBinding,} from '../../src/render3/instructions/all'; +import {ɵɵallocHostVars, ɵɵbind, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵdirectiveInject, ɵɵelement, ɵɵelementEnd, ɵɵelementHostAttrs, ɵɵelementProperty, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵinterpolation1, ɵɵinterpolation3, ɵɵnextContext, ɵɵprojection, ɵɵprojectionDef, ɵɵreference, ɵɵtemplate, ɵɵtext, ɵɵtextBinding,} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; import {RElement} from '../../src/render3/interfaces/renderer'; import {NgModuleFactory} from '../../src/render3/ng_module_ref'; -import {Δpipe, ΔpipeBind1} from '../../src/render3/pipe'; +import {ɵɵpipe, ɵɵpipeBind1} from '../../src/render3/pipe'; import {getLView} from '../../src/render3/state'; import {getNativeByIndex} from '../../src/render3/util/view_utils'; -import {ΔtemplateRefExtractor} from '../../src/render3/view_engine_compatibility_prebound'; +import {ɵɵtemplateRefExtractor} from '../../src/render3/view_engine_compatibility_prebound'; import {NgForOf} from '../../test/render3/common_with_def'; import {getRendererFactory2} from './imported_renderer2'; @@ -36,12 +36,12 @@ describe('ViewContainerRef', () => { beforeEach(() => directiveInstance = null); class DirectiveWithVCRef { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirectiveWithVCRef, selectors: [['', 'vcref', '']], factory: () => directiveInstance = new DirectiveWithVCRef( - ΔdirectiveInject(ViewContainerRef as any), injectComponentFactoryResolver()), + ɵɵdirectiveInject(ViewContainerRef as any), injectComponentFactoryResolver()), inputs: {tplRef: 'tplRef', name: 'name'} }); @@ -61,10 +61,10 @@ describe('ViewContainerRef', () => { */ function embeddedTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δbind(ctx.name)); + ɵɵtextBinding(0, ɵɵbind(ctx.name)); } } @@ -78,14 +78,14 @@ describe('ViewContainerRef', () => { *

*/ function createTemplate() { - Δtemplate( - 0, embeddedTemplate, 1, 1, 'ng-template', null, ['tplRef', ''], ΔtemplateRefExtractor); - Δelement(2, 'p', ['vcref', '']); + ɵɵtemplate( + 0, embeddedTemplate, 1, 1, 'ng-template', null, ['tplRef', ''], ɵɵtemplateRefExtractor); + ɵɵelement(2, 'p', ['vcref', '']); } function updateTemplate() { - const tplRef = Δreference(1); - ΔelementProperty(2, 'tplRef', Δbind(tplRef)); + const tplRef = ɵɵreference(1); + ɵɵelementProperty(2, 'tplRef', ɵɵbind(tplRef)); } describe('createEmbeddedView (incl. insert)', () => { @@ -96,11 +96,11 @@ describe('ViewContainerRef', () => { *
*/ function createTemplate() { - Δtemplate( + ɵɵtemplate( 0, embeddedTemplate, 1, 1, 'ng-template', null, ['tplRef', ''], - ΔtemplateRefExtractor); - Δelement(2, 'header', ['vcref', '']); - Δelement(3, 'footer'); + ɵɵtemplateRefExtractor); + ɵɵelement(2, 'header', ['vcref', '']); + ɵɵelement(3, 'footer'); } const fixture = @@ -134,10 +134,10 @@ describe('ViewContainerRef', () => { *
*/ function createTemplate() { - Δtemplate( - 0, embeddedTemplate, 1, 1, 'ng-template', [], ['tplRef', ''], ΔtemplateRefExtractor); - Δelement(2, 'header-cmp', ['vcref', '']); - Δelement(3, 'footer'); + ɵɵtemplate( + 0, embeddedTemplate, 1, 1, 'ng-template', [], ['tplRef', ''], ɵɵtemplateRefExtractor); + ɵɵelement(2, 'header-cmp', ['vcref', '']); + ɵɵelement(3, 'footer'); } const fixture = new TemplateFixture( @@ -171,11 +171,11 @@ describe('ViewContainerRef', () => { *
*/ function createTemplate() { - Δtemplate( + ɵɵtemplate( 0, embeddedTemplate, 1, 1, 'ng-template', null, ['tplRef', ''], - ΔtemplateRefExtractor); - Δelement(2, 'div', ['vcref', '']); - Δelement(3, 'div', ['vcref', '']); + ɵɵtemplateRefExtractor); + ɵɵelement(2, 'div', ['vcref', '']); + ɵɵelement(3, 'div', ['vcref', '']); // for testing only: firstDir = getDirectiveOnNode(2); @@ -183,9 +183,9 @@ describe('ViewContainerRef', () => { } function update() { - const tplRef = Δreference(1); - ΔelementProperty(2, 'tplRef', Δbind(tplRef)); - ΔelementProperty(3, 'tplRef', Δbind(tplRef)); + const tplRef = ɵɵreference(1); + ɵɵelementProperty(2, 'tplRef', ɵɵbind(tplRef)); + ɵɵelementProperty(3, 'tplRef', ɵɵbind(tplRef)); } const fixture = new TemplateFixture(createTemplate, update, 4, 2, [DirectiveWithVCRef]); @@ -203,15 +203,15 @@ describe('ViewContainerRef', () => { *
*/ function createTemplate() { - Δtemplate( + ɵɵtemplate( 0, embeddedTemplate, 1, 1, 'ng-template', ['vcref', ''], ['tplRef', ''], - ΔtemplateRefExtractor); - Δelement(2, 'footer'); + ɵɵtemplateRefExtractor); + ɵɵelement(2, 'footer'); } function updateTemplate() { - const tplRef = Δreference(1); - ΔelementProperty(0, 'tplRef', Δbind(tplRef)); + const tplRef = ɵɵreference(1); + ɵɵelementProperty(0, 'tplRef', ɵɵbind(tplRef)); } const fixture = @@ -240,13 +240,13 @@ describe('ViewContainerRef', () => { let directiveInstances: TestDirective[] = []; class TestDirective { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: TestDirective, selectors: [['', 'testdir', '']], factory: () => { const instance = new TestDirective( - ΔdirectiveInject(ViewContainerRef as any), - ΔdirectiveInject(TemplateRef as any)); + ɵɵdirectiveInject(ViewContainerRef as any), + ɵɵdirectiveInject(TemplateRef as any)); directiveInstances.push(instance); @@ -263,13 +263,13 @@ describe('ViewContainerRef', () => { function EmbeddedTemplateA(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtext(0, 'A'); + ɵɵtext(0, 'A'); } } function EmbeddedTemplateB(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtext(0, 'B'); + ɵɵtext(0, 'B'); } } @@ -282,7 +282,7 @@ describe('ViewContainerRef', () => { class TestComponent { // TODO(issue/24571): remove '!'. testDir !: TestDirective; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: TestComponent, encapsulation: ViewEncapsulation.None, selectors: [['test-cmp']], @@ -291,10 +291,10 @@ describe('ViewContainerRef', () => { vars: 0, template: (rf: RenderFlags, cmp: TestComponent) => { if (rf & RenderFlags.Create) { - Δtext(0, 'before|'); - Δtemplate(1, EmbeddedTemplateA, 1, 0, 'ng-template', ['testdir', '']); - Δtemplate(2, EmbeddedTemplateB, 1, 0, 'ng-template', ['testdir', '']); - Δtext(3, '|after'); + ɵɵtext(0, 'before|'); + ɵɵtemplate(1, EmbeddedTemplateA, 1, 0, 'ng-template', ['testdir', '']); + ɵɵtemplate(2, EmbeddedTemplateB, 1, 0, 'ng-template', ['testdir', '']); + ɵɵtext(3, '|after'); } }, directives: [TestDirective] @@ -317,12 +317,12 @@ describe('ViewContainerRef', () => { let directiveInstance: TestDirective; class TestDirective { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: TestDirective, selectors: [['', 'testdir', '']], factory: () => directiveInstance = new TestDirective( - ΔdirectiveInject(ViewContainerRef as any), - ΔdirectiveInject(TemplateRef as any)) + ɵɵdirectiveInject(ViewContainerRef as any), + ɵɵdirectiveInject(TemplateRef as any)) }); constructor(private _vcRef: ViewContainerRef, private _tplRef: TemplateRef<{}>) {} @@ -339,7 +339,7 @@ describe('ViewContainerRef', () => { function EmbeddedTemplateA(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtext(0, 'A'); + ɵɵtext(0, 'A'); } } @@ -355,7 +355,7 @@ describe('ViewContainerRef', () => { condition = false; // TODO(issue/24571): remove '!'. testDir !: TestDirective; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: TestComponent, encapsulation: ViewEncapsulation.None, selectors: [['test-cmp']], @@ -364,25 +364,25 @@ describe('ViewContainerRef', () => { factory: () => new TestComponent(), template: (rf: RenderFlags, cmp: TestComponent) => { if (rf & RenderFlags.Create) { - Δtext(0, 'before|'); - Δtemplate(1, EmbeddedTemplateA, 1, 0, 'ng-template', ['testdir', '']); - Δcontainer(2); - Δtext(3, '|after'); + ɵɵtext(0, 'before|'); + ɵɵtemplate(1, EmbeddedTemplateA, 1, 0, 'ng-template', ['testdir', '']); + ɵɵcontainer(2); + ɵɵtext(3, '|after'); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(2); + ɵɵcontainerRefreshStart(2); { if (cmp.condition) { - let rf1 = ΔembeddedViewStart(0, 1, 0); + let rf1 = ɵɵembeddedViewStart(0, 1, 0); { if (rf1 & RenderFlags.Create) { - Δtext(0, 'B'); + ɵɵtext(0, 'B'); } } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } }, directives: [TestDirective] @@ -417,7 +417,7 @@ describe('ViewContainerRef', () => { // TODO(issue/24571): remove '!'. name !: string; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Child, encapsulation: ViewEncapsulation.None, selectors: [['child']], @@ -426,10 +426,10 @@ describe('ViewContainerRef', () => { vars: 1, template: (rf: RenderFlags, cmp: Child) => { if (rf & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δinterpolation1('', cmp.name, '')); + ɵɵtextBinding(0, ɵɵinterpolation1('', cmp.name, '')); } }, inputs: {name: 'name'} @@ -440,7 +440,7 @@ describe('ViewContainerRef', () => { class StarPipe implements PipeTransform { transform(value: any) { return `**${value}**`; } - static ngPipeDef = ΔdefinePipe({ + static ngPipeDef = ɵɵdefinePipe({ name: 'starPipe', type: StarPipe, factory: function StarPipe_Factory() { return new StarPipe(); }, @@ -449,11 +449,11 @@ describe('ViewContainerRef', () => { function SomeComponent_Template_0(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'child'); - Δpipe(1, 'starPipe'); + ɵɵelement(0, 'child'); + ɵɵpipe(1, 'starPipe'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'name', Δbind(ΔpipeBind1(1, 1, 'C'))); + ɵɵelementProperty(0, 'name', ɵɵbind(ɵɵpipeBind1(1, 1, 'C'))); } } @@ -467,7 +467,7 @@ describe('ViewContainerRef', () => { ` }) class SomeComponent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: SomeComponent, encapsulation: ViewEncapsulation.None, selectors: [['some-comp']], @@ -476,19 +476,19 @@ describe('ViewContainerRef', () => { vars: 7, template: (rf: RenderFlags, cmp: SomeComponent) => { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, SomeComponent_Template_0, 2, 3, 'ng-template', [], ['foo', ''], - ΔtemplateRefExtractor); - Δpipe(2, 'starPipe'); - Δelement(3, 'child', ['vcref', '']); - Δpipe(4, 'starPipe'); - Δelement(5, 'child'); + ɵɵtemplateRefExtractor); + ɵɵpipe(2, 'starPipe'); + ɵɵelement(3, 'child', ['vcref', '']); + ɵɵpipe(4, 'starPipe'); + ɵɵelement(5, 'child'); } if (rf & RenderFlags.Update) { - const tplRef = Δreference(1); - ΔelementProperty(3, 'tplRef', Δbind(tplRef)); - ΔelementProperty(3, 'name', Δbind(ΔpipeBind1(2, 3, 'A'))); - ΔelementProperty(5, 'name', Δbind(ΔpipeBind1(4, 5, 'B'))); + const tplRef = ɵɵreference(1); + ɵɵelementProperty(3, 'tplRef', ɵɵbind(tplRef)); + ɵɵelementProperty(3, 'name', ɵɵbind(ɵɵpipeBind1(2, 3, 'A'))); + ɵɵelementProperty(5, 'name', ɵɵbind(ɵɵpipeBind1(4, 5, 'B'))); } }, directives: [Child, DirectiveWithVCRef], @@ -515,10 +515,10 @@ describe('ViewContainerRef', () => { constructor(public vcr: ViewContainerRef) {} - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: InsertionDir, selectors: [['', 'tplDir', '']], - factory: () => new InsertionDir(ΔdirectiveInject(ViewContainerRef as any)), + factory: () => new InsertionDir(ɵɵdirectiveInject(ViewContainerRef as any)), inputs: {tplDir: 'tplDir'} }); } @@ -536,7 +536,7 @@ describe('ViewContainerRef', () => { name = 'Child'; tpl: TemplateRef|null = null; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Child, encapsulation: ViewEncapsulation.None, selectors: [['child']], @@ -545,13 +545,13 @@ describe('ViewContainerRef', () => { vars: 2, template: function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', [AttributeMarker.Bindings, 'tplDir']); - { Δtext(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'div', [AttributeMarker.Bindings, 'tplDir']); + { ɵɵtext(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'tplDir', Δbind(ctx.tpl)); - ΔtextBinding(1, Δbind(ctx.name)); + ɵɵelementProperty(0, 'tplDir', ɵɵbind(ctx.tpl)); + ɵɵtextBinding(1, ɵɵbind(ctx.name)); } }, inputs: {tpl: 'tpl'}, @@ -569,27 +569,27 @@ describe('ViewContainerRef', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, parent: any) { if (rf & RenderFlags.Create) { - Δtemplate( - 0, fooTemplate, 2, 1, 'ng-template', null, ['foo', ''], ΔtemplateRefExtractor); - Δelement(2, 'child'); + ɵɵtemplate( + 0, fooTemplate, 2, 1, 'ng-template', null, ['foo', ''], ɵɵtemplateRefExtractor); + ɵɵelement(2, 'child'); } if (rf & RenderFlags.Update) { - const tplRef = Δreference(1); - ΔelementProperty(2, 'tpl', Δbind(tplRef)); + const tplRef = ɵɵreference(1); + ɵɵelementProperty(2, 'tpl', ɵɵbind(tplRef)); } }, 3, 1, [Child]); function fooTemplate(rf1: RenderFlags, ctx: any) { if (rf1 & RenderFlags.Create) { - ΔelementStart(0, 'div'); - { Δtext(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵtext(1); } + ɵɵelementEnd(); } if (rf1 & RenderFlags.Update) { - const parent = ΔnextContext(); - ΔtextBinding(1, Δbind(parent.name)); + const parent = ɵɵnextContext(); + ɵɵtextBinding(1, ɵɵbind(parent.name)); } } @@ -622,7 +622,7 @@ describe('ViewContainerRef', () => { // @Input() rows !: any[]; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: LoopComp, encapsulation: ViewEncapsulation.None, selectors: [['loop-comp']], @@ -631,12 +631,12 @@ describe('ViewContainerRef', () => { vars: 2, template: function(rf: RenderFlags, loop: any) { if (rf & RenderFlags.Create) { - Δtemplate(0, null, 0, 0, 'ng-template', [AttributeMarker.Bindings, 'ngForOf']); + ɵɵtemplate(0, null, 0, 0, 'ng-template', [AttributeMarker.Bindings, 'ngForOf']); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'ngForOf', Δbind(loop.rows)); - ΔelementProperty(0, 'ngForTemplate', Δbind(loop.tpl)); + ɵɵelementProperty(0, 'ngForOf', ɵɵbind(loop.rows)); + ɵɵelementProperty(0, 'ngForTemplate', ɵɵbind(loop.tpl)); } }, inputs: {tpl: 'tpl', rows: 'rows'}, @@ -661,48 +661,48 @@ describe('ViewContainerRef', () => { */ const Parent = createComponent('parent', function(rf: RenderFlags, parent: any) { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, rowTemplate, 3, 2, 'ng-template', null, ['rowTemplate', ''], - ΔtemplateRefExtractor); - Δelement(2, 'loop-comp'); + ɵɵtemplateRefExtractor); + ɵɵelement(2, 'loop-comp'); } if (rf & RenderFlags.Update) { - const rowTemplateRef = Δreference(1); - ΔelementProperty(2, 'tpl', Δbind(rowTemplateRef)); - ΔelementProperty(2, 'rows', Δbind(parent.rows)); + const rowTemplateRef = ɵɵreference(1); + ɵɵelementProperty(2, 'tpl', ɵɵbind(rowTemplateRef)); + ɵɵelementProperty(2, 'rows', ɵɵbind(parent.rows)); } }, 3, 2, [LoopComp]); function rowTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, cellTemplate, 2, 3, 'ng-template', null, ['cellTemplate', ''], - ΔtemplateRefExtractor); - Δelement(2, 'loop-comp'); + ɵɵtemplateRefExtractor); + ɵɵelement(2, 'loop-comp'); } if (rf & RenderFlags.Update) { const row = ctx.$implicit as any; - const cellTemplateRef = Δreference(1); - ΔelementProperty(2, 'tpl', Δbind(cellTemplateRef)); - ΔelementProperty(2, 'rows', Δbind(row.data)); + const cellTemplateRef = ɵɵreference(1); + ɵɵelementProperty(2, 'tpl', ɵɵbind(cellTemplateRef)); + ɵɵelementProperty(2, 'rows', ɵɵbind(row.data)); } } function cellTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - { Δtext(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵtext(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { const cell = ctx.$implicit as any; - const row = ΔnextContext().$implicit as any; - const parent = ΔnextContext(); - ΔtextBinding(1, Δinterpolation3('', cell, ' - ', row.value, ' - ', parent.name, '')); + const row = ɵɵnextContext().$implicit as any; + const parent = ɵɵnextContext(); + ɵɵtextBinding(1, ɵɵinterpolation3('', cell, ' - ', row.value, ' - ', parent.name, '')); } } @@ -943,7 +943,7 @@ describe('ViewContainerRef', () => { class EmbeddedComponent { constructor() {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: EmbeddedComponent, encapsulation: ViewEncapsulation.None, selectors: [['embedded-cmp']], @@ -953,7 +953,7 @@ describe('ViewContainerRef', () => { template: (rf: RenderFlags, cmp: EmbeddedComponent) => { templateExecutionCounter++; if (rf & RenderFlags.Create) { - Δtext(0, 'foo'); + ɵɵtext(0, 'foo'); } } }); @@ -986,24 +986,24 @@ describe('ViewContainerRef', () => { class EmbeddedComponent { constructor(public s: String) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: EmbeddedComponent, encapsulation: ViewEncapsulation.None, selectors: [['embedded-cmp']], - factory: () => new EmbeddedComponent(ΔdirectiveInject(String)), + factory: () => new EmbeddedComponent(ɵɵdirectiveInject(String)), consts: 1, vars: 0, template: (rf: RenderFlags, cmp: EmbeddedComponent) => { templateExecutionCounter++; if (rf & RenderFlags.Create) { - Δtext(0, 'foo'); + ɵɵtext(0, 'foo'); } } }); } class MyAppModule { - static ngInjectorDef = ΔdefineInjector({ + static ngInjectorDef = ɵɵdefineInjector({ factory: () => new MyAppModule(), imports: [], providers: [ @@ -1018,7 +1018,7 @@ describe('ViewContainerRef', () => { const ngModuleRef = myAppModuleFactory.create(null); class SomeModule { - static ngInjectorDef = ΔdefineInjector({ + static ngInjectorDef = ɵɵdefineInjector({ factory: () => new SomeModule(), providers: [ {provide: NgModuleRef, useValue: ngModuleRef}, @@ -1057,12 +1057,12 @@ describe('ViewContainerRef', () => { class AppComp { constructor(public vcr: ViewContainerRef, public cfr: ComponentFactoryResolver) {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: AppComp, selectors: [['app-comp']], factory: () => new AppComp( - ΔdirectiveInject(ViewContainerRef as any), injectComponentFactoryResolver()), + ɵɵdirectiveInject(ViewContainerRef as any), injectComponentFactoryResolver()), consts: 0, vars: 0, template: (rf: RenderFlags, cmp: AppComp) => {} @@ -1074,7 +1074,7 @@ describe('ViewContainerRef', () => { ngDoCheck() { this.doCheckCount++; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: DynamicComp, selectors: [['dynamic-comp']], factory: () => dynamicComp = new DynamicComp(), @@ -1131,7 +1131,7 @@ describe('ViewContainerRef', () => { }); class EmbeddedComponentWithNgContent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: EmbeddedComponentWithNgContent, encapsulation: ViewEncapsulation.None, selectors: [['embedded-cmp-with-ngcontent']], @@ -1140,10 +1140,10 @@ describe('ViewContainerRef', () => { vars: 0, template: (rf: RenderFlags, cmp: EmbeddedComponentWithNgContent) => { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δprojection(0, 0); - Δelement(1, 'hr'); - Δprojection(2, 1); + ɵɵprojectionDef(); + ɵɵprojection(0, 0); + ɵɵelement(1, 'hr'); + ɵɵprojection(2, 1); } } }); @@ -1171,7 +1171,7 @@ describe('ViewContainerRef', () => { it('should support reprojection of projectable nodes', () => { class Reprojector { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Reprojector, encapsulation: ViewEncapsulation.None, selectors: [['reprojector']], @@ -1180,10 +1180,10 @@ describe('ViewContainerRef', () => { vars: 0, template: (rf: RenderFlags, cmp: Reprojector) => { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'embedded-cmp-with-ngcontent'); - { Δprojection(1, 0); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'embedded-cmp-with-ngcontent'); + { ɵɵprojection(1, 0); } + ɵɵelementEnd(); } }, directives: [EmbeddedComponentWithNgContent] @@ -1229,8 +1229,8 @@ describe('ViewContainerRef', () => { describe('getters', () => { it('should work on elements', () => { function createTemplate() { - Δelement(0, 'header', ['vcref', '']); - Δelement(1, 'footer'); + ɵɵelement(0, 'header', ['vcref', '']); + ɵɵelement(1, 'footer'); } new TemplateFixture(createTemplate, undefined, 2, 0, [DirectiveWithVCRef]); @@ -1248,8 +1248,8 @@ describe('ViewContainerRef', () => { createComponent('header-cmp', function(rf: RenderFlags, ctx: any) {}); function createTemplate() { - Δelement(0, 'header-cmp', ['vcref', '']); - Δelement(1, 'footer'); + ɵɵelement(0, 'header-cmp', ['vcref', '']); + ɵɵelement(1, 'footer'); } new TemplateFixture(createTemplate, undefined, 2, 0, [HeaderComponent, DirectiveWithVCRef]); @@ -1264,8 +1264,8 @@ describe('ViewContainerRef', () => { it('should work on templates', () => { function createTemplate() { - Δtemplate(0, embeddedTemplate, 1, 1, 'ng-template', ['vcref', '']); - Δelement(1, 'footer'); + ɵɵtemplate(0, embeddedTemplate, 1, 1, 'ng-template', ['vcref', '']); + ɵɵelement(1, 'footer'); } new TemplateFixture(createTemplate, () => {}, 2, 0, [DirectiveWithVCRef]); @@ -1280,19 +1280,19 @@ describe('ViewContainerRef', () => { describe('projection', () => { function embeddedTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'span'); - Δtext(1); - ΔelementEnd(); + ɵɵelementStart(0, 'span'); + ɵɵtext(1); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔtextBinding(1, ctx.name); + ɵɵtextBinding(1, ctx.name); } } it('should project the ViewContainerRef content along its host, in an element', () => { @Component({selector: 'child', template: '
'}) class Child { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Child, encapsulation: ViewEncapsulation.None, selectors: [['child']], @@ -1301,10 +1301,10 @@ describe('ViewContainerRef', () => { vars: 0, template: (rf: RenderFlags, cmp: Child) => { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - ΔelementStart(0, 'div'); - { Δprojection(1); } - ΔelementEnd(); + ɵɵprojectionDef(); + ɵɵelementStart(0, 'div'); + { ɵɵprojection(1); } + ɵɵelementEnd(); } } }); @@ -1320,7 +1320,7 @@ describe('ViewContainerRef', () => { }) class Parent { name: string = 'bar'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Parent, encapsulation: ViewEncapsulation.None, selectors: [['parent']], @@ -1329,22 +1329,22 @@ describe('ViewContainerRef', () => { vars: 2, template: (rf: RenderFlags, cmp: Parent) => { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, embeddedTemplate, 2, 1, 'ng-template', null, ['foo', ''], - ΔtemplateRefExtractor); - ΔelementStart(2, 'child'); + ɵɵtemplateRefExtractor); + ɵɵelementStart(2, 'child'); { - ΔelementStart(3, 'header', ['vcref', '']); - { Δtext(4, 'blah'); } - ΔelementEnd(); + ɵɵelementStart(3, 'header', ['vcref', '']); + { ɵɵtext(4, 'blah'); } + ɵɵelementEnd(); } - ΔelementEnd(); + ɵɵelementEnd(); } let tplRef: any; if (rf & RenderFlags.Update) { - tplRef = Δreference(1); - ΔelementProperty(3, 'tplRef', Δbind(tplRef)); - ΔelementProperty(3, 'name', Δbind(cmp.name)); + tplRef = ɵɵreference(1); + ɵɵelementProperty(3, 'tplRef', ɵɵbind(tplRef)); + ɵɵelementProperty(3, 'name', ɵɵbind(cmp.name)); } }, directives: [Child, DirectiveWithVCRef] @@ -1373,7 +1373,7 @@ describe('ViewContainerRef', () => { }) class ChildWithView { show: boolean = true; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ChildWithView, encapsulation: ViewEncapsulation.None, selectors: [['child-with-view']], @@ -1382,21 +1382,21 @@ describe('ViewContainerRef', () => { vars: 0, template: (rf: RenderFlags, cmp: ChildWithView) => { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δtext(0, 'Before (inside)-'); - Δcontainer(1); - Δtext(2, 'After (inside)'); + ɵɵprojectionDef(); + ɵɵtext(0, 'Before (inside)-'); + ɵɵcontainer(1); + ɵɵtext(2, 'After (inside)'); } if (rf & RenderFlags.Update) { - ΔcontainerRefreshStart(1); + ɵɵcontainerRefreshStart(1); if (cmp.show) { - let rf0 = ΔembeddedViewStart(0, 1, 0); + let rf0 = ɵɵembeddedViewStart(0, 1, 0); if (rf0 & RenderFlags.Create) { - Δprojection(0); + ɵɵprojection(0); } - ΔembeddedViewEnd(); + ɵɵembeddedViewEnd(); } - ΔcontainerRefreshEnd(); + ɵɵcontainerRefreshEnd(); } } }); @@ -1416,7 +1416,7 @@ describe('ViewContainerRef', () => { }) class Parent { name: string = 'bar'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Parent, encapsulation: ViewEncapsulation.None, selectors: [['parent']], @@ -1425,21 +1425,21 @@ describe('ViewContainerRef', () => { vars: 2, template: (rf: RenderFlags, cmp: Parent) => { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, embeddedTemplate, 2, 1, 'ng-template', undefined, ['foo', ''], - ΔtemplateRefExtractor); - ΔelementStart(2, 'child-with-view'); - Δtext(3, 'Before projected'); - ΔelementStart(4, 'header', ['vcref', '']); - Δtext(5, 'blah'); - ΔelementEnd(); - Δtext(6, 'After projected-'); - ΔelementEnd(); + ɵɵtemplateRefExtractor); + ɵɵelementStart(2, 'child-with-view'); + ɵɵtext(3, 'Before projected'); + ɵɵelementStart(4, 'header', ['vcref', '']); + ɵɵtext(5, 'blah'); + ɵɵelementEnd(); + ɵɵtext(6, 'After projected-'); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - const tplRef = Δreference(1); - ΔelementProperty(4, 'tplRef', Δbind(tplRef)); - ΔelementProperty(4, 'name', Δbind(cmp.name)); + const tplRef = ɵɵreference(1); + ɵɵelementProperty(4, 'tplRef', ɵɵbind(tplRef)); + ɵɵelementProperty(4, 'name', ɵɵbind(cmp.name)); } }, directives: [ChildWithView, DirectiveWithVCRef] @@ -1466,7 +1466,7 @@ describe('ViewContainerRef', () => { ` }) class ChildWithSelector { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ChildWithSelector, encapsulation: ViewEncapsulation.None, selectors: [['child-with-selector']], @@ -1475,13 +1475,13 @@ describe('ViewContainerRef', () => { vars: 0, template: (rf: RenderFlags, cmp: ChildWithSelector) => { if (rf & RenderFlags.Create) { - ΔprojectionDef([[['header']]]); - ΔelementStart(0, 'first'); - { Δprojection(1, 1); } - ΔelementEnd(); - ΔelementStart(2, 'second'); - { Δprojection(3); } - ΔelementEnd(); + ɵɵprojectionDef([[['header']]]); + ɵɵelementStart(0, 'first'); + { ɵɵprojection(1, 1); } + ɵɵelementEnd(); + ɵɵelementStart(2, 'second'); + { ɵɵprojection(3); } + ɵɵelementEnd(); } }, directives: [ChildWithSelector, DirectiveWithVCRef] @@ -1500,7 +1500,7 @@ describe('ViewContainerRef', () => { }) class Parent { name: string = 'bar'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Parent, encapsulation: ViewEncapsulation.None, selectors: [['parent']], @@ -1510,19 +1510,19 @@ describe('ViewContainerRef', () => { template: (rf: RenderFlags, cmp: Parent) => { let tplRef: any; if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, embeddedTemplate, 2, 1, 'ng-template', null, ['foo', ''], - ΔtemplateRefExtractor); - ΔelementStart(2, 'child-with-selector'); - ΔelementStart(3, 'header', ['vcref', '']); - Δtext(4, 'blah'); - ΔelementEnd(); - ΔelementEnd(); + ɵɵtemplateRefExtractor); + ɵɵelementStart(2, 'child-with-selector'); + ɵɵelementStart(3, 'header', ['vcref', '']); + ɵɵtext(4, 'blah'); + ɵɵelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - tplRef = Δreference(1); - ΔelementProperty(3, 'tplRef', Δbind(tplRef)); - ΔelementProperty(3, 'name', Δbind(cmp.name)); + tplRef = ɵɵreference(1); + ɵɵelementProperty(3, 'tplRef', ɵɵbind(tplRef)); + ɵɵelementProperty(3, 'name', ɵɵbind(cmp.name)); } }, directives: [ChildWithSelector, DirectiveWithVCRef] @@ -1554,7 +1554,7 @@ describe('ViewContainerRef', () => { }) class Parent { name: string = 'bar'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Parent, encapsulation: ViewEncapsulation.None, selectors: [['parent']], @@ -1564,19 +1564,19 @@ describe('ViewContainerRef', () => { template: (rf: RenderFlags, cmp: Parent) => { let tplRef: any; if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, embeddedTemplate, 2, 1, 'ng-template', null, ['foo', ''], - ΔtemplateRefExtractor); - ΔelementStart(2, 'child-with-selector'); - ΔelementStart(3, 'footer', ['vcref', '']); - Δtext(4, 'blah'); - ΔelementEnd(); - ΔelementEnd(); + ɵɵtemplateRefExtractor); + ɵɵelementStart(2, 'child-with-selector'); + ɵɵelementStart(3, 'footer', ['vcref', '']); + ɵɵtext(4, 'blah'); + ɵɵelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - tplRef = Δreference(1); - ΔelementProperty(3, 'tplRef', Δbind(tplRef)); - ΔelementProperty(3, 'name', Δbind(cmp.name)); + tplRef = ɵɵreference(1); + ɵɵelementProperty(3, 'tplRef', ɵɵbind(tplRef)); + ɵɵelementProperty(3, 'name', ɵɵbind(cmp.name)); } }, directives: [ChildWithSelector, DirectiveWithVCRef] @@ -1622,7 +1622,7 @@ describe('ViewContainerRef', () => { ngOnDestroy() { this.log('onDestroy-' + this.name); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ComponentWithHooks, encapsulation: ViewEncapsulation.None, selectors: [['hooks']], @@ -1631,13 +1631,13 @@ describe('ViewContainerRef', () => { vars: 1, template: (rf: RenderFlags, cmp: ComponentWithHooks) => { if (rf & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δinterpolation1('', cmp.name, '')); + ɵɵtextBinding(0, ɵɵinterpolation1('', cmp.name, '')); } }, - features: [ΔNgOnChangesFeature()], + features: [ɵɵNgOnChangesFeature()], inputs: {name: 'name'} }); } @@ -1645,10 +1645,10 @@ describe('ViewContainerRef', () => { it('should call all hooks in correct order when creating with createEmbeddedView', () => { function SomeComponent_Template_0(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δelement(0, 'hooks'); + ɵɵelement(0, 'hooks'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'name', Δbind('C')); + ɵɵelementProperty(0, 'name', ɵɵbind('C')); } } @@ -1662,7 +1662,7 @@ describe('ViewContainerRef', () => { ` }) class SomeComponent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: SomeComponent, selectors: [['some-comp']], factory: () => new SomeComponent(), @@ -1670,21 +1670,21 @@ describe('ViewContainerRef', () => { vars: 3, template: (rf: RenderFlags, cmp: SomeComponent) => { if (rf & RenderFlags.Create) { - Δtemplate( + ɵɵtemplate( 0, SomeComponent_Template_0, 1, 1, 'ng-template', [], ['foo', ''], - ΔtemplateRefExtractor); - Δelement(2, 'hooks', ['vcref', '']); - Δelement(3, 'hooks'); + ɵɵtemplateRefExtractor); + ɵɵelement(2, 'hooks', ['vcref', '']); + ɵɵelement(3, 'hooks'); } if (rf & RenderFlags.Update) { - const tplRef = Δreference(1); - ΔelementProperty(2, 'tplRef', Δbind(tplRef)); - ΔelementProperty(2, 'name', Δbind('A')); - ΔelementProperty(3, 'name', Δbind('B')); + const tplRef = ɵɵreference(1); + ɵɵelementProperty(2, 'tplRef', ɵɵbind(tplRef)); + ɵɵelementProperty(2, 'name', ɵɵbind('A')); + ɵɵelementProperty(3, 'name', ɵɵbind('B')); } }, directives: [ComponentWithHooks, DirectiveWithVCRef], - features: [ΔNgOnChangesFeature()], + features: [ɵɵNgOnChangesFeature()], }); } @@ -1759,7 +1759,7 @@ describe('ViewContainerRef', () => { ` }) class SomeComponent { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: SomeComponent, encapsulation: ViewEncapsulation.None, selectors: [['some-comp']], @@ -1768,16 +1768,16 @@ describe('ViewContainerRef', () => { vars: 2, template: (rf: RenderFlags, cmp: SomeComponent) => { if (rf & RenderFlags.Create) { - Δelement(0, 'hooks', ['vcref', '']); - Δelement(1, 'hooks'); + ɵɵelement(0, 'hooks', ['vcref', '']); + ɵɵelement(1, 'hooks'); } if (rf & RenderFlags.Update) { - ΔelementProperty(0, 'name', Δbind('A')); - ΔelementProperty(1, 'name', Δbind('B')); + ɵɵelementProperty(0, 'name', ɵɵbind('A')); + ɵɵelementProperty(1, 'name', ɵɵbind('B')); } }, directives: [ComponentWithHooks, DirectiveWithVCRef], - features: [ΔNgOnChangesFeature()], + features: [ɵɵNgOnChangesFeature()], }); } @@ -1856,7 +1856,7 @@ describe('ViewContainerRef', () => { class HostBindingCmpt { title = 'initial'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: HostBindingCmpt, selectors: [['host-bindings']], factory: () => new HostBindingCmpt(), @@ -1865,11 +1865,11 @@ describe('ViewContainerRef', () => { template: (rf: RenderFlags, cmp: HostBindingCmpt) => {}, hostBindings: function(rf: RenderFlags, ctx: HostBindingCmpt, elIndex: number) { if (rf & RenderFlags.Create) { - ΔelementHostAttrs(['id', 'attribute']); - ΔallocHostVars(1); + ɵɵelementHostAttrs(['id', 'attribute']); + ɵɵallocHostVars(1); } if (rf & RenderFlags.Update) { - ΔelementProperty(elIndex, 'title', Δbind(ctx.title)); + ɵɵelementProperty(elIndex, 'title', ɵɵbind(ctx.title)); } }, }); @@ -1881,7 +1881,7 @@ describe('ViewContainerRef', () => { ` }) class AppCmpt { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: AppCmpt, selectors: [['app']], factory: () => new AppCmpt(), @@ -1889,7 +1889,7 @@ describe('ViewContainerRef', () => { vars: 0, template: (rf: RenderFlags, cmp: AppCmpt) => { if (rf & RenderFlags.Create) { - Δtemplate(0, null, 0, 0, 'ng-template', ['vcref', '']); + ɵɵtemplate(0, null, 0, 0, 'ng-template', ['vcref', '']); } }, directives: [HostBindingCmpt, DirectiveWithVCRef] @@ -1916,11 +1916,11 @@ describe('ViewContainerRef', () => { @Component({selector: 'app', template: ''}) class AppCmpt { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: AppCmpt, selectors: [['app']], factory: () => new AppCmpt( - ΔdirectiveInject(ViewContainerRef as any), injectComponentFactoryResolver()), + ɵɵdirectiveInject(ViewContainerRef as any), injectComponentFactoryResolver()), consts: 0, vars: 0, template: (rf: RenderFlags, cmp: AppCmpt) => {} @@ -1944,7 +1944,7 @@ describe('ViewContainerRef', () => { const DynamicComponent = createComponent('dynamic-cmpt', function(rf: RenderFlags, parent: any) { if (rf & RenderFlags.Create) { - Δtext(0, 'inserted dynamically'); + ɵɵtext(0, 'inserted dynamically'); } }, 1, 0); @@ -1984,7 +1984,7 @@ describe('ViewContainerRef', () => { ngDoCheck() { this.checkCount++; } /** check count: {{ checkCount }} */ - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: DynamicCompWithBindings, selectors: [['dynamic-cmpt-with-bindings']], factory: () => new DynamicCompWithBindings(), @@ -1992,10 +1992,10 @@ describe('ViewContainerRef', () => { vars: 1, template: (rf: RenderFlags, ctx: DynamicCompWithBindings) => { if (rf & RenderFlags.Create) { - Δtext(0); + ɵɵtext(0); } if (rf & RenderFlags.Update) { - ΔtextBinding(0, Δinterpolation1('check count: ', ctx.checkCount, '')); + ɵɵtextBinding(0, ɵɵinterpolation1('check count: ', ctx.checkCount, '')); } } }); @@ -2020,19 +2020,19 @@ describe('ViewContainerRef', () => { let name = 'text'; const Child = createComponent('child', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - { Δtext(1); } - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + { ɵɵtext(1); } + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - ΔtextBinding(1, Δbind(name)); + ɵɵtextBinding(1, ɵɵbind(name)); } }, 2, 1); const DynamicCompWithChildren = createComponent('dynamic-cmpt-with-children', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'child'); + ɵɵelement(0, 'child'); } }, 1, 0, [Child]); @@ -2058,7 +2058,7 @@ describe('ViewContainerRef', () => { // @ViewChildren('foo') foo !: QueryList; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: DynamicCompWithViewQueries, selectors: [['dynamic-cmpt-with-view-queries']], factory: () => dynamicComp = new DynamicCompWithViewQueries(), @@ -2066,18 +2066,18 @@ describe('ViewContainerRef', () => { vars: 0, template: (rf: RenderFlags, ctx: DynamicCompWithViewQueries) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['bar', ''], ['foo', '']); + ɵɵelement(0, 'div', ['bar', ''], ['foo', '']); } // testing only fooEl = getNativeByIndex(0, getLView()) as RElement; }, viewQuery: function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔviewQuery(['foo'], true, null); + ɵɵviewQuery(['foo'], true, null); } if (rf & RenderFlags.Update) { let tmp: any; - ΔqueryRefresh(tmp = ΔloadViewQuery>()) && + ɵɵqueryRefresh(tmp = ɵɵloadViewQuery>()) && (ctx.foo = tmp as QueryList); } } @@ -2102,7 +2102,7 @@ describe('ViewContainerRef', () => { ngOnDestroy() { this.viewRef.destroy(); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: CompWithListenerThatDestroysItself, selectors: [['comp-with-listener-and-on-destroy']], consts: 2, @@ -2110,18 +2110,18 @@ describe('ViewContainerRef', () => { /** */ template: function CompTemplate(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'button'); + ɵɵelementStart(0, 'button'); { - Δlistener('click', function() { return ctx.onClick(); }); - Δtext(1, 'Click me'); + ɵɵlistener('click', function() { return ctx.onClick(); }); + ɵɵtext(1, 'Click me'); } - ΔelementEnd(); + ɵɵelementEnd(); } }, // We want the ViewRef, so we rely on the knowledge that `ViewRef` is actually given // when injecting `ChangeDetectorRef`. factory: () => new CompWithListenerThatDestroysItself( - ΔdirectiveInject(ChangeDetectorRef as any)), + ɵɵdirectiveInject(ChangeDetectorRef as any)), }); } @@ -2129,7 +2129,7 @@ describe('ViewContainerRef', () => { it('should not error when destroying a view with listeners twice', () => { const CompWithChildListener = createComponent('test-app', (rf: RenderFlags, ctx: any) => { if (rf & RenderFlags.Create) { - Δelement(0, 'comp-with-listener-and-on-destroy'); + ɵɵelement(0, 'comp-with-listener-and-on-destroy'); } }, 1, 0, [CompWithListenerThatDestroysItself]); diff --git a/packages/core/test/sanitization/sanatization_spec.ts b/packages/core/test/sanitization/sanatization_spec.ts index 2b5b2eee51..6c42ec2120 100644 --- a/packages/core/test/sanitization/sanatization_spec.ts +++ b/packages/core/test/sanitization/sanatization_spec.ts @@ -12,7 +12,7 @@ import {HEADER_OFFSET, LView} from '@angular/core/src/render3/interfaces/view'; import {setTNodeAndViewData} from '@angular/core/src/render3/state'; import {bypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript, bypassSanitizationTrustStyle, bypassSanitizationTrustUrl} from '../../src/sanitization/bypass'; -import {getUrlSanitizer, ΔsanitizeHtml, ΔsanitizeResourceUrl, ΔsanitizeScript, ΔsanitizeStyle, ΔsanitizeUrl, ΔsanitizeUrlOrResourceUrl} from '../../src/sanitization/sanitization'; +import {getUrlSanitizer, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl} from '../../src/sanitization/sanitization'; import {SecurityContext} from '../../src/sanitization/security'; function fakeLView(): LView { @@ -27,54 +27,54 @@ describe('sanitization', () => { toString() { return this.value; } } it('should sanitize html', () => { - expect(ΔsanitizeHtml('
')).toEqual('
'); - expect(ΔsanitizeHtml(new Wrap('
'))).toEqual('
'); - expect(ΔsanitizeHtml('')) + expect(ɵɵsanitizeHtml('
')).toEqual('
'); + expect(ɵɵsanitizeHtml(new Wrap('
'))).toEqual('
'); + expect(ɵɵsanitizeHtml('')) .toEqual(''); - expect(ΔsanitizeHtml(new Wrap(''))) + expect(ɵɵsanitizeHtml(new Wrap(''))) .toEqual(''); - expect(ΔsanitizeHtml(bypassSanitizationTrustUrl(''))) + expect(ɵɵsanitizeHtml(bypassSanitizationTrustUrl(''))) .toEqual(''); - expect(ΔsanitizeHtml(bypassSanitizationTrustHtml(''))) + expect(ɵɵsanitizeHtml(bypassSanitizationTrustHtml(''))) .toEqual(''); }); it('should sanitize url', () => { - expect(ΔsanitizeUrl('http://server')).toEqual('http://server'); - expect(ΔsanitizeUrl(new Wrap('http://server'))).toEqual('http://server'); - expect(ΔsanitizeUrl('javascript:true')).toEqual('unsafe:javascript:true'); - expect(ΔsanitizeUrl(new Wrap('javascript:true'))).toEqual('unsafe:javascript:true'); - expect(ΔsanitizeUrl(bypassSanitizationTrustHtml('javascript:true'))) + expect(ɵɵsanitizeUrl('http://server')).toEqual('http://server'); + expect(ɵɵsanitizeUrl(new Wrap('http://server'))).toEqual('http://server'); + expect(ɵɵsanitizeUrl('javascript:true')).toEqual('unsafe:javascript:true'); + expect(ɵɵsanitizeUrl(new Wrap('javascript:true'))).toEqual('unsafe:javascript:true'); + expect(ɵɵsanitizeUrl(bypassSanitizationTrustHtml('javascript:true'))) .toEqual('unsafe:javascript:true'); - expect(ΔsanitizeUrl(bypassSanitizationTrustUrl('javascript:true'))).toEqual('javascript:true'); + expect(ɵɵsanitizeUrl(bypassSanitizationTrustUrl('javascript:true'))).toEqual('javascript:true'); }); it('should sanitize resourceUrl', () => { const ERROR = 'unsafe value used in a resource URL context (see http://g.co/ng/security#xss)'; - expect(() => ΔsanitizeResourceUrl('http://server')).toThrowError(ERROR); - expect(() => ΔsanitizeResourceUrl('javascript:true')).toThrowError(ERROR); - expect(() => ΔsanitizeResourceUrl(bypassSanitizationTrustHtml('javascript:true'))) + expect(() => ɵɵsanitizeResourceUrl('http://server')).toThrowError(ERROR); + expect(() => ɵɵsanitizeResourceUrl('javascript:true')).toThrowError(ERROR); + expect(() => ɵɵsanitizeResourceUrl(bypassSanitizationTrustHtml('javascript:true'))) .toThrowError(ERROR); - expect(ΔsanitizeResourceUrl(bypassSanitizationTrustResourceUrl('javascript:true'))) + expect(ɵɵsanitizeResourceUrl(bypassSanitizationTrustResourceUrl('javascript:true'))) .toEqual('javascript:true'); }); it('should sanitize style', () => { - expect(ΔsanitizeStyle('red')).toEqual('red'); - expect(ΔsanitizeStyle(new Wrap('red'))).toEqual('red'); - expect(ΔsanitizeStyle('url("http://server")')).toEqual('unsafe'); - expect(ΔsanitizeStyle(new Wrap('url("http://server")'))).toEqual('unsafe'); - expect(ΔsanitizeStyle(bypassSanitizationTrustHtml('url("http://server")'))).toEqual('unsafe'); - expect(ΔsanitizeStyle(bypassSanitizationTrustStyle('url("http://server")'))) + expect(ɵɵsanitizeStyle('red')).toEqual('red'); + expect(ɵɵsanitizeStyle(new Wrap('red'))).toEqual('red'); + expect(ɵɵsanitizeStyle('url("http://server")')).toEqual('unsafe'); + expect(ɵɵsanitizeStyle(new Wrap('url("http://server")'))).toEqual('unsafe'); + expect(ɵɵsanitizeStyle(bypassSanitizationTrustHtml('url("http://server")'))).toEqual('unsafe'); + expect(ɵɵsanitizeStyle(bypassSanitizationTrustStyle('url("http://server")'))) .toEqual('url("http://server")'); }); it('should sanitize script', () => { const ERROR = 'unsafe value used in a script context'; - expect(() => ΔsanitizeScript('true')).toThrowError(ERROR); - expect(() => ΔsanitizeScript('true')).toThrowError(ERROR); - expect(() => ΔsanitizeScript(bypassSanitizationTrustHtml('true'))).toThrowError(ERROR); - expect(ΔsanitizeScript(bypassSanitizationTrustScript('true'))).toEqual('true'); + expect(() => ɵɵsanitizeScript('true')).toThrowError(ERROR); + expect(() => ɵɵsanitizeScript('true')).toThrowError(ERROR); + expect(() => ɵɵsanitizeScript(bypassSanitizationTrustHtml('true'))).toThrowError(ERROR); + expect(ɵɵsanitizeScript(bypassSanitizationTrustScript('true'))).toEqual('true'); }); it('should select correct sanitizer for URL props', () => { @@ -83,7 +83,7 @@ describe('sanitization', () => { const schema = SECURITY_SCHEMA(); const contextsByProp: Map> = new Map(); const sanitizerNameByContext: Map = new Map([ - [SecurityContext.URL, ΔsanitizeUrl], [SecurityContext.RESOURCE_URL, ΔsanitizeResourceUrl] + [SecurityContext.URL, ɵɵsanitizeUrl], [SecurityContext.RESOURCE_URL, ɵɵsanitizeResourceUrl] ]); Object.keys(schema).forEach(key => { const context = schema[key]; @@ -102,28 +102,29 @@ describe('sanitization', () => { it('should sanitize resourceUrls via sanitizeUrlOrResourceUrl', () => { const ERROR = 'unsafe value used in a resource URL context (see http://g.co/ng/security#xss)'; - expect(() => ΔsanitizeUrlOrResourceUrl('http://server', 'iframe', 'src')).toThrowError(ERROR); - expect(() => ΔsanitizeUrlOrResourceUrl('javascript:true', 'iframe', 'src')).toThrowError(ERROR); + expect(() => ɵɵsanitizeUrlOrResourceUrl('http://server', 'iframe', 'src')).toThrowError(ERROR); + expect(() => ɵɵsanitizeUrlOrResourceUrl('javascript:true', 'iframe', 'src')) + .toThrowError(ERROR); expect( - () => ΔsanitizeUrlOrResourceUrl( + () => ɵɵsanitizeUrlOrResourceUrl( bypassSanitizationTrustHtml('javascript:true'), 'iframe', 'src')) .toThrowError(ERROR); - expect(ΔsanitizeUrlOrResourceUrl( + expect(ɵɵsanitizeUrlOrResourceUrl( bypassSanitizationTrustResourceUrl('javascript:true'), 'iframe', 'src')) .toEqual('javascript:true'); }); it('should sanitize urls via sanitizeUrlOrResourceUrl', () => { - expect(ΔsanitizeUrlOrResourceUrl('http://server', 'a', 'href')).toEqual('http://server'); - expect(ΔsanitizeUrlOrResourceUrl(new Wrap('http://server'), 'a', 'href')) + expect(ɵɵsanitizeUrlOrResourceUrl('http://server', 'a', 'href')).toEqual('http://server'); + expect(ɵɵsanitizeUrlOrResourceUrl(new Wrap('http://server'), 'a', 'href')) .toEqual('http://server'); - expect(ΔsanitizeUrlOrResourceUrl('javascript:true', 'a', 'href')) + expect(ɵɵsanitizeUrlOrResourceUrl('javascript:true', 'a', 'href')) .toEqual('unsafe:javascript:true'); - expect(ΔsanitizeUrlOrResourceUrl(new Wrap('javascript:true'), 'a', 'href')) + expect(ɵɵsanitizeUrlOrResourceUrl(new Wrap('javascript:true'), 'a', 'href')) .toEqual('unsafe:javascript:true'); - expect(ΔsanitizeUrlOrResourceUrl(bypassSanitizationTrustHtml('javascript:true'), 'a', 'href')) + expect(ɵɵsanitizeUrlOrResourceUrl(bypassSanitizationTrustHtml('javascript:true'), 'a', 'href')) .toEqual('unsafe:javascript:true'); - expect(ΔsanitizeUrlOrResourceUrl(bypassSanitizationTrustUrl('javascript:true'), 'a', 'href')) + expect(ɵɵsanitizeUrlOrResourceUrl(bypassSanitizationTrustUrl('javascript:true'), 'a', 'href')) .toEqual('javascript:true'); }); }); diff --git a/packages/core/test/strict_types/inheritance_spec.ts b/packages/core/test/strict_types/inheritance_spec.ts index 39693adc84..b1b5261bd5 100644 --- a/packages/core/test/strict_types/inheritance_spec.ts +++ b/packages/core/test/strict_types/inheritance_spec.ts @@ -6,10 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ -import {ΔComponentDefWithMeta, ΔPipeDefWithMeta as PipeDefWithMeta} from '@angular/core'; +import {ɵɵComponentDefWithMeta, ɵɵPipeDefWithMeta as PipeDefWithMeta} from '@angular/core'; declare class SuperComponent { - static ngComponentDef: ΔComponentDefWithMeta; + static ngComponentDef: ɵɵComponentDefWithMeta; } declare class SubComponent extends SuperComponent { @@ -18,7 +18,7 @@ declare class SubComponent extends SuperComponent { // would produce type errors when the "strictFunctionTypes" option is enabled. onlyInSubtype: string; - static ngComponentDef: ΔComponentDefWithMeta; + static ngComponentDef: ɵɵComponentDefWithMeta; } declare class SuperPipe { static ngPipeDef: PipeDefWithMeta; } diff --git a/packages/core/test/test_bed_spec.ts b/packages/core/test/test_bed_spec.ts index ecae7a035d..0070e06797 100644 --- a/packages/core/test/test_bed_spec.ts +++ b/packages/core/test/test_bed_spec.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {Component, Directive, ErrorHandler, Inject, Injectable, InjectionToken, NgModule, Optional, Pipe, ɵsetClassMetadata as setClassMetadata, ΔdefineComponent as defineComponent, Δtext as text} from '@angular/core'; +import {Component, Directive, ErrorHandler, Inject, Injectable, InjectionToken, NgModule, Optional, Pipe, ɵsetClassMetadata as setClassMetadata, ɵɵdefineComponent as defineComponent, ɵɵtext as text} from '@angular/core'; import {TestBed, getTestBed} from '@angular/core/testing/src/test_bed'; import {By} from '@angular/platform-browser'; import {expect} from '@angular/platform-browser/testing/src/matchers'; diff --git a/packages/core/test/view/ng_module_spec.ts b/packages/core/test/view/ng_module_spec.ts index fe8e7bae96..88b85f4441 100644 --- a/packages/core/test/view/ng_module_spec.ts +++ b/packages/core/test/view/ng_module_spec.ts @@ -9,7 +9,7 @@ import {NgModuleRef} from '@angular/core'; import {InjectFlags, inject} from '@angular/core/src/di'; import {INJECTOR, Injector} from '@angular/core/src/di/injector'; -import {ΔInjectableDef, ΔdefineInjectable} from '@angular/core/src/di/interface/defs'; +import {ɵɵInjectableDef, ɵɵdefineInjectable} from '@angular/core/src/di/interface/defs'; import {NgModuleDefinition, NgModuleProviderDef, NodeFlags} from '@angular/core/src/view'; import {moduleDef} from '@angular/core/src/view/ng_module'; import {createNgModuleRef} from '@angular/core/src/view/refs'; @@ -26,14 +26,14 @@ class MyChildModule {} class NotMyModule {} class Bar { - static ngInjectableDef: ΔInjectableDef = ΔdefineInjectable({ + static ngInjectableDef: ɵɵInjectableDef = ɵɵdefineInjectable({ factory: () => new Bar(), providedIn: MyModule, }); } class Baz { - static ngInjectableDef: ΔInjectableDef = ΔdefineInjectable({ + static ngInjectableDef: ɵɵInjectableDef = ɵɵdefineInjectable({ factory: () => new Baz(), providedIn: NotMyModule, }); @@ -42,7 +42,7 @@ class Baz { class HasNormalDep { constructor(public foo: Foo) {} - static ngInjectableDef: ΔInjectableDef = ΔdefineInjectable({ + static ngInjectableDef: ɵɵInjectableDef = ɵɵdefineInjectable({ factory: () => new HasNormalDep(inject(Foo)), providedIn: MyModule, }); @@ -51,7 +51,7 @@ class HasNormalDep { class HasDefinedDep { constructor(public bar: Bar) {} - static ngInjectableDef: ΔInjectableDef = ΔdefineInjectable({ + static ngInjectableDef: ɵɵInjectableDef = ɵɵdefineInjectable({ factory: () => new HasDefinedDep(inject(Bar)), providedIn: MyModule, }); @@ -60,14 +60,14 @@ class HasDefinedDep { class HasOptionalDep { constructor(public baz: Baz|null) {} - static ngInjectableDef: ΔInjectableDef = ΔdefineInjectable({ + static ngInjectableDef: ɵɵInjectableDef = ɵɵdefineInjectable({ factory: () => new HasOptionalDep(inject(Baz, InjectFlags.Optional)), providedIn: MyModule, }); } class ChildDep { - static ngInjectableDef: ΔInjectableDef = ΔdefineInjectable({ + static ngInjectableDef: ɵɵInjectableDef = ɵɵdefineInjectable({ factory: () => new ChildDep(), providedIn: MyChildModule, }); @@ -75,7 +75,7 @@ class ChildDep { class FromChildWithOptionalDep { constructor(public baz: Baz|null) {} - static ngInjectableDef: ΔInjectableDef = ΔdefineInjectable({ + static ngInjectableDef: ɵɵInjectableDef = ɵɵdefineInjectable({ factory: () => new FromChildWithOptionalDep(inject(Baz, InjectFlags.Default)), providedIn: MyChildModule, }); @@ -85,7 +85,7 @@ class FromChildWithSkipSelfDep { constructor( public skipSelfChildDep: ChildDep|null, public selfChildDep: ChildDep|null, public optionalSelfBar: Bar|null) {} - static ngInjectableDef: ΔInjectableDef = ΔdefineInjectable({ + static ngInjectableDef: ɵɵInjectableDef = ɵɵdefineInjectable({ factory: () => new FromChildWithSkipSelfDep( inject(ChildDep, InjectFlags.SkipSelf|InjectFlags.Optional), inject(ChildDep, InjectFlags.Self), @@ -208,7 +208,7 @@ describe('NgModuleRef_ injector', () => { ngOnDestroy(): void { Service.destroyed++; } - static ngInjectableDef: ΔInjectableDef = ΔdefineInjectable({ + static ngInjectableDef: ɵɵInjectableDef = ɵɵdefineInjectable({ factory: () => new Service(), providedIn: 'root', }); diff --git a/packages/core/testing/src/r3_test_bed_compiler.ts b/packages/core/testing/src/r3_test_bed_compiler.ts index 8fdb0b4873..b5222215ac 100644 --- a/packages/core/testing/src/r3_test_bed_compiler.ts +++ b/packages/core/testing/src/r3_test_bed_compiler.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {ApplicationInitStatus, COMPILER_OPTIONS, Compiler, Component, Directive, ErrorHandler, ModuleWithComponentFactories, NgModule, NgModuleFactory, NgZone, Injector, Pipe, PlatformRef, Provider, Type, ɵcompileComponent as compileComponent, ɵcompileDirective as compileDirective, ɵcompileNgModuleDefs as compileNgModuleDefs, ɵcompilePipe as compilePipe, ɵgetInjectableDef as getInjectableDef, ɵNG_COMPONENT_DEF as NG_COMPONENT_DEF, ɵNG_DIRECTIVE_DEF as NG_DIRECTIVE_DEF, ɵNG_INJECTOR_DEF as NG_INJECTOR_DEF, ɵNG_MODULE_DEF as NG_MODULE_DEF, ɵNG_PIPE_DEF as NG_PIPE_DEF, ɵRender3ComponentFactory as ComponentFactory, ɵRender3NgModuleRef as NgModuleRef, ΔInjectableDef as InjectableDef, ɵNgModuleFactory as R3NgModuleFactory, ɵNgModuleTransitiveScopes as NgModuleTransitiveScopes, ɵNgModuleType as NgModuleType, ɵDirectiveDef as DirectiveDef, ɵpatchComponentDefWithScope as patchComponentDefWithScope, ɵtransitiveScopesFor as transitiveScopesFor,} from '@angular/core'; +import {ApplicationInitStatus, COMPILER_OPTIONS, Compiler, Component, Directive, ErrorHandler, ModuleWithComponentFactories, NgModule, NgModuleFactory, NgZone, Injector, Pipe, PlatformRef, Provider, Type, ɵcompileComponent as compileComponent, ɵcompileDirective as compileDirective, ɵcompileNgModuleDefs as compileNgModuleDefs, ɵcompilePipe as compilePipe, ɵgetInjectableDef as getInjectableDef, ɵNG_COMPONENT_DEF as NG_COMPONENT_DEF, ɵNG_DIRECTIVE_DEF as NG_DIRECTIVE_DEF, ɵNG_INJECTOR_DEF as NG_INJECTOR_DEF, ɵNG_MODULE_DEF as NG_MODULE_DEF, ɵNG_PIPE_DEF as NG_PIPE_DEF, ɵRender3ComponentFactory as ComponentFactory, ɵRender3NgModuleRef as NgModuleRef, ɵɵInjectableDef as InjectableDef, ɵNgModuleFactory as R3NgModuleFactory, ɵNgModuleTransitiveScopes as NgModuleTransitiveScopes, ɵNgModuleType as NgModuleType, ɵDirectiveDef as DirectiveDef, ɵpatchComponentDefWithScope as patchComponentDefWithScope, ɵtransitiveScopesFor as transitiveScopesFor,} from '@angular/core'; import {ResourceLoader} from '@angular/compiler'; import {clearResolutionOfComponentResourcesQueue, restoreComponentResolutionQueue, resolveComponentResources, isComponentDefPendingResolution} from '../../src/metadata/resource_loading'; diff --git a/packages/core/testing/src/test_bed.ts b/packages/core/testing/src/test_bed.ts index 880e1ae3da..77961d62bb 100644 --- a/packages/core/testing/src/test_bed.ts +++ b/packages/core/testing/src/test_bed.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {ApplicationInitStatus, CompilerOptions, Component, Directive, InjectFlags, InjectionToken, Injector, NgModule, NgModuleFactory, NgModuleRef, NgZone, Optional, Pipe, PlatformRef, Provider, SchemaMetadata, SkipSelf, StaticProvider, Type, ɵAPP_ROOT as APP_ROOT, ɵDepFlags as DepFlags, ɵNodeFlags as NodeFlags, ɵclearOverrides as clearOverrides, ɵgetInjectableDef as getInjectableDef, ɵivyEnabled as ivyEnabled, ɵoverrideComponentView as overrideComponentView, ɵoverrideProvider as overrideProvider, ɵstringify as stringify, ΔInjectableDef} from '@angular/core'; +import {ApplicationInitStatus, CompilerOptions, Component, Directive, InjectFlags, InjectionToken, Injector, NgModule, NgModuleFactory, NgModuleRef, NgZone, Optional, Pipe, PlatformRef, Provider, SchemaMetadata, SkipSelf, StaticProvider, Type, ɵAPP_ROOT as APP_ROOT, ɵDepFlags as DepFlags, ɵNodeFlags as NodeFlags, ɵclearOverrides as clearOverrides, ɵgetInjectableDef as getInjectableDef, ɵivyEnabled as ivyEnabled, ɵoverrideComponentView as overrideComponentView, ɵoverrideProvider as overrideProvider, ɵstringify as stringify, ɵɵInjectableDef} from '@angular/core'; import {AsyncTestCompleter} from './async_test_completer'; import {ComponentFixture} from './component_fixture'; @@ -559,7 +559,7 @@ export class TestBedViewEngine implements Injector, TestBed { deps?: any[], }, deprecated = false): void { - let def: ΔInjectableDef|null = null; + let def: ɵɵInjectableDef|null = null; if (typeof token !== 'string' && (def = getInjectableDef(token)) && def.providedIn === 'root') { if (provider.useFactory) { this._rootProviderOverrides.push( diff --git a/packages/platform-browser/src/browser/meta.ts b/packages/platform-browser/src/browser/meta.ts index e32b984a46..eb8ad345d3 100644 --- a/packages/platform-browser/src/browser/meta.ts +++ b/packages/platform-browser/src/browser/meta.ts @@ -7,7 +7,7 @@ */ import {DOCUMENT} from '@angular/common'; -import {Inject, Injectable, Δinject} from '@angular/core'; +import {Inject, Injectable, ɵɵinject} from '@angular/core'; import {DomAdapter, getDOM} from '../dom/dom_adapter'; @@ -34,7 +34,7 @@ export type MetaDefinition = { * Factory to create Meta service. */ export function createMeta() { - return new Meta(Δinject(DOCUMENT)); + return new Meta(ɵɵinject(DOCUMENT)); } /** diff --git a/packages/platform-browser/src/browser/title.ts b/packages/platform-browser/src/browser/title.ts index a5f7b807fa..623f2f8ea8 100644 --- a/packages/platform-browser/src/browser/title.ts +++ b/packages/platform-browser/src/browser/title.ts @@ -7,7 +7,7 @@ */ import {DOCUMENT} from '@angular/common'; -import {Inject, Injectable, Δinject} from '@angular/core'; +import {Inject, Injectable, ɵɵinject} from '@angular/core'; import {getDOM} from '../dom/dom_adapter'; @@ -15,7 +15,7 @@ import {getDOM} from '../dom/dom_adapter'; * Factory to create Title service. */ export function createTitle() { - return new Title(Δinject(DOCUMENT)); + return new Title(ɵɵinject(DOCUMENT)); } /** diff --git a/tools/public_api_guard/core/core.d.ts b/tools/public_api_guard/core/core.d.ts index a38bf4a5e3..74f2fd5e9b 100644 --- a/tools/public_api_guard/core/core.d.ts +++ b/tools/public_api_guard/core/core.d.ts @@ -260,7 +260,7 @@ export declare class DefaultIterableDiffer implements IterableDiffer, Iter } /** @deprecated */ -export declare const defineInjectable: typeof ΔdefineInjectable; +export declare const defineInjectable: typeof ɵɵdefineInjectable; export declare function destroyPlatform(): void; @@ -378,7 +378,7 @@ export interface HostListenerDecorator { } /** @deprecated */ -export declare const inject: typeof Δinject; +export declare const inject: typeof ɵɵinject; export interface Inject { token: any; @@ -653,6 +653,369 @@ export interface OutputDecorator { new (bindingPropertyName?: string): any; } +export declare function ɵɵallocHostVars(count: number): void; + +export interface ɵɵBaseDef { + /** @deprecated */ readonly declaredInputs: { + [P in keyof T]: string; + }; + readonly inputs: { + [P in keyof T]: string; + }; + readonly outputs: { + [P in keyof T]: string; + }; +} + +export declare function ɵɵbind(value: T): T | NO_CHANGE; + +export declare type ɵɵComponentDefWithMeta = ComponentDef; + +export declare function ɵɵcomponentHostSyntheticListener(eventName: string, listenerFn: (e?: any) => any, useCapture?: boolean, eventTargetResolver?: GlobalTargetResolver): void; + +export declare function ɵɵcomponentHostSyntheticProperty(index: number, propName: string, value: T | NO_CHANGE, sanitizer?: SanitizerFn | null, nativeOnly?: boolean): void; + +export declare function ɵɵcontainer(index: number): void; + +export declare function ɵɵcontainerRefreshEnd(): void; + +export declare function ɵɵcontainerRefreshStart(index: number): void; + +export declare function ɵɵcontentQuery(directiveIndex: number, predicate: Type | string[], descend: boolean, read: any): QueryList; + +export declare const ɵɵdefaultStyleSanitizer: StyleSanitizeFn; + +export declare function ɵɵdefineBase(baseDefinition: { + inputs?: { + [P in keyof T]?: string | [string, string]; + }; + outputs?: { + [P in keyof T]?: string; + }; +}): ɵɵBaseDef; + +export declare function ɵɵdefineComponent(componentDefinition: { + type: Type; + selectors: CssSelectorList; + factory: FactoryFn; + consts: number; + vars: number; + inputs?: { + [P in keyof T]?: string | [string, string]; + }; + outputs?: { + [P in keyof T]?: string; + }; + hostBindings?: HostBindingsFunction; + contentQueries?: ContentQueriesFunction; + exportAs?: string[]; + template: ComponentTemplate; + ngContentSelectors?: string[]; + viewQuery?: ViewQueriesFunction | null; + features?: ComponentDefFeature[]; + encapsulation?: ViewEncapsulation; + data?: { + [kind: string]: any; + }; + styles?: string[]; + changeDetection?: ChangeDetectionStrategy; + directives?: DirectiveTypesOrFactory | null; + pipes?: PipeTypesOrFactory | null; + schemas?: SchemaMetadata[] | null; +}): never; + +export declare const ɵɵdefineDirective: (directiveDefinition: { + type: Type; + selectors: (string | SelectorFlags)[][]; + factory: FactoryFn; + inputs?: { [P in keyof T]?: string | [string, string] | undefined; } | undefined; + outputs?: { [P in keyof T]?: string | undefined; } | undefined; + features?: DirectiveDefFeature[] | undefined; + hostBindings?: HostBindingsFunction | undefined; + contentQueries?: ContentQueriesFunction | undefined; + viewQuery?: ViewQueriesFunction | null | undefined; + exportAs?: string[] | undefined; +}) => never; + +export declare function ɵɵdefineInjectable(opts: { + providedIn?: Type | 'root' | 'any' | null; + factory: () => T; +}): never; + +export declare function ɵɵdefineInjector(options: { + factory: () => any; + providers?: any[]; + imports?: any[]; +}): never; + +export declare function ɵɵdefineNgModule(def: { + type: T; + bootstrap?: Type[] | (() => Type[]); + declarations?: Type[] | (() => Type[]); + imports?: Type[] | (() => Type[]); + exports?: Type[] | (() => Type[]); + schemas?: SchemaMetadata[] | null; +}): never; + +export declare function ɵɵdefinePipe(pipeDef: { + name: string; + type: Type; + factory: FactoryFn; + pure?: boolean; +}): never; + +export declare type ɵɵDirectiveDefWithMeta = DirectiveDef; + +export declare function ɵɵdirectiveInject(token: Type | InjectionToken): T; +export declare function ɵɵdirectiveInject(token: Type | InjectionToken, flags: InjectFlags): T; + +export declare function ɵɵdisableBindings(): void; + +export declare function ɵɵelement(index: number, name: string, attrs?: TAttributes | null, localRefs?: string[] | null): void; + +export declare function ɵɵelementAttribute(index: number, name: string, value: any, sanitizer?: SanitizerFn | null, namespace?: string): void; + +export declare function ɵɵelementClassProp(index: number, classIndex: number, value: boolean | PlayerFactory, forceOverride?: boolean): void; + +export declare function ɵɵelementContainerEnd(): void; + +export declare function ɵɵelementContainerStart(index: number, attrs?: TAttributes | null, localRefs?: string[] | null): void; + +export declare function ɵɵelementEnd(): void; + +export declare function ɵɵelementHostAttrs(attrs: TAttributes): void; + +export declare function ɵɵelementHostClassProp(classIndex: number, value: boolean | PlayerFactory, forceOverride?: boolean): void; + +export declare function ɵɵelementHostStyleProp(styleIndex: number, value: string | number | String | PlayerFactory | null, suffix?: string | null, forceOverride?: boolean): void; + +export declare function ɵɵelementHostStyling(classBindingNames?: string[] | null, styleBindingNames?: string[] | null, styleSanitizer?: StyleSanitizeFn | null): void; + +export declare function ɵɵelementHostStylingApply(): void; + +export declare function ɵɵelementHostStylingMap(classes: { + [key: string]: any; +} | string | NO_CHANGE | null, styles?: { + [styleName: string]: any; +} | NO_CHANGE | null): void; + +export declare function ɵɵelementProperty(index: number, propName: string, value: T | NO_CHANGE, sanitizer?: SanitizerFn | null, nativeOnly?: boolean): void; + +export declare function ɵɵelementStart(index: number, name: string, attrs?: TAttributes | null, localRefs?: string[] | null): void; + +export declare function ɵɵelementStyleProp(index: number, styleIndex: number, value: string | number | String | PlayerFactory | null, suffix?: string | null, forceOverride?: boolean): void; + +export declare function ɵɵelementStyling(classBindingNames?: string[] | null, styleBindingNames?: string[] | null, styleSanitizer?: StyleSanitizeFn | null): void; + +export declare function ɵɵelementStylingApply(index: number): void; + +export declare function ɵɵelementStylingMap(index: number, classes: { + [key: string]: any; +} | string | NO_CHANGE | null, styles?: { + [styleName: string]: any; +} | NO_CHANGE | null): void; + +export declare function ɵɵembeddedViewEnd(): void; + +export declare function ɵɵembeddedViewStart(viewBlockId: number, consts: number, vars: number): RenderFlags; + +export declare function ɵɵenableBindings(): void; + +export declare function ɵɵgetCurrentView(): OpaqueViewState; + +export declare function ɵɵgetFactoryOf(type: Type): ((type: Type | null) => T) | null; + +export declare function ɵɵgetInheritedFactory(type: Type): (type: Type) => T; + +export declare function ɵɵi18n(index: number, message: string, subTemplateIndex?: number): void; + +export declare function ɵɵi18nApply(index: number): void; + +export declare function ɵɵi18nAttributes(index: number, values: string[]): void; + +export declare function ɵɵi18nEnd(): void; + +export declare function ɵɵi18nExp(expression: T | NO_CHANGE): void; + +/** @deprecated */ +export declare function ɵɵi18nLocalize(input: string, placeholders?: { + [key: string]: string; +}): string; + +export declare function ɵɵi18nPostprocess(message: string, replacements?: { + [key: string]: (string | string[]); +}): string; + +export declare function ɵɵi18nStart(index: number, message: string, subTemplateIndex?: number): void; + +export declare function ɵɵInheritDefinitionFeature(definition: DirectiveDef | ComponentDef): void; + +export declare function ɵɵinject(token: Type | InjectionToken): T; +export declare function ɵɵinject(token: Type | InjectionToken, flags?: InjectFlags): T | null; + +export interface ɵɵInjectableDef { + factory: () => T; + providedIn: InjectorType | 'root' | 'any' | null; + value: T | undefined; +} + +export declare function ɵɵinjectAttribute(attrNameToInject: string): string | null; + +export interface ɵɵInjectorDef { + factory: () => T; + imports: (InjectorType | InjectorTypeWithProviders)[]; + providers: (Type | ValueProvider | ExistingProvider | FactoryProvider | ConstructorProvider | StaticClassProvider | ClassProvider | any[])[]; +} + +export declare function ɵɵinterpolation1(prefix: string, v0: any, suffix: string): string | NO_CHANGE; + +export declare function ɵɵinterpolation2(prefix: string, v0: any, i0: string, v1: any, suffix: string): string | NO_CHANGE; + +export declare function ɵɵinterpolation3(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): string | NO_CHANGE; + +export declare function ɵɵinterpolation4(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): string | NO_CHANGE; + +export declare function ɵɵinterpolation5(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string): string | NO_CHANGE; + +export declare function ɵɵinterpolation6(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string): string | NO_CHANGE; + +export declare function ɵɵinterpolation7(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): string | NO_CHANGE; + +export declare function ɵɵinterpolation8(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string): string | NO_CHANGE; + +export declare function ɵɵinterpolationV(values: any[]): string | NO_CHANGE; + +export declare function ɵɵlistener(eventName: string, listenerFn: (e?: any) => any, useCapture?: boolean, eventTargetResolver?: GlobalTargetResolver): void; + +export declare function ɵɵload(index: number): T; + +export declare function ɵɵloadContentQuery(): QueryList; + +export declare function ɵɵloadViewQuery(): T; + +export declare function ɵɵnamespaceHTML(): void; + +export declare function ɵɵnamespaceMathML(): void; + +export declare function ɵɵnamespaceSVG(): void; + +export declare function ɵɵnextContext(level?: number): T; + +export declare type ɵɵNgModuleDefWithMeta = NgModuleDef; + +export declare function ɵɵNgOnChangesFeature(): DirectiveDefFeature; + +export declare function ɵɵpipe(index: number, pipeName: string): any; + +export declare function ɵɵpipeBind1(index: number, slotOffset: number, v1: any): any; + +export declare function ɵɵpipeBind2(index: number, slotOffset: number, v1: any, v2: any): any; + +export declare function ɵɵpipeBind3(index: number, slotOffset: number, v1: any, v2: any, v3: any): any; + +export declare function ɵɵpipeBind4(index: number, slotOffset: number, v1: any, v2: any, v3: any, v4: any): any; + +export declare function ɵɵpipeBindV(index: number, slotOffset: number, values: any[]): any; + +export declare type ɵɵPipeDefWithMeta = PipeDef; + +export declare function ɵɵprojection(nodeIndex: number, selectorIndex?: number, attrs?: TAttributes): void; + +export declare function ɵɵprojectionDef(selectors?: CssSelectorList[]): void; + +export declare function ɵɵProvidersFeature(providers: Provider[], viewProviders?: Provider[]): (definition: DirectiveDef) => void; + +export declare function ɵɵpureFunction0(slotOffset: number, pureFn: () => T, thisArg?: any): T; + +export declare function ɵɵpureFunction1(slotOffset: number, pureFn: (v: any) => any, exp: any, thisArg?: any): any; + +export declare function ɵɵpureFunction2(slotOffset: number, pureFn: (v1: any, v2: any) => any, exp1: any, exp2: any, thisArg?: any): any; + +export declare function ɵɵpureFunction3(slotOffset: number, pureFn: (v1: any, v2: any, v3: any) => any, exp1: any, exp2: any, exp3: any, thisArg?: any): any; + +export declare function ɵɵpureFunction4(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, thisArg?: any): any; + +export declare function ɵɵpureFunction5(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, thisArg?: any): any; + +export declare function ɵɵpureFunction6(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, thisArg?: any): any; + +export declare function ɵɵpureFunction7(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, thisArg?: any): any; + +export declare function ɵɵpureFunction8(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any, v8: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, exp8: any, thisArg?: any): any; + +export declare function ɵɵpureFunctionV(slotOffset: number, pureFn: (...v: any[]) => any, exps: any[], thisArg?: any): any; + +export declare function ɵɵqueryRefresh(queryList: QueryList): boolean; + +export declare function ɵɵreference(index: number): T; + +export declare function ɵɵresolveBody(element: RElement & { + ownerDocument: Document; +}): { + name: string; + target: HTMLElement; +}; + +export declare function ɵɵresolveDocument(element: RElement & { + ownerDocument: Document; +}): { + name: string; + target: Document; +}; + +export declare function ɵɵresolveWindow(element: RElement & { + ownerDocument: Document; +}): { + name: string; + target: Window | null; +}; + +export declare function ɵɵrestoreView(viewToRestore: OpaqueViewState): void; + +export declare function ɵɵsanitizeHtml(unsafeHtml: any): string; + +export declare function ɵɵsanitizeResourceUrl(unsafeResourceUrl: any): string; + +export declare function ɵɵsanitizeScript(unsafeScript: any): string; + +export declare function ɵɵsanitizeStyle(unsafeStyle: any): string; + +export declare function ɵɵsanitizeUrl(unsafeUrl: any): string; + +export declare function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any; + +export declare function ɵɵselect(index: number): void; + +export declare function ɵɵsetComponentScope(type: ComponentType, directives: Type[], pipes: Type[]): void; + +export declare function ɵɵsetNgModuleScope(type: any, scope: { + declarations?: Type[] | (() => Type[]); + imports?: Type[] | (() => Type[]); + exports?: Type[] | (() => Type[]); +}): void; + +export declare function ɵɵstaticContentQuery(directiveIndex: number, predicate: Type | string[], descend: boolean, read: any): void; + +export declare function ɵɵstaticViewQuery(predicate: Type | string[], descend: boolean, read: any): void; + +export declare function ɵɵtemplate(index: number, templateFn: ComponentTemplate | null, consts: number, vars: number, tagName?: string | null, attrs?: TAttributes | null, localRefs?: string[] | null, localRefExtractor?: LocalRefExtractor): void; + +export declare function ɵɵtemplateRefExtractor(tNode: TNode, currentView: LView): ViewEngine_TemplateRef<{}> | null; + +export declare function ɵɵtext(index: number, value?: any): void; + +export declare function ɵɵtextBinding(index: number, value: T | NO_CHANGE): void; + +export declare function ɵɵviewQuery(predicate: Type | string[], descend: boolean, read: any): QueryList; + export declare const PACKAGE_ROOT_URL: InjectionToken; export interface Pipe { @@ -1043,366 +1406,3 @@ export interface WtfScopeFn { } export declare const wtfStartTimeRange: (rangeType: string, action: string) => any; - -export declare function ΔallocHostVars(count: number): void; - -export interface ΔBaseDef { - /** @deprecated */ readonly declaredInputs: { - [P in keyof T]: string; - }; - readonly inputs: { - [P in keyof T]: string; - }; - readonly outputs: { - [P in keyof T]: string; - }; -} - -export declare function Δbind(value: T): T | NO_CHANGE; - -export declare type ΔComponentDefWithMeta = ComponentDef; - -export declare function ΔcomponentHostSyntheticListener(eventName: string, listenerFn: (e?: any) => any, useCapture?: boolean, eventTargetResolver?: GlobalTargetResolver): void; - -export declare function ΔcomponentHostSyntheticProperty(index: number, propName: string, value: T | NO_CHANGE, sanitizer?: SanitizerFn | null, nativeOnly?: boolean): void; - -export declare function Δcontainer(index: number): void; - -export declare function ΔcontainerRefreshEnd(): void; - -export declare function ΔcontainerRefreshStart(index: number): void; - -export declare function ΔcontentQuery(directiveIndex: number, predicate: Type | string[], descend: boolean, read: any): QueryList; - -export declare const ΔdefaultStyleSanitizer: StyleSanitizeFn; - -export declare function ΔdefineBase(baseDefinition: { - inputs?: { - [P in keyof T]?: string | [string, string]; - }; - outputs?: { - [P in keyof T]?: string; - }; -}): ΔBaseDef; - -export declare function ΔdefineComponent(componentDefinition: { - type: Type; - selectors: CssSelectorList; - factory: FactoryFn; - consts: number; - vars: number; - inputs?: { - [P in keyof T]?: string | [string, string]; - }; - outputs?: { - [P in keyof T]?: string; - }; - hostBindings?: HostBindingsFunction; - contentQueries?: ContentQueriesFunction; - exportAs?: string[]; - template: ComponentTemplate; - ngContentSelectors?: string[]; - viewQuery?: ViewQueriesFunction | null; - features?: ComponentDefFeature[]; - encapsulation?: ViewEncapsulation; - data?: { - [kind: string]: any; - }; - styles?: string[]; - changeDetection?: ChangeDetectionStrategy; - directives?: DirectiveTypesOrFactory | null; - pipes?: PipeTypesOrFactory | null; - schemas?: SchemaMetadata[] | null; -}): never; - -export declare const ΔdefineDirective: (directiveDefinition: { - type: Type; - selectors: (string | SelectorFlags)[][]; - factory: FactoryFn; - inputs?: { [P in keyof T]?: string | [string, string] | undefined; } | undefined; - outputs?: { [P in keyof T]?: string | undefined; } | undefined; - features?: DirectiveDefFeature[] | undefined; - hostBindings?: HostBindingsFunction | undefined; - contentQueries?: ContentQueriesFunction | undefined; - viewQuery?: ViewQueriesFunction | null | undefined; - exportAs?: string[] | undefined; -}) => never; - -export declare function ΔdefineInjectable(opts: { - providedIn?: Type | 'root' | 'any' | null; - factory: () => T; -}): never; - -export declare function ΔdefineInjector(options: { - factory: () => any; - providers?: any[]; - imports?: any[]; -}): never; - -export declare function ΔdefineNgModule(def: { - type: T; - bootstrap?: Type[] | (() => Type[]); - declarations?: Type[] | (() => Type[]); - imports?: Type[] | (() => Type[]); - exports?: Type[] | (() => Type[]); - schemas?: SchemaMetadata[] | null; -}): never; - -export declare function ΔdefinePipe(pipeDef: { - name: string; - type: Type; - factory: FactoryFn; - pure?: boolean; -}): never; - -export declare type ΔDirectiveDefWithMeta = DirectiveDef; - -export declare function ΔdirectiveInject(token: Type | InjectionToken): T; -export declare function ΔdirectiveInject(token: Type | InjectionToken, flags: InjectFlags): T; - -export declare function ΔdisableBindings(): void; - -export declare function Δelement(index: number, name: string, attrs?: TAttributes | null, localRefs?: string[] | null): void; - -export declare function ΔelementAttribute(index: number, name: string, value: any, sanitizer?: SanitizerFn | null, namespace?: string): void; - -export declare function ΔelementClassProp(index: number, classIndex: number, value: boolean | PlayerFactory, forceOverride?: boolean): void; - -export declare function ΔelementContainerEnd(): void; - -export declare function ΔelementContainerStart(index: number, attrs?: TAttributes | null, localRefs?: string[] | null): void; - -export declare function ΔelementEnd(): void; - -export declare function ΔelementHostAttrs(attrs: TAttributes): void; - -export declare function ΔelementHostClassProp(classIndex: number, value: boolean | PlayerFactory, forceOverride?: boolean): void; - -export declare function ΔelementHostStyleProp(styleIndex: number, value: string | number | String | PlayerFactory | null, suffix?: string | null, forceOverride?: boolean): void; - -export declare function ΔelementHostStyling(classBindingNames?: string[] | null, styleBindingNames?: string[] | null, styleSanitizer?: StyleSanitizeFn | null): void; - -export declare function ΔelementHostStylingApply(): void; - -export declare function ΔelementHostStylingMap(classes: { - [key: string]: any; -} | string | NO_CHANGE | null, styles?: { - [styleName: string]: any; -} | NO_CHANGE | null): void; - -export declare function ΔelementProperty(index: number, propName: string, value: T | NO_CHANGE, sanitizer?: SanitizerFn | null, nativeOnly?: boolean): void; - -export declare function ΔelementStart(index: number, name: string, attrs?: TAttributes | null, localRefs?: string[] | null): void; - -export declare function ΔelementStyleProp(index: number, styleIndex: number, value: string | number | String | PlayerFactory | null, suffix?: string | null, forceOverride?: boolean): void; - -export declare function ΔelementStyling(classBindingNames?: string[] | null, styleBindingNames?: string[] | null, styleSanitizer?: StyleSanitizeFn | null): void; - -export declare function ΔelementStylingApply(index: number): void; - -export declare function ΔelementStylingMap(index: number, classes: { - [key: string]: any; -} | string | NO_CHANGE | null, styles?: { - [styleName: string]: any; -} | NO_CHANGE | null): void; - -export declare function ΔembeddedViewEnd(): void; - -export declare function ΔembeddedViewStart(viewBlockId: number, consts: number, vars: number): RenderFlags; - -export declare function ΔenableBindings(): void; - -export declare function ΔgetCurrentView(): OpaqueViewState; - -export declare function ΔgetFactoryOf(type: Type): ((type: Type | null) => T) | null; - -export declare function ΔgetInheritedFactory(type: Type): (type: Type) => T; - -export declare function Δi18n(index: number, message: string, subTemplateIndex?: number): void; - -export declare function Δi18nApply(index: number): void; - -export declare function Δi18nAttributes(index: number, values: string[]): void; - -export declare function Δi18nEnd(): void; - -export declare function Δi18nExp(expression: T | NO_CHANGE): void; - -/** @deprecated */ -export declare function Δi18nLocalize(input: string, placeholders?: { - [key: string]: string; -}): string; - -export declare function Δi18nPostprocess(message: string, replacements?: { - [key: string]: (string | string[]); -}): string; - -export declare function Δi18nStart(index: number, message: string, subTemplateIndex?: number): void; - -export declare function ΔInheritDefinitionFeature(definition: DirectiveDef | ComponentDef): void; - -export declare function Δinject(token: Type | InjectionToken): T; -export declare function Δinject(token: Type | InjectionToken, flags?: InjectFlags): T | null; - -export interface ΔInjectableDef { - factory: () => T; - providedIn: InjectorType | 'root' | 'any' | null; - value: T | undefined; -} - -export declare function ΔinjectAttribute(attrNameToInject: string): string | null; - -export interface ΔInjectorDef { - factory: () => T; - imports: (InjectorType | InjectorTypeWithProviders)[]; - providers: (Type | ValueProvider | ExistingProvider | FactoryProvider | ConstructorProvider | StaticClassProvider | ClassProvider | any[])[]; -} - -export declare function Δinterpolation1(prefix: string, v0: any, suffix: string): string | NO_CHANGE; - -export declare function Δinterpolation2(prefix: string, v0: any, i0: string, v1: any, suffix: string): string | NO_CHANGE; - -export declare function Δinterpolation3(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): string | NO_CHANGE; - -export declare function Δinterpolation4(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): string | NO_CHANGE; - -export declare function Δinterpolation5(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string): string | NO_CHANGE; - -export declare function Δinterpolation6(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string): string | NO_CHANGE; - -export declare function Δinterpolation7(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): string | NO_CHANGE; - -export declare function Δinterpolation8(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string): string | NO_CHANGE; - -export declare function ΔinterpolationV(values: any[]): string | NO_CHANGE; - -export declare function Δlistener(eventName: string, listenerFn: (e?: any) => any, useCapture?: boolean, eventTargetResolver?: GlobalTargetResolver): void; - -export declare function Δload(index: number): T; - -export declare function ΔloadContentQuery(): QueryList; - -export declare function ΔloadViewQuery(): T; - -export declare function ΔnamespaceHTML(): void; - -export declare function ΔnamespaceMathML(): void; - -export declare function ΔnamespaceSVG(): void; - -export declare function ΔnextContext(level?: number): T; - -export declare type ΔNgModuleDefWithMeta = NgModuleDef; - -export declare function ΔNgOnChangesFeature(): DirectiveDefFeature; - -export declare function Δpipe(index: number, pipeName: string): any; - -export declare function ΔpipeBind1(index: number, slotOffset: number, v1: any): any; - -export declare function ΔpipeBind2(index: number, slotOffset: number, v1: any, v2: any): any; - -export declare function ΔpipeBind3(index: number, slotOffset: number, v1: any, v2: any, v3: any): any; - -export declare function ΔpipeBind4(index: number, slotOffset: number, v1: any, v2: any, v3: any, v4: any): any; - -export declare function ΔpipeBindV(index: number, slotOffset: number, values: any[]): any; - -export declare type ΔPipeDefWithMeta = PipeDef; - -export declare function Δprojection(nodeIndex: number, selectorIndex?: number, attrs?: TAttributes): void; - -export declare function ΔprojectionDef(selectors?: CssSelectorList[]): void; - -export declare function ΔProvidersFeature(providers: Provider[], viewProviders?: Provider[]): (definition: DirectiveDef) => void; - -export declare function ΔpureFunction0(slotOffset: number, pureFn: () => T, thisArg?: any): T; - -export declare function ΔpureFunction1(slotOffset: number, pureFn: (v: any) => any, exp: any, thisArg?: any): any; - -export declare function ΔpureFunction2(slotOffset: number, pureFn: (v1: any, v2: any) => any, exp1: any, exp2: any, thisArg?: any): any; - -export declare function ΔpureFunction3(slotOffset: number, pureFn: (v1: any, v2: any, v3: any) => any, exp1: any, exp2: any, exp3: any, thisArg?: any): any; - -export declare function ΔpureFunction4(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, thisArg?: any): any; - -export declare function ΔpureFunction5(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, thisArg?: any): any; - -export declare function ΔpureFunction6(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, thisArg?: any): any; - -export declare function ΔpureFunction7(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, thisArg?: any): any; - -export declare function ΔpureFunction8(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any, v8: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, exp8: any, thisArg?: any): any; - -export declare function ΔpureFunctionV(slotOffset: number, pureFn: (...v: any[]) => any, exps: any[], thisArg?: any): any; - -export declare function ΔqueryRefresh(queryList: QueryList): boolean; - -export declare function Δreference(index: number): T; - -export declare function ΔresolveBody(element: RElement & { - ownerDocument: Document; -}): { - name: string; - target: HTMLElement; -}; - -export declare function ΔresolveDocument(element: RElement & { - ownerDocument: Document; -}): { - name: string; - target: Document; -}; - -export declare function ΔresolveWindow(element: RElement & { - ownerDocument: Document; -}): { - name: string; - target: Window | null; -}; - -export declare function ΔrestoreView(viewToRestore: OpaqueViewState): void; - -export declare function ΔsanitizeHtml(unsafeHtml: any): string; - -export declare function ΔsanitizeResourceUrl(unsafeResourceUrl: any): string; - -export declare function ΔsanitizeScript(unsafeScript: any): string; - -export declare function ΔsanitizeStyle(unsafeStyle: any): string; - -export declare function ΔsanitizeUrl(unsafeUrl: any): string; - -export declare function ΔsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any; - -export declare function Δselect(index: number): void; - -export declare function ΔsetComponentScope(type: ComponentType, directives: Type[], pipes: Type[]): void; - -export declare function ΔsetNgModuleScope(type: any, scope: { - declarations?: Type[] | (() => Type[]); - imports?: Type[] | (() => Type[]); - exports?: Type[] | (() => Type[]); -}): void; - -export declare function ΔstaticContentQuery(directiveIndex: number, predicate: Type | string[], descend: boolean, read: any): void; - -export declare function ΔstaticViewQuery(predicate: Type | string[], descend: boolean, read: any): void; - -export declare function Δtemplate(index: number, templateFn: ComponentTemplate | null, consts: number, vars: number, tagName?: string | null, attrs?: TAttributes | null, localRefs?: string[] | null, localRefExtractor?: LocalRefExtractor): void; - -export declare function ΔtemplateRefExtractor(tNode: TNode, currentView: LView): ViewEngine_TemplateRef<{}> | null; - -export declare function Δtext(index: number, value?: any): void; - -export declare function ΔtextBinding(index: number, value: T | NO_CHANGE): void; - -export declare function ΔviewQuery(predicate: Type | string[], descend: boolean, read: any): QueryList; diff --git a/tools/ts-api-guardian/index.bzl b/tools/ts-api-guardian/index.bzl index 07f7dfb99b..6cd399d249 100644 --- a/tools/ts-api-guardian/index.bzl +++ b/tools/ts-api-guardian/index.bzl @@ -24,7 +24,9 @@ def ts_api_guardian_test( golden, actual, data = [], - strip_export_pattern = ["^__", "^ɵ"], + # Match one, but not two ɵ characters. Ivy instructions are currently prefixed with ɵɵ and + # should appear in ts_api_guardian tests. + strip_export_pattern = ["^__", "^ɵ[^ɵ]"], allow_module_identifiers = COMMON_MODULE_IDENTIFIERS, use_angular_tag_rules = True, **kwargs):