diff --git a/aio/content/guide/deprecations.md b/aio/content/guide/deprecations.md index 023455cdce..ab5bdc28ad 100644 --- a/aio/content/guide/deprecations.md +++ b/aio/content/guide/deprecations.md @@ -51,8 +51,8 @@ Tip: In the [API reference section](api) of this doc site, deprecated APIs are i | --- | ----------- | --------------------- | ----- | | [`CollectionChangeRecord`](api/core/CollectionChangeRecord) | [`IterableChangeRecord`](api/core/IterableChangeRecord) | v4 | none | | [`DefaultIterableDiffer`](api/core/DefaultIterableDiffer) | n/a | v4 | Not part of public API. | -| [`defineInjectable`](api/core/defineInjectable) | `ΔdefineInjectable` | v8 | Used only in generated code. No source code should depend on this API. | -| [`inject`](api/core/inject) | `Δinject` | v8 | Used only in generated code. No source code should depend on this API. | +| [`defineInjectable`](api/core/defineInjectable) | `ɵɵdefineInjectable` | v8 | Used only in generated code. No source code should depend on this API. | +| [`inject`](api/core/inject) | `ɵɵinject` | v8 | Used only in generated code. No source code should depend on this API. | | [`ReflectiveInjector`](api/core/ReflectiveInjector) | [`Injector.create`](api/core/Injector#create) | v5 | See [`ReflectiveInjector`](#reflectiveinjector) | | [`ReflectiveKey`](api/core/ReflectiveKey) | none | v5 | none | | [`RenderComponentType`](api/core/RenderComponentType) | [`RendererType2`](api/core/RendererType2) and [`Renderer2`](api/core/Renderer2) | v4 | none | diff --git a/aio/tools/transforms/angular-api-package/index.js b/aio/tools/transforms/angular-api-package/index.js index 1645490a01..55baa84af0 100644 --- a/aio/tools/transforms/angular-api-package/index.js +++ b/aio/tools/transforms/angular-api-package/index.js @@ -9,198 +9,210 @@ const Package = require('dgeni').Package; const basePackage = require('../angular-base-package'); const typeScriptPackage = require('dgeni-packages/typescript'); -const { API_SOURCE_PATH, API_TEMPLATES_PATH, requireFolder } = require('../config'); +const {API_SOURCE_PATH, API_TEMPLATES_PATH, requireFolder} = require('../config'); -module.exports = new Package('angular-api', [basePackage, typeScriptPackage]) +module.exports = + new Package('angular-api', [basePackage, typeScriptPackage]) - // Register the processors - .processor(require('./processors/splitDescription')) - .processor(require('./processors/convertPrivateClassesToInterfaces')) - .processor(require('./processors/generateApiListDoc')) - .processor(require('./processors/addNotYetDocumentedProperty')) - .processor(require('./processors/mergeDecoratorDocs')) - .processor(require('./processors/extractDecoratedClasses')) - .processor(require('./processors/extractPipeParams')) - .processor(require('./processors/matchUpDirectiveDecorators')) - .processor(require('./processors/addMetadataAliases')) - .processor(require('./processors/computeApiBreadCrumbs')) - .processor(require('./processors/filterContainedDocs')) - .processor(require('./processors/processClassLikeMembers')) - .processor(require('./processors/markBarredODocsAsPrivate')) - .processor(require('./processors/filterPrivateDocs')) - .processor(require('./processors/computeSearchTitle')) - .processor(require('./processors/simplifyMemberAnchors')) - .processor(require('./processors/computeStability')) - .processor(require('./processors/removeInjectableConstructors')) - .processor(require('./processors/collectPackageContentDocs')) - .processor(require('./processors/processPackages')) - .processor(require('./processors/processNgModuleDocs')) - .processor(require('./processors/fixupRealProjectRelativePath')) - .processor(require('./processors/processAliasDocs')) + // Register the processors + .processor(require('./processors/splitDescription')) + .processor(require('./processors/convertPrivateClassesToInterfaces')) + .processor(require('./processors/generateApiListDoc')) + .processor(require('./processors/addNotYetDocumentedProperty')) + .processor(require('./processors/mergeDecoratorDocs')) + .processor(require('./processors/extractDecoratedClasses')) + .processor(require('./processors/extractPipeParams')) + .processor(require('./processors/matchUpDirectiveDecorators')) + .processor(require('./processors/addMetadataAliases')) + .processor(require('./processors/computeApiBreadCrumbs')) + .processor(require('./processors/filterContainedDocs')) + .processor(require('./processors/processClassLikeMembers')) + .processor(require('./processors/markBarredODocsAsPrivate')) + .processor(require('./processors/filterPrivateDocs')) + .processor(require('./processors/computeSearchTitle')) + .processor(require('./processors/simplifyMemberAnchors')) + .processor(require('./processors/computeStability')) + .processor(require('./processors/removeInjectableConstructors')) + .processor(require('./processors/collectPackageContentDocs')) + .processor(require('./processors/processPackages')) + .processor(require('./processors/processNgModuleDocs')) + .processor(require('./processors/fixupRealProjectRelativePath')) + .processor(require('./processors/processAliasDocs')) - /** - * These are the API doc types that will be rendered to actual files. - * This is a super set of the exported docs, since we convert some classes to - * more Angular specific API types, such as decorators and directives. - */ - .factory(function API_DOC_TYPES_TO_RENDER(EXPORT_DOC_TYPES) { - return EXPORT_DOC_TYPES.concat(['decorator', 'directive', 'ngmodule', 'pipe', 'package']); - }) + /** + * These are the API doc types that will be rendered to actual files. + * This is a super set of the exported docs, since we convert some classes to + * more Angular specific API types, such as decorators and directives. + */ + .factory(function API_DOC_TYPES_TO_RENDER(EXPORT_DOC_TYPES) { + return EXPORT_DOC_TYPES.concat(['decorator', 'directive', 'ngmodule', 'pipe', 'package']); + }) - /** - * These are the doc types that are contained within other docs - */ - .factory(function API_CONTAINED_DOC_TYPES() { - return ['member', 'function-overload', 'get-accessor-info', 'set-accessor-info', 'parameter']; - }) + /** + * These are the doc types that are contained within other docs + */ + .factory(function API_CONTAINED_DOC_TYPES() { + return [ + 'member', 'function-overload', 'get-accessor-info', 'set-accessor-info', 'parameter' + ]; + }) - /** - * These are the doc types that are API docs, including ones that will be merged into container docs, - * such as members and overloads. - */ - .factory(function API_DOC_TYPES(API_DOC_TYPES_TO_RENDER, API_CONTAINED_DOC_TYPES) { - return API_DOC_TYPES_TO_RENDER.concat(API_CONTAINED_DOC_TYPES); - }) + /** + * These are the doc types that are API docs, including ones that will be merged into + * container docs, + * such as members and overloads. + */ + .factory(function API_DOC_TYPES(API_DOC_TYPES_TO_RENDER, API_CONTAINED_DOC_TYPES) { + return API_DOC_TYPES_TO_RENDER.concat(API_CONTAINED_DOC_TYPES); + }) - .factory(require('./readers/package-content')) + .factory(require('./readers/package-content')) - // Where do we get the source files? - .config(function(readTypeScriptModules, readFilesProcessor, collectExamples, tsParser, packageContentFileReader) { + // Where do we get the source files? + .config(function( + readTypeScriptModules, readFilesProcessor, collectExamples, tsParser, + packageContentFileReader) { - // Tell TypeScript how to load modules that start with with `@angular` - tsParser.options.paths = { '@angular/*': [API_SOURCE_PATH + '/*'] }; - tsParser.options.baseUrl = '.'; + // Tell TypeScript how to load modules that start with with `@angular` + tsParser.options.paths = {'@angular/*': [API_SOURCE_PATH + '/*']}; + tsParser.options.baseUrl = '.'; - // API files are typescript - readTypeScriptModules.basePath = API_SOURCE_PATH; - readTypeScriptModules.ignoreExportsMatching = [/^_|^Δ|^VERSION$/]; - readTypeScriptModules.hidePrivateMembers = true; + // API files are typescript + readTypeScriptModules.basePath = API_SOURCE_PATH; + readTypeScriptModules.ignoreExportsMatching = [/^_|^ɵɵ|^VERSION$/]; + readTypeScriptModules.hidePrivateMembers = true; - // NOTE: This list should be in sync with tools/public_api_guard/BUILD.bazel - readTypeScriptModules.sourceFiles = [ - 'animations/index.ts', - 'animations/browser/index.ts', - 'animations/browser/testing/index.ts', - 'common/http/index.ts', - 'common/http/testing/index.ts', - 'common/index.ts', - 'common/testing/index.ts', - 'common/upgrade/index.ts', - 'core/index.ts', - 'core/testing/index.ts', - 'elements/index.ts', - 'forms/index.ts', - // Current plan for Angular v8 is to hide documentation for the @angular/http package - // 'http/index.ts', - // 'http/testing/index.ts', - 'platform-browser/index.ts', - 'platform-browser/animations/index.ts', - 'platform-browser/testing/index.ts', - 'platform-browser-dynamic/index.ts', - 'platform-browser-dynamic/testing/index.ts', - 'platform-server/index.ts', - 'platform-server/testing/index.ts', - 'platform-webworker/index.ts', - 'platform-webworker-dynamic/index.ts', - 'router/index.ts', - 'router/testing/index.ts', - 'router/upgrade/index.ts', - 'service-worker/index.ts', - 'upgrade/index.ts', - 'upgrade/static/index.ts', - ]; + // NOTE: This list should be in sync with tools/public_api_guard/BUILD.bazel + readTypeScriptModules.sourceFiles = [ + 'animations/index.ts', + 'animations/browser/index.ts', + 'animations/browser/testing/index.ts', + 'common/http/index.ts', + 'common/http/testing/index.ts', + 'common/index.ts', + 'common/testing/index.ts', + 'common/upgrade/index.ts', + 'core/index.ts', + 'core/testing/index.ts', + 'elements/index.ts', + 'forms/index.ts', + // Current plan for Angular v8 is to hide documentation for the @angular/http package + // 'http/index.ts', + // 'http/testing/index.ts', + 'platform-browser/index.ts', + 'platform-browser/animations/index.ts', + 'platform-browser/testing/index.ts', + 'platform-browser-dynamic/index.ts', + 'platform-browser-dynamic/testing/index.ts', + 'platform-server/index.ts', + 'platform-server/testing/index.ts', + 'platform-webworker/index.ts', + 'platform-webworker-dynamic/index.ts', + 'router/index.ts', + 'router/testing/index.ts', + 'router/upgrade/index.ts', + 'service-worker/index.ts', + 'upgrade/index.ts', + 'upgrade/static/index.ts', + ]; - readFilesProcessor.fileReaders.push(packageContentFileReader); + readFilesProcessor.fileReaders.push(packageContentFileReader); - // API Examples - readFilesProcessor.sourceFiles = [ - { - basePath: API_SOURCE_PATH, - include: API_SOURCE_PATH + '/examples/**/*', - fileReader: 'exampleFileReader' - }, - { - basePath: API_SOURCE_PATH, - include: API_SOURCE_PATH + '/**/PACKAGE.md', - fileReader: 'packageContentFileReader' - } - ]; - collectExamples.exampleFolders.push('examples'); - }) + // API Examples + readFilesProcessor.sourceFiles = [ + { + basePath: API_SOURCE_PATH, + include: API_SOURCE_PATH + '/examples/**/*', + fileReader: 'exampleFileReader' + }, + { + basePath: API_SOURCE_PATH, + include: API_SOURCE_PATH + '/**/PACKAGE.md', + fileReader: 'packageContentFileReader' + } + ]; + collectExamples.exampleFolders.push('examples'); + }) - // Configure jsdoc-style tag parsing - .config(function(parseTagsProcessor, getInjectables, tsHost) { - // Load up all the tag definitions in the tag-defs folder - parseTagsProcessor.tagDefinitions = - parseTagsProcessor.tagDefinitions.concat(getInjectables(requireFolder(__dirname, './tag-defs'))); - // We don't want license headers to be joined to the first API item's comment - tsHost.concatMultipleLeadingComments = false; - }) + // Configure jsdoc-style tag parsing + .config(function(parseTagsProcessor, getInjectables, tsHost) { + // Load up all the tag definitions in the tag-defs folder + parseTagsProcessor.tagDefinitions = parseTagsProcessor.tagDefinitions.concat( + getInjectables(requireFolder(__dirname, './tag-defs'))); + // We don't want license headers to be joined to the first API item's comment + tsHost.concatMultipleLeadingComments = false; + }) - .config(function(computeStability, splitDescription, addNotYetDocumentedProperty, API_DOC_TYPES_TO_RENDER, API_DOC_TYPES) { - computeStability.docTypes = API_DOC_TYPES_TO_RENDER; - // Only split the description on the API docs - splitDescription.docTypes = API_DOC_TYPES.concat(['package-content']); - addNotYetDocumentedProperty.docTypes = API_DOC_TYPES; - }) + .config(function( + computeStability, splitDescription, addNotYetDocumentedProperty, + API_DOC_TYPES_TO_RENDER, API_DOC_TYPES) { + computeStability.docTypes = API_DOC_TYPES_TO_RENDER; + // Only split the description on the API docs + splitDescription.docTypes = API_DOC_TYPES.concat(['package-content']); + addNotYetDocumentedProperty.docTypes = API_DOC_TYPES; + }) - .config(function(mergeDecoratorDocs) { - mergeDecoratorDocs.propertiesToMerge = [ - 'shortDescription', - 'description', - 'security', - 'deprecated', - 'see', - 'usageNotes', - ]; - }) + .config(function(mergeDecoratorDocs) { + mergeDecoratorDocs.propertiesToMerge = [ + 'shortDescription', + 'description', + 'security', + 'deprecated', + 'see', + 'usageNotes', + ]; + }) - .config(function(checkContentRules, API_DOC_TYPES, API_CONTAINED_DOC_TYPES) { - addMinLengthRules(checkContentRules); - addHeadingRules(checkContentRules, API_DOC_TYPES); - addAllowedPropertiesRules(checkContentRules, API_CONTAINED_DOC_TYPES); - checkContentRules.failOnContentErrors = true; - }) + .config(function(checkContentRules, API_DOC_TYPES, API_CONTAINED_DOC_TYPES) { + addMinLengthRules(checkContentRules); + addHeadingRules(checkContentRules, API_DOC_TYPES); + addAllowedPropertiesRules(checkContentRules, API_CONTAINED_DOC_TYPES); + checkContentRules.failOnContentErrors = true; + }) - .config(function(filterContainedDocs, API_CONTAINED_DOC_TYPES) { - filterContainedDocs.docTypes = API_CONTAINED_DOC_TYPES; - }) + .config(function(filterContainedDocs, API_CONTAINED_DOC_TYPES) { + filterContainedDocs.docTypes = API_CONTAINED_DOC_TYPES; + }) - .config(function(computePathsProcessor, EXPORT_DOC_TYPES, generateApiListDoc) { + .config(function(computePathsProcessor, EXPORT_DOC_TYPES, generateApiListDoc) { - const API_SEGMENT = 'api'; + const API_SEGMENT = 'api'; - generateApiListDoc.outputFolder = API_SEGMENT; + generateApiListDoc.outputFolder = API_SEGMENT; - computePathsProcessor.pathTemplates.push({ - docTypes: ['package'], - getPath: function computeModulePath(doc) { - doc.moduleFolder = `${API_SEGMENT}/${doc.id.replace(/\/index$/, '')}`; - return doc.moduleFolder; - }, - outputPathTemplate: '${moduleFolder}.json' - }); - computePathsProcessor.pathTemplates.push({ - docTypes: EXPORT_DOC_TYPES.concat(['decorator', 'directive', 'ngmodule', 'pipe']), - pathTemplate: '${moduleDoc.moduleFolder}/${name}', - outputPathTemplate: '${moduleDoc.moduleFolder}/${name}.json', - }); - }) + computePathsProcessor.pathTemplates.push({ + docTypes: ['package'], + getPath: function computeModulePath(doc) { + doc.moduleFolder = `${API_SEGMENT}/${doc.id.replace(/\/index$/, '')}`; + return doc.moduleFolder; + }, + outputPathTemplate: '${moduleFolder}.json' + }); + computePathsProcessor.pathTemplates.push({ + docTypes: EXPORT_DOC_TYPES.concat(['decorator', 'directive', 'ngmodule', 'pipe']), + pathTemplate: '${moduleDoc.moduleFolder}/${name}', + outputPathTemplate: '${moduleDoc.moduleFolder}/${name}.json', + }); + }) - .config(function(templateFinder) { - // Where to find the templates for the API doc rendering - templateFinder.templateFolders.unshift(API_TEMPLATES_PATH); - }) + .config(function(templateFinder) { + // Where to find the templates for the API doc rendering + templateFinder.templateFolders.unshift(API_TEMPLATES_PATH); + }) - .config(function(convertToJsonProcessor, postProcessHtml, API_DOC_TYPES_TO_RENDER, API_DOC_TYPES, autoLinkCode) { - convertToJsonProcessor.docTypes = convertToJsonProcessor.docTypes.concat(API_DOC_TYPES_TO_RENDER); - postProcessHtml.docTypes = convertToJsonProcessor.docTypes.concat(API_DOC_TYPES_TO_RENDER); - autoLinkCode.docTypes = API_DOC_TYPES; - autoLinkCode.codeElements = ['code', 'code-example', 'code-pane']; - }); + .config(function( + convertToJsonProcessor, postProcessHtml, API_DOC_TYPES_TO_RENDER, API_DOC_TYPES, + autoLinkCode) { + convertToJsonProcessor.docTypes = + convertToJsonProcessor.docTypes.concat(API_DOC_TYPES_TO_RENDER); + postProcessHtml.docTypes = + convertToJsonProcessor.docTypes.concat(API_DOC_TYPES_TO_RENDER); + autoLinkCode.docTypes = API_DOC_TYPES; + autoLinkCode.codeElements = ['code', 'code-example', 'code-pane']; + }); function addMinLengthRules(checkContentRules) { diff --git a/docs/PUBLIC_API.md b/docs/PUBLIC_API.md index cb1e2e94a2..40d1d08227 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 (`ɵɵ`). - 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 58a0c5d964..5374cc70fe 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 7a1fa89d79..e724141a89 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, ΔembeddedViewEnd, ΔembeddedViewStart, Δinterpolation1, Δselect, ΔstyleProp, Δstyling, Δtext, ΔtextBinding} from '@angular/core'; +import {ɵRenderFlags, ɵrenderComponent as renderComponent, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵdefineComponent, ɵɵelementEnd, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵinterpolation1, ɵɵselect, ɵɵstyleProp, ɵɵstyling, ɵɵ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,41 +35,41 @@ 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'); - Δstyling(null, c1); - { Δtext(2); } - ΔelementEnd(); - Δcontainer(3); - Δcontainer(4); + ɵɵelementStart(1, 'span'); + ɵɵstyling(null, c1); + { ɵɵtext(2); } + ɵɵelementEnd(); + ɵɵcontainer(3); + ɵɵcontainer(4); } - ΔelementEnd(); + ɵɵelementEnd(); } if (rf & ɵRenderFlags.Update) { - Δselect(1); - ΔstyleProp(0, ctx.depth % 2 ? '' : 'grey'); - Δstyling(); - Δselect(2); - ΔtextBinding(2, Δinterpolation1(' ', ctx.value, ' ')); - ΔcontainerRefreshStart(3); + ɵɵselect(1); + ɵɵstyleProp(0, ctx.depth % 2 ? '' : 'grey'); + ɵɵstyling(); + ɵɵselect(2); + ɵɵ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 76e3c8a8cc..43fe9d5551 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, ΔclassMap, ΔdefineDirective, Δstyling, ΔstylingApply} from '@angular/core'; +import {Directive, DoCheck, Input, ɵRenderFlags, ɵɵclassMap, ɵɵdefineDirective, ɵɵstyling, ɵɵstylingApply} 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) { - Δstyling(); + ɵɵstyling(); } if (rf & ɵRenderFlags.Update) { - ΔclassMap(ctx.getValue()); - ΔstylingApply(); + ɵɵclassMap(ctx.getValue()); + ɵɵstylingApply(); } } }); diff --git a/packages/common/src/directives/ng_style.ts b/packages/common/src/directives/ng_style.ts index 67f30efccf..95f0dc7540 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, ΔstyleMap, Δstyling, ΔstylingApply} from '@angular/core'; +import {Directive, DoCheck, Input, ɵRenderFlags, ɵɵdefineDirective, ɵɵstyleMap, ɵɵstyling, ɵɵstylingApply} 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) { - Δstyling(); + ɵɵstyling(); } if (rf & ɵRenderFlags.Update) { - ΔstyleMap(ctx.getValue()); - ΔstylingApply(); + ɵɵstyleMap(ctx.getValue()); + ɵɵstylingApply(); } } }); 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/dts_renderer_spec.ts b/packages/compiler-cli/ngcc/test/rendering/dts_renderer_spec.ts index 3fea099f44..5f27b1a847 100644 --- a/packages/compiler-cli/ngcc/test/rendering/dts_renderer_spec.ts +++ b/packages/compiler-cli/ngcc/test/rendering/dts_renderer_spec.ts @@ -140,7 +140,7 @@ describe('DtsRenderer', () => { 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/ngcc/test/rendering/renderer_spec.ts b/packages/compiler-cli/ngcc/test/rendering/renderer_spec.ts index 83ff27c7ac..58ee02eecd 100644 --- a/packages/compiler-cli/ngcc/test/rendering/renderer_spec.ts +++ b/packages/compiler-cli/ngcc/test/rendering/renderer_spec.ts @@ -164,11 +164,11 @@ describe('Renderer', () => { const addDefinitionsSpy = testFormatter.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, @@ -205,7 +205,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]' }] 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_compile.ts b/packages/compiler-cli/test/compliance/mock_compile.ts index a980af8055..ec39a099c8 100644 --- a/packages/compiler-cli/test/compliance/mock_compile.ts +++ b/packages/compiler-cli/test/compliance/mock_compile.ts @@ -14,7 +14,7 @@ import * as ts from 'typescript'; import {NgtscProgram} from '../../src/ngtsc/program'; -const IDENTIFIER = /[A-Za-z_$ɵΔ][A-Za-z0-9_$]*/; +const IDENTIFIER = /[A-Za-z_$ɵ][A-Za-z0-9_$]*/; const OPERATOR = /!|\?|%|\*|\/|\^|&&?|\|\|?|\(|\)|\{|\}|\[|\]|:|;|<=?|>=?|={1,3}|!==?|=>|\+\+?|--?|@|,|\.|\.\.\./; const STRING = /'[^']*'|"[^"]*"|`[\s\S]*?`/; 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 53811b67eb..b67fa0b21c 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$.Δproperty("id", ctx.id); + $r3$.ɵɵselect(0); + $r3$.ɵɵproperty("id", ctx.id); } } `; @@ -359,7 +359,7 @@ describe('compiler compliance', () => { // generating those. // // For example: - // `$r3$.Δproperty("ternary", (ctx.cond ? $r3$.ΔpureFunction1(8, $c0$, ctx.a): $c1$));` + // `$r3$.ɵɵproperty("ternary", (ctx.cond ? $r3$.ɵɵpureFunction1(8, $c0$, ctx.a): $c1$));` /////////////// const $e0_attrs$ = []; @@ -368,15 +368,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$.Δproperty("ternary", ctx.cond ? $r3$.ΔpureFunction1(8, $c0$, ctx.a): $c1$); - $r3$.Δproperty("pipe", $r3$.ΔpipeBind3(1, 4, ctx.value, 1, 2)); - $r3$.Δproperty("and", ctx.cond && $r3$.ΔpureFunction1(10, $c0$, ctx.b)); - $r3$.Δproperty("or", ctx.cond || $r3$.ΔpureFunction1(12, $c0$, ctx.c)); + $r3$.ɵɵselect(0); + $r3$.ɵɵproperty("ternary", ctx.cond ? $r3$.ɵɵpureFunction1(8, $c0$, ctx.a): $c1$); + $r3$.ɵɵproperty("pipe", $r3$.ɵɵpipeBind3(1, 4, ctx.value, 1, 2)); + $r3$.ɵɵproperty("and", ctx.cond && $r3$.ɵɵpureFunction1(10, $c0$, ctx.b)); + $r3$.ɵɵproperty("or", ctx.cond || $r3$.ɵɵpureFunction1(12, $c0$, ctx.c)); } } `; @@ -441,20 +441,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 ); @@ -493,7 +493,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)(); }, @@ -501,15 +501,15 @@ describe('compiler compliance', () => { vars: 0, template: function MyComponent_Template(rf,ctx){ if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δstyling($e0_classBindings$, $e0_styleBindings$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵstyling($e0_classBindings$, $e0_styleBindings$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔstyleProp(0, ctx.color); - $r3$.ΔclassProp(0, ctx.error); - $r3$.ΔstylingApply(); + $r3$.ɵɵselect(0); + $r3$.ɵɵstyleProp(0, ctx.color); + $r3$.ɵɵclassProp(0, ctx.error); + $r3$.ɵɵstylingApply(); } }, encapsulation: 2 @@ -549,7 +549,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)(); }, @@ -557,7 +557,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 @@ -565,7 +565,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)(); } @@ -576,7 +576,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)(); }, @@ -584,8 +584,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], @@ -622,7 +622,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)(); } @@ -631,7 +631,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)(); } @@ -663,7 +663,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)(); }, @@ -671,7 +671,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 @@ -746,13 +746,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, @@ -792,29 +792,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)(); }, @@ -822,9 +822,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], @@ -877,7 +877,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)(); }, @@ -885,11 +885,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$.Δproperty("names", $r3$.ΔpureFunction1(1, $e0_ff$, ctx.customName)); + $r3$.ɵɵselect(0); + $r3$.ɵɵproperty("names", $r3$.ɵɵpureFunction1(1, $e0_ff$, ctx.customName)); } }, directives: [MyComp], @@ -960,7 +960,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)(); }, @@ -968,12 +968,12 @@ 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$.Δproperty("names", - $r3$.ΔpureFunctionV(1, $e0_ff$, [ctx.n0, ctx.n1, ctx.n2, ctx.n3, ctx.n4, ctx.n5, ctx.n6, ctx.n7, ctx.n8])); + $r3$.ɵɵselect(0); + $r3$.ɵɵproperty("names", + $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], @@ -1024,7 +1024,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)(); }, @@ -1032,11 +1032,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$.Δproperty("config", $r3$.ΔpureFunction1(1, $e0_ff$, ctx.name)); + $r3$.ɵɵselect(0); + $r3$.ɵɵproperty("config", $r3$.ɵɵpureFunction1(1, $e0_ff$, ctx.name)); } }, directives: [ObjectComp], @@ -1093,7 +1093,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)(); }, @@ -1101,13 +1101,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$.Δproperty( + $r3$.ɵɵselect(0); + $r3$.ɵɵproperty( "config", - $r3$.ΔpureFunction2(5, $e0_ff_2$, ctx.name, $r3$.ΔpureFunction1(3, $e0_ff_1$, $r3$.ΔpureFunction1(1, $e0_ff$, ctx.duration)))); + $r3$.ɵɵpureFunction2(5, $e0_ff_2$, ctx.name, $r3$.ɵɵpureFunction1(3, $e0_ff_1$, $r3$.ɵɵpureFunction1(1, $e0_ff$, ctx.duration)))); } }, directives: [NestedComp], @@ -1155,7 +1155,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)(); }, @@ -1164,10 +1164,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 @@ -1178,7 +1178,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)(); }, @@ -1187,13 +1187,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 @@ -1240,38 +1240,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$.Δproperty("ngIf", ctx.visible); - $r3$.Δselect(1); - $r3$.Δproperty("ngIf", ctx.visible); + $r3$.ɵɵselect(0); + $r3$.ɵɵproperty("ngIf", ctx.visible); + $r3$.ɵɵselect(1); + $r3$.ɵɵproperty("ngIf", ctx.visible); } } `; @@ -1312,19 +1312,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"]]]; @@ -1332,11 +1332,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); } } `; @@ -1376,7 +1376,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) { @@ -1386,9 +1386,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 @@ -1431,7 +1431,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) { @@ -1441,9 +1441,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 @@ -1497,26 +1497,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]; }, @@ -1557,17 +1557,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$); } }, … @@ -1608,26 +1608,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]; }, @@ -1673,21 +1673,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$); } }, … @@ -1735,7 +1735,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) { @@ -1743,13 +1743,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, @@ -1757,10 +1757,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 @@ -1799,17 +1799,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$); } }, … @@ -1857,7 +1857,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) { @@ -1865,13 +1865,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$, @@ -1879,10 +1879,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 @@ -1926,21 +1926,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$); } }, … @@ -2034,7 +2034,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)(); }, @@ -2043,7 +2043,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)(); }, @@ -2055,7 +2055,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)(); }, @@ -2063,20 +2063,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], @@ -2122,7 +2122,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)(); }, @@ -2130,21 +2130,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)), "" )); } @@ -2178,7 +2178,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)(); }, @@ -2186,13 +2186,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 @@ -2244,38 +2244,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)(); }, @@ -2283,15 +2283,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], @@ -2336,40 +2336,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$.Δproperty("ngIf", $app$.showing); + const $app$ = $i0$.ɵɵnextContext(); + $r3$.ɵɵselect(3); + $i0$.ɵɵproperty("ngIf", $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$.Δproperty("ngForOf", ctx.items); + $i0$.ɵɵselect(0); + $i0$.ɵɵproperty("ngForOf", ctx.items); } }`; @@ -2424,12 +2424,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) {}, @@ -2437,7 +2437,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)(); }, @@ -2445,14 +2445,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$.Δproperty("name", ctx.name1); - $r3$.Δselect(1); - $r3$.Δproperty("name", ctx.name2); + $r3$.ɵɵselect(0); + $r3$.ɵɵproperty("name", ctx.name1); + $r3$.ɵɵselect(1); + $r3$.ɵɵproperty("name", ctx.name2); } }, directives: [LifecycleComp], @@ -2547,13 +2547,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"} }); `; @@ -2562,14 +2562,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)(); }, @@ -2577,14 +2577,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$.Δproperty("forOf", ctx.items); + $r3$.ɵɵselect(1); + $r3$.ɵɵproperty("forOf", ctx.items); } }, directives: function() { return [ForOfDirective]; }, @@ -2626,13 +2626,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"} }); `; @@ -2641,18 +2641,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)(); }, @@ -2660,13 +2660,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$.Δproperty("forOf", ctx.items); + $r3$.ɵɵselect(1); + $r3$.ɵɵproperty("forOf", ctx.items); } }, directives: function() { return [ForOfDirective]; }, @@ -2723,40 +2723,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$.Δproperty("forOf", IDENT.infos); + $r3$.ɵɵselect(2); + $r3$.ɵɵtextBinding(2, $r3$.ɵɵinterpolation1("", IDENT.name, "")); + $r3$.ɵɵselect(4); + $r3$.ɵɵproperty("forOf", IDENT.infos); } } … - MyComponent.ngComponentDef = $r3$.ΔdefineComponent({ + MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({ type: MyComponent, selectors: [["my-component"]], factory: function MyComponent_Factory(t) { return new (t || MyComponent)(); }, @@ -2764,13 +2764,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$.Δproperty("forOf", ctx.items); + $r3$.ɵɵselect(1); + $r3$.ɵɵproperty("forOf", ctx.items); } }, directives: function () { return [ForOfDirective]; }, @@ -2874,7 +2874,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)(); }, @@ -2931,7 +2931,7 @@ describe('compiler compliance', () => { }; const expectedOutput = ` // ... - BaseClass.ngBaseDef = i0.ΔdefineBase({ + BaseClass.ngBaseDef = i0.ɵɵdefineBase({ inputs: { input1: "input1", input2: ["alias2", "input2"] @@ -2977,7 +2977,7 @@ describe('compiler compliance', () => { }; const expectedOutput = ` // ... - BaseClass.ngBaseDef = i0.ΔdefineBase({ + BaseClass.ngBaseDef = i0.ɵɵdefineBase({ outputs: { output1: "output1", output2: "output2" @@ -3029,7 +3029,7 @@ describe('compiler compliance', () => { }; const expectedOutput = ` // ... - BaseClass.ngBaseDef = i0.ΔdefineBase({ + BaseClass.ngBaseDef = i0.ɵɵdefineBase({ inputs: { input1: "input1", input2: ["whatever", "input2"] @@ -3071,14 +3071,14 @@ describe('compiler compliance', () => { const expectedOutput = ` const $e0_attrs$ = ["something"]; // ... - BaseClass.ngBaseDef = i0.ΔdefineBase({ + BaseClass.ngBaseDef = i0.ɵɵdefineBase({ viewQuery: function (rf, ctx) { if (rf & 1) { - $r3$.ΔviewQuery($e0_attrs$, true, null); + $r3$.ɵɵviewQuery($e0_attrs$, true, null); } if (rf & 2) { var $tmp$; - $r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadViewQuery())) && (ctx.something = $tmp$.first); + $r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadViewQuery())) && (ctx.something = $tmp$.first); } } }); @@ -3116,14 +3116,14 @@ describe('compiler compliance', () => { }; const expectedOutput = ` // ... - BaseClass.ngBaseDef = i0.ΔdefineBase({ + BaseClass.ngBaseDef = i0.ɵɵdefineBase({ viewQuery: function (rf, ctx) { if (rf & 1) { - $r3$.ΔviewQuery(SomeDirective, true, null); + $r3$.ɵɵviewQuery(SomeDirective, true, null); } if (rf & 2) { var $tmp$; - $r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadViewQuery())) && (ctx.something = $tmp$); + $r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadViewQuery())) && (ctx.something = $tmp$); } } }); @@ -3159,14 +3159,14 @@ describe('compiler compliance', () => { const expectedOutput = ` const $e0_attrs$ = ["something"]; // ... - BaseClass.ngBaseDef = i0.ΔdefineBase({ + BaseClass.ngBaseDef = i0.ɵɵdefineBase({ contentQueries: function (rf, ctx, dirIndex) { if (rf & 1) { - $r3$.ΔcontentQuery(dirIndex, $e0_attrs$, true, null); + $r3$.ɵɵcontentQuery(dirIndex, $e0_attrs$, true, null); } if (rf & 2) { var $tmp$; - $r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadContentQuery())) && (ctx.something = $tmp$.first); + $r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadContentQuery())) && (ctx.something = $tmp$.first); } } }); @@ -3204,14 +3204,14 @@ describe('compiler compliance', () => { }; const expectedOutput = ` // ... - BaseClass.ngBaseDef = i0.ΔdefineBase({ + BaseClass.ngBaseDef = i0.ɵɵdefineBase({ contentQueries: function (rf, ctx, dirIndex) { if (rf & 1) { - $r3$.ΔcontentQuery(dirIndex, SomeDirective, false, null); + $r3$.ɵɵcontentQuery(dirIndex, SomeDirective, false, null); } if (rf & 2) { var $tmp$; - $r3$.ΔqueryRefresh(($tmp$ = $r3$.ΔloadContentQuery())) && (ctx.something = $tmp$); + $r3$.ɵɵqueryRefresh(($tmp$ = $r3$.ɵɵloadContentQuery())) && (ctx.something = $tmp$); } } }); @@ -3247,13 +3247,13 @@ describe('compiler compliance', () => { }; const expectedOutput = ` // ... - BaseClass.ngBaseDef = $r3$.ΔdefineBase({ + BaseClass.ngBaseDef = $r3$.ɵɵdefineBase({ hostBindings: function (rf, ctx, elIndex) { if (rf & 1) { - $r3$.ΔallocHostVars(1); + $r3$.ɵɵallocHostVars(1); } if (rf & 2) { - $r3$.ΔelementAttribute(elIndex, "tabindex", $r3$.Δbind(ctx.tabindex)); + $r3$.ɵɵelementAttribute(elIndex, "tabindex", $r3$.ɵɵbind(ctx.tabindex)); } } }); @@ -3289,10 +3289,10 @@ describe('compiler compliance', () => { }; const expectedOutput = ` // ... - BaseClass.ngBaseDef = $r3$.ΔdefineBase({ + BaseClass.ngBaseDef = $r3$.ɵɵdefineBase({ hostBindings: function (rf, ctx, elIndex) { if (rf & 1) { - $r3$.Δlistener("mousedown", function ($event) { + $r3$.ɵɵlistener("mousedown", function ($event) { return ctx.handleMousedown($event); }); } 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 701c1b8e5b..7fa4977f60 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$.Δproperty("title", $ctx$.title); + $i0$.ɵɵselect(0); + $i0$.ɵɵproperty("title", $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$.ΔpropertyInterpolate1("title", "Hello ", $ctx$.name, ""); + $i0$.ɵɵselect(0); + $i0$.ɵɵpropertyInterpolate1("title", "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$.Δproperty("for", ctx.forValue); + $i0$.ɵɵselect(0); + $i0$.ɵɵproperty("for", 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$.Δproperty("id", ctx.dirId, null, true); + $r3$.ɵɵproperty("id", 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$.Δproperty("id", $r3$.ΔpureFunction1(1, $ff$, ctx.id), null, true); + $r3$.ɵɵproperty("id", $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$); … } … @@ -469,26 +469,26 @@ describe('compiler compliance: bindings', () => { const template = ` … if (rf & 2) { - i0.Δselect(0); - i0.ΔpropertyInterpolateV("title", ["a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h", ctx.eight, "i", ctx.nine, "j"]); - i0.Δselect(1); - i0.ΔpropertyInterpolate8("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h", ctx.eight, "i"); - i0.Δselect(2); - i0.ΔpropertyInterpolate7("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h"); - i0.Δselect(3); - i0.ΔpropertyInterpolate6("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g"); - i0.Δselect(4); - i0.ΔpropertyInterpolate5("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f"); - i0.Δselect(5); - i0.ΔpropertyInterpolate4("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e"); - i0.Δselect(6); - i0.ΔpropertyInterpolate3("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d"); - i0.Δselect(7); - i0.ΔpropertyInterpolate2("title", "a", ctx.one, "b", ctx.two, "c"); - i0.Δselect(8); - i0.ΔpropertyInterpolate1("title", "a", ctx.one, "b"); - i0.Δselect(9); - i0.ΔpropertyInterpolate("title", ctx.one); + i0.ɵɵselect(0); + i0.ɵɵpropertyInterpolateV("title", ["a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h", ctx.eight, "i", ctx.nine, "j"]); + i0.ɵɵselect(1); + i0.ɵɵpropertyInterpolate8("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h", ctx.eight, "i"); + i0.ɵɵselect(2); + i0.ɵɵpropertyInterpolate7("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h"); + i0.ɵɵselect(3); + i0.ɵɵpropertyInterpolate6("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g"); + i0.ɵɵselect(4); + i0.ɵɵpropertyInterpolate5("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f"); + i0.ɵɵselect(5); + i0.ɵɵpropertyInterpolate4("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e"); + i0.ɵɵselect(6); + i0.ɵɵpropertyInterpolate3("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d"); + i0.ɵɵselect(7); + i0.ɵɵpropertyInterpolate2("title", "a", ctx.one, "b", ctx.two, "c"); + i0.ɵɵselect(8); + i0.ɵɵpropertyInterpolate1("title", "a", ctx.one, "b"); + i0.ɵɵselect(9); + i0.ɵɵpropertyInterpolate("title", ctx.one); } … `; @@ -510,19 +510,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, " ")); } } `; @@ -542,12 +542,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); @@ -566,11 +566,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); @@ -585,7 +585,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 71085868ea..6ef22fdcf0 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$.Δproperty("someDirective", true); + $r3$.ɵɵselect(0); + $r3$.ɵɵproperty("someDirective", 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$.Δproperty("ngIf", ctx.showing); + $r3$.ɵɵselect(0); + $r3$.ɵɵproperty("ngIf", 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$.Δproperty("someDirective", true); + $r3$.ɵɵselect(0); + $r3$.ɵɵproperty("someDirective", 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 697aafcfbe..bc5e396424 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_1$; } else { - $I18N_0$ = $r3$.Δi18nLocalize("Content A"); + $I18N_0$ = $r3$.ɵɵi18nLocalize("Content A"); } const $_c2$ = ["title", "Title B"]; var $I18N_3$; @@ -208,7 +208,7 @@ describe('i18n support in the view compiler', () => { $I18N_3$ = $MSG_EXTERNAL_idB$$APP_SPEC_TS_4$; } else { - $I18N_3$ = $r3$.Δi18nLocalize("Title B"); + $I18N_3$ = $r3$.ɵɵi18nLocalize("Title B"); } const $_c5$ = ["title", $I18N_3$]; const $_c6$ = ["title", "Title C"]; @@ -221,7 +221,7 @@ describe('i18n support in the view compiler', () => { $I18N_7$ = $MSG_EXTERNAL_4978592519614169666$$APP_SPEC_TS_8$; } else { - $I18N_7$ = $r3$.Δi18nLocalize("Title C"); + $I18N_7$ = $r3$.ɵɵi18nLocalize("Title C"); } const $_c9$ = ["title", $I18N_7$]; const $_c10$ = ["title", "Title D"]; @@ -235,7 +235,7 @@ describe('i18n support in the view compiler', () => { $I18N_11$ = $MSG_EXTERNAL_5200291527729162531$$APP_SPEC_TS_12$; } else { - $I18N_11$ = $r3$.Δi18nLocalize("Title D"); + $I18N_11$ = $r3$.ɵɵi18nLocalize("Title D"); } const $_c13$ = ["title", $I18N_11$]; const $_c14$ = ["title", "Title E"]; @@ -248,7 +248,7 @@ describe('i18n support in the view compiler', () => { $I18N_15$ = $MSG_EXTERNAL_idE$$APP_SPEC_TS_16$; } else { - $I18N_15$ = $r3$.Δi18nLocalize("Title E"); + $I18N_15$ = $r3$.ɵɵi18nLocalize("Title E"); } const $_c17$ = ["title", $I18N_15$]; const $_c18$ = ["title", "Title F"]; @@ -258,7 +258,7 @@ describe('i18n support in the view compiler', () => { $I18N_19$ = $MSG_EXTERNAL_idF$$APP_SPEC_TS_20$; } else { - $I18N_19$ = $r3$.Δi18nLocalize("Title F"); + $I18N_19$ = $r3$.ɵɵi18nLocalize("Title F"); } const $_c21$ = ["title", $I18N_19$]; const $_c22$ = ["title", "Title G"]; @@ -271,39 +271,39 @@ describe('i18n support in the view compiler', () => { $I18N_23$ = $MSG_EXTERNAL_idG$$APP_SPEC_TS_24$; } else { - $I18N_23$ = $r3$.Δi18nLocalize("Title G"); + $I18N_23$ = $r3$.ɵɵi18nLocalize("Title G"); } const $_c25$ = ["title", $I18N_23$]; … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δi18n(1, $I18N_0$); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(2, "div", $_c2$); - $r3$.Δi18nAttributes(3, $_c5$); - $r3$.Δtext(4, "Content B"); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(5, "div", $_c6$); - $r3$.Δi18nAttributes(6, $_c9$); - $r3$.Δtext(7, "Content C"); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(8, "div", $_c10$); - $r3$.Δi18nAttributes(9, $_c13$); - $r3$.Δtext(10, "Content D"); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(11, "div", $_c14$); - $r3$.Δi18nAttributes(12, $_c17$); - $r3$.Δtext(13, "Content E"); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(14, "div", $_c18$); - $r3$.Δi18nAttributes(15, $_c21$); - $r3$.Δtext(16, "Content F"); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(17, "div", $_c22$); - $r3$.Δi18nAttributes(18, $_c25$); - $r3$.Δtext(19, "Content G"); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18n(1, $I18N_0$); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(2, "div", $_c2$); + $r3$.ɵɵi18nAttributes(3, $_c5$); + $r3$.ɵɵtext(4, "Content B"); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(5, "div", $_c6$); + $r3$.ɵɵi18nAttributes(6, $_c9$); + $r3$.ɵɵtext(7, "Content C"); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(8, "div", $_c10$); + $r3$.ɵɵi18nAttributes(9, $_c13$); + $r3$.ɵɵtext(10, "Content D"); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(11, "div", $_c14$); + $r3$.ɵɵi18nAttributes(12, $_c17$); + $r3$.ɵɵtext(13, "Content E"); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(14, "div", $_c18$); + $r3$.ɵɵi18nAttributes(15, $_c21$); + $r3$.ɵɵtext(16, "Content F"); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(17, "div", $_c22$); + $r3$.ɵɵi18nAttributes(18, $_c25$); + $r3$.ɵɵtext(19, "Content G"); + $r3$.ɵɵelementEnd(); } } `; @@ -321,7 +321,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$); } } `; @@ -346,15 +346,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(); } } `; @@ -383,7 +383,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) { @@ -397,7 +397,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" }); } @@ -413,7 +413,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" }); } @@ -435,7 +435,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" }); } @@ -447,7 +447,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" }); } @@ -460,25 +460,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); } } `; @@ -505,7 +505,7 @@ describe('i18n support in the view compiler', () => { $I18N_1$ = $MSG_EXTERNAL_8977039798304050198$; } else { - $I18N_1$ = $r3$.Δi18nLocalize("intro {$interpolation}", { + $I18N_1$ = $r3$.ɵɵi18nLocalize("intro {$interpolation}", { "interpolation": "\uFFFD0\uFFFD" }); } @@ -513,15 +513,15 @@ describe('i18n support in the view compiler', () => { … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div", $_c0$); - $r3$.Δpipe(1, "uppercase"); - $r3$.Δi18nAttributes(2, $_c3$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div", $_c0$); + $r3$.ɵɵpipe(1, "uppercase"); + $r3$.ɵɵi18nAttributes(2, $_c3$); + $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); } } `; @@ -550,25 +550,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 $_c2$ = ["title", $I18N_1$]; function MyComponent_div_0_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.ΔelementStart(1, "div", $_c1$); - $r3$.Δpipe(2, "uppercase"); - $r3$.Δi18nAttributes(3, $_c2$); - $r3$.ΔelementEnd(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵelementStart(1, "div", $_c1$); + $r3$.ɵɵpipe(2, "uppercase"); + $r3$.ɵɵi18nAttributes(3, $_c2$); + $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); } } … @@ -576,11 +576,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$.Δproperty("ngForOf", ctx.items); + $r3$.ɵɵselect(0); + $r3$.ɵɵproperty("ngForOf", ctx.items); } } `; @@ -612,7 +612,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) { @@ -626,7 +626,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" }); } @@ -642,7 +642,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" }); } @@ -664,7 +664,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" }); } @@ -676,7 +676,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" }); } @@ -689,25 +689,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); } } `; @@ -737,25 +737,25 @@ describe('i18n support in the view compiler', () => { $I18N_2$ = $MSG_EXTERNAL_8538466649243975456$$APP_SPEC_TS__3$; } else { - $I18N_2$ = $r3$.Δi18nLocalize("different scope {$interpolation}", { + $I18N_2$ = $r3$.ɵɵi18nLocalize("different scope {$interpolation}", { "interpolation": "\uFFFD0\uFFFD" }); } const $_c4$ = ["title", $I18N_2$]; function MyComponent_div_0_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.ΔelementStart(1, "div", $_c1$); - $r3$.Δpipe(2, "uppercase"); - $r3$.Δi18nAttributes(3, $_c4$); - $r3$.ΔelementEnd(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵelementStart(1, "div", $_c1$); + $r3$.ɵɵpipe(2, "uppercase"); + $r3$.ɵɵi18nAttributes(3, $_c4$); + $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); } } … @@ -763,11 +763,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$.Δproperty("ngForOf", ctx.items); + $r3$.ɵɵselect(0); + $r3$.ɵɵproperty("ngForOf", ctx.items); } } `; @@ -792,7 +792,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$; @@ -801,15 +801,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", $_c0$); - $r3$.Δi18nAttributes(1, $_c1$); - $r3$.Δi18n(2, $I18N_2$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div", $_c0$); + $r3$.ɵɵi18nAttributes(1, $_c1$); + $r3$.ɵɵi18n(2, $I18N_2$); + $r3$.ɵɵelementEnd(); } } `; @@ -831,7 +831,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$; @@ -840,7 +840,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 "); } … `; @@ -866,9 +866,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"); } } `; @@ -892,7 +892,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."); } `; @@ -915,7 +915,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) { @@ -923,7 +923,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) { @@ -931,26 +931,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(); } } `; @@ -972,7 +972,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" }); } @@ -981,14 +981,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); } } `; @@ -1010,21 +1010,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); } } `; @@ -1049,7 +1049,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" }); @@ -1057,16 +1057,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); } } `; @@ -1089,7 +1089,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" }); } @@ -1101,7 +1101,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" }); } @@ -1113,7 +1113,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" }); } @@ -1122,27 +1122,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); } } `; @@ -1179,7 +1179,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" @@ -1198,7 +1198,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", @@ -1207,36 +1207,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); } } `; @@ -1271,7 +1271,7 @@ describe('i18n support in the view compiler', () => { $I18N_2$ = $MSG_EXTERNAL_4782264005467235841$$APP_SPEC_TS_3$; } else { - $I18N_2$ = $r3$.Δi18nLocalize("Span title {$interpolation} and {$interpolation_1}", { + $I18N_2$ = $r3$.ɵɵi18nLocalize("Span title {$interpolation} and {$interpolation_1}", { "interpolation": "\uFFFD0\uFFFD", "interpolation_1": "\uFFFD1\uFFFD" }); @@ -1287,7 +1287,7 @@ describe('i18n support in the view compiler', () => { $I18N_0$ = $MSG_EXTERNAL_4446430594603971069$$APP_SPEC_TS_5$; } 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" @@ -1301,7 +1301,7 @@ describe('i18n support in the view compiler', () => { $I18N_7$ = $MSG_EXTERNAL_2719594642740200058$$APP_SPEC_TS_8$; } else { - $I18N_7$ = $r3$.Δi18nLocalize("Span title {$interpolation}", { + $I18N_7$ = $r3$.ɵɵi18nLocalize("Span title {$interpolation}", { "interpolation": "\uFFFD0\uFFFD" }); } @@ -1316,7 +1316,7 @@ describe('i18n support in the view compiler', () => { $I18N_6$ = $MSG_EXTERNAL_2778714953278357902$$APP_SPEC_TS_10$; } else { - $I18N_6$ = $r3$.Δi18nLocalize(" My i18n block #2 with value {$interpolation} {$startTagSpan} Plain text in nested element (block #2) {$closeTagSpan}", { + $I18N_6$ = $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" @@ -1327,34 +1327,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", $_c1$); - $r3$.Δi18nAttributes(3, $_c4$); - $r3$.ΔelementEnd(); - $r3$.Δi18nEnd(); - $r3$.ΔelementEnd(); - $r3$.ΔelementStart(4, "div"); - $r3$.Δi18nStart(5, $I18N_6$); - $r3$.Δpipe(6, "uppercase"); - $r3$.ΔelementStart(7, "span", $_c1$); - $r3$.Δi18nAttributes(8, $_c9$); - $r3$.ΔelementEnd(); - $r3$.Δi18nEnd(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵi18nStart(1, $I18N_0$); + $r3$.ɵɵelementStart(2, "span", $_c1$); + $r3$.ɵɵi18nAttributes(3, $_c4$); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵi18nEnd(); + $r3$.ɵɵelementEnd(); + $r3$.ɵɵelementStart(4, "div"); + $r3$.ɵɵi18nStart(5, $I18N_6$); + $r3$.ɵɵpipe(6, "uppercase"); + $r3$.ɵɵelementStart(7, "span", $_c1$); + $r3$.ɵɵi18nAttributes(8, $_c9$); + $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); } } `; @@ -1390,7 +1390,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", @@ -1400,21 +1400,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); } } … @@ -1422,14 +1422,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$.Δproperty("ngIf", ctx.visible); + $r3$.ɵɵselect(2); + $r3$.ɵɵproperty("ngIf", ctx.visible); } } `; @@ -1450,7 +1450,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$); } } const $_c3$ = ["src", "logo.png", ${AttributeMarker.Bindings}, "title"]; @@ -1462,22 +1462,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 $_c4$ = ["title", $I18N_2$]; function MyComponent_img_2_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "img", $_c3$); - $r3$.Δi18nAttributes(1, $_c4$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "img", $_c3$); + $r3$.ɵɵi18nAttributes(1, $_c4$); + $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); } } … @@ -1485,15 +1485,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$.Δproperty("ngIf", ctx.visible); - $r3$.Δselect(2); - $r3$.Δproperty("ngIf", ctx.visible); + $r3$.ɵɵselect(1); + $r3$.ɵɵproperty("ngIf", ctx.visible); + $r3$.ɵɵselect(2); + $r3$.ɵɵproperty("ngIf", ctx.visible); } } `; @@ -1530,38 +1530,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$.Δproperty("ngIf", $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$.ɵɵproperty("ngIf", $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$; @@ -1582,7 +1582,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", @@ -1596,22 +1596,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); } } … @@ -1619,18 +1619,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$.Δproperty("ngIf", ctx.visible); - $r3$.Δselect(3); - $r3$.Δproperty("ngIf", !ctx.visible); + $r3$.ɵɵselect(2); + $r3$.ɵɵproperty("ngIf", ctx.visible); + $r3$.ɵɵselect(3); + $r3$.ɵɵproperty("ngIf", !ctx.visible); } } `; @@ -1655,7 +1655,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" @@ -1664,17 +1664,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); } } … @@ -1682,11 +1682,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$.Δproperty("ngIf", ctx.visible); + $r3$.ɵɵselect(0); + $r3$.ɵɵproperty("ngIf", ctx.visible); } } `; @@ -1707,15 +1707,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(); } } `; @@ -1737,14 +1737,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(); } } `; @@ -1764,9 +1764,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" }); … @@ -1774,14 +1774,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); } } `; @@ -1802,7 +1802,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) { @@ -1810,20 +1810,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(); } } `; @@ -1845,7 +1845,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$; @@ -1854,19 +1854,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(); } } `; @@ -1890,7 +1890,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" }); } @@ -1899,15 +1899,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); } } `; @@ -1929,19 +1929,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); } } … @@ -1949,7 +1949,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"); } } `; @@ -1979,7 +1979,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", @@ -1990,14 +1990,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); } } … @@ -2005,19 +2005,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); } } `; @@ -2038,9 +2038,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$; @@ -2049,20 +2049,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); } } … @@ -2070,15 +2070,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); } } `; @@ -2104,26 +2104,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$; @@ -2138,7 +2138,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", @@ -2146,19 +2146,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); } } … @@ -2166,11 +2166,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(); } } `; @@ -2191,9 +2191,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$; @@ -2202,20 +2202,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); } } … @@ -2223,15 +2223,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); } } `; @@ -2259,7 +2259,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" }); } @@ -2271,26 +2271,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"); } } `; @@ -2318,7 +2318,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" }); @@ -2345,7 +2345,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) { @@ -2353,7 +2353,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"); } … `; @@ -2381,7 +2381,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" }); @@ -2389,13 +2389,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 "); } } `; @@ -2417,9 +2417,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" }); … @@ -2427,14 +2427,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); } } `; @@ -2454,9 +2454,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" }); `; @@ -2476,9 +2476,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" }); … @@ -2486,12 +2486,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); } } `; @@ -2517,9 +2517,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"]; @@ -2531,22 +2531,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"]; @@ -2558,27 +2558,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); } } … @@ -2586,20 +2586,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$.Δproperty("ngIf", ctx.visible); - $r3$.Δselect(3); - $r3$.Δproperty("ngIf", ctx.available); + $r3$.ɵɵselect(1); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.gender)); + $r3$.ɵɵi18nApply(1); + $r3$.ɵɵselect(2); + $r3$.ɵɵproperty("ngIf", ctx.visible); + $r3$.ɵɵselect(3); + $r3$.ɵɵproperty("ngIf", ctx.available); } } `; @@ -2621,25 +2621,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); } } `; @@ -2670,7 +2670,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": "", @@ -2679,7 +2679,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"]; @@ -2697,7 +2697,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", @@ -2712,19 +2712,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$.Δstyling($_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$.ɵɵstyling($_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); } } `; @@ -2746,11 +2746,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" }); … @@ -2758,15 +2758,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); } } `; @@ -2789,9 +2789,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$; @@ -2800,9 +2800,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$; @@ -2814,7 +2814,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$ }); @@ -2824,15 +2824,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); } } `; @@ -2860,9 +2860,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$; @@ -2871,9 +2871,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"]; @@ -2883,9 +2883,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$; @@ -2899,27 +2899,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); } } … @@ -2927,19 +2927,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$.Δproperty("ngIf", ctx.visible); - $r3$.Δi18nExp($r3$.Δbind(ctx.gender)); - $r3$.Δi18nExp($r3$.Δbind(ctx.gender)); - $r3$.Δi18nApply(1); + $r3$.ɵɵselect(3); + $r3$.ɵɵproperty("ngIf", ctx.visible); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.gender)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.gender)); + $r3$.ɵɵi18nApply(1); } } `; @@ -2968,9 +2968,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" }); @@ -2979,15 +2979,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); } } `; @@ -3015,9 +3015,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"]; @@ -3027,9 +3027,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$; @@ -3043,7 +3043,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$, @@ -3052,15 +3052,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); } } … @@ -3068,17 +3068,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$.Δproperty("ngIf", ctx.ageVisible); - $r3$.Δi18nExp($r3$.Δbind(ctx.gender)); - $r3$.Δi18nApply(1); + $r3$.ɵɵselect(2); + $r3$.ɵɵproperty("ngIf", ctx.ageVisible); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.gender)); + $r3$.ɵɵi18nApply(1); } } `; @@ -3106,12 +3106,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"]; @@ -3123,11 +3123,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$; @@ -3141,7 +3141,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$, @@ -3150,16 +3150,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); } } … @@ -3167,19 +3167,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$.Δproperty("ngIf", 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$.ɵɵproperty("ngIf", ctx.ageVisible); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.gender)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.weight)); + $r3$.ɵɵi18nExp($r3$.ɵɵbind(ctx.height)); + $r3$.ɵɵi18nApply(1); } } `; @@ -3209,13 +3209,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" }); … @@ -3223,17 +3223,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 ce9d81f7c9..e40d62ad52 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$.Δproperty("ngIf", ctx.showing); + $i0$.ɵɵselect(0); + $i0$.ɵɵproperty("ngIf", 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 5e271f339a..10dbc48055 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$.Δproperty("@attr", …); - $i0$.Δproperty("@binding", …); + $i0$.ɵɵselect(0); + $i0$.ɵɵproperty("@attr", …); + $i0$.ɵɵproperty("@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$.Δproperty("@mySelector", …); + $i0$.ɵɵselect(0); + $i0$.ɵɵproperty("@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 43256c46d1..250cb6bf56 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$.Δproperty("@foo", ctx.exp); - $r3$.Δselect(1); - $r3$.Δproperty("@bar", undefined); - $r3$.Δselect(2); - $r3$.Δproperty("@baz", undefined); + $r3$.ɵɵselect(0); + $r3$.ɵɵproperty("@foo", ctx.exp); + $r3$.ɵɵselect(1); + $r3$.ɵɵproperty("@bar", undefined); + $r3$.ɵɵselect(2); + $r3$.ɵɵproperty("@baz", 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$.Δproperty("@myAnimation", ctx.exp); + $r3$.ɵɵselect(0); + $r3$.ɵɵproperty("@myAnimation", 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,14 +384,14 @@ describe('compiler compliance: styling', () => { const template = ` template: function MyComponent_Template(rf, $ctx$) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δstyling(null, null, $r3$.ΔdefaultStyleSanitizer); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵstyling(null, null, $r3$.ɵɵdefaultStyleSanitizer); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔstyleMap($ctx$.myStyleExp); - $r3$.ΔstylingApply(); + $r3$.ɵɵselect(0); + $r3$.ɵɵstyleMap($ctx$.myStyleExp); + $r3$.ɵɵstylingApply(); } } `; @@ -450,14 +450,14 @@ describe('compiler compliance: styling', () => { vars: 1, template: function MyComponentWithInterpolation_Template(rf, $ctx$) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δstyling(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵstyling(); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔclassMap($r3$.Δinterpolation1("foo foo-", $ctx$.fooId, "")); - $r3$.ΔstylingApply(); + $r3$.ɵɵselect(0); + $r3$.ɵɵclassMap($r3$.ɵɵinterpolation1("foo foo-", $ctx$.fooId, "")); + $r3$.ɵɵstylingApply(); } } … @@ -465,14 +465,14 @@ describe('compiler compliance: styling', () => { vars: 2, template: function MyComponentWithMuchosInterpolation_Template(rf, $ctx$) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δstyling(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵstyling(); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔclassMap($r3$.Δinterpolation2("foo foo-", $ctx$.fooId, "-", $ctx$.fooUsername, "")); - $r3$.ΔstylingApply(); + $r3$.ɵɵselect(0); + $r3$.ɵɵclassMap($r3$.ɵɵinterpolation2("foo foo-", $ctx$.fooId, "-", $ctx$.fooUsername, "")); + $r3$.ɵɵstylingApply(); } } … @@ -480,14 +480,14 @@ describe('compiler compliance: styling', () => { vars: 0, template: function MyComponentWithoutInterpolation_Template(rf, $ctx$) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δstyling(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵstyling(); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔclassMap($ctx$.exp); - $r3$.ΔstylingApply(); + $r3$.ɵɵselect(0); + $r3$.ɵɵclassMap($ctx$.exp); + $r3$.ɵɵstylingApply(); } } `; @@ -527,7 +527,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){ @@ -537,17 +537,17 @@ describe('compiler compliance: styling', () => { vars: 1, template: function MyComponent_Template(rf, $ctx$) { if (rf & 1) { - $r3$.ΔelementStart(0, "div", $_c0$); - $r3$.Δstyling(null, $_c1$, $r3$.ΔdefaultStyleSanitizer); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div", $_c0$); + $r3$.ɵɵstyling(null, $_c1$, $r3$.ɵɵdefaultStyleSanitizer); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔstyleMap($ctx$.myStyleExp); - $r3$.ΔstyleProp(0, $ctx$.myWidth); - $r3$.ΔstyleProp(1, $ctx$.myHeight); - $r3$.ΔstylingApply(); - $r3$.ΔelementAttribute(0, "style", $r3$.Δbind("border-width: 10px"), $r3$.ΔsanitizeStyle); + $r3$.ɵɵselect(0); + $r3$.ɵɵstyleMap($ctx$.myStyleExp); + $r3$.ɵɵstyleProp(0, $ctx$.myWidth); + $r3$.ɵɵstyleProp(1, $ctx$.myHeight); + $r3$.ɵɵstylingApply(); + $r3$.ɵɵelementAttribute(0, "style", $r3$.ɵɵbind("border-width: 10px"), $r3$.ɵɵsanitizeStyle); } }, encapsulation: 2 @@ -587,7 +587,7 @@ describe('compiler compliance: styling', () => { } } - MyComponent.ngComponentDef = $r3$.ΔdefineComponent({ + MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({ type: MyComponent, selectors: [["my-component"]], factory: function MyComponent_Factory(t) { @@ -597,14 +597,14 @@ describe('compiler compliance: styling', () => { vars: 0, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δstyling(null, _c0, $r3$.ΔdefaultStyleSanitizer); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵstyling(null, _c0, $r3$.ɵɵdefaultStyleSanitizer); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔstyleProp(0, ctx.myImage); - $r3$.ΔstylingApply(); + $r3$.ɵɵselect(0); + $r3$.ɵɵstyleProp(0, ctx.myImage); + $r3$.ɵɵstylingApply(); } }, encapsulation: 2 @@ -639,14 +639,14 @@ describe('compiler compliance: styling', () => { … template: function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δstyling(null, _c0); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵstyling(null, _c0); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔstyleProp(0, 12, "px"); - $r3$.ΔstylingApply(); + $r3$.ɵɵselect(0); + $r3$.ɵɵstyleProp(0, 12, "px"); + $r3$.ɵɵstylingApply(); } } `; @@ -705,14 +705,14 @@ describe('compiler compliance: styling', () => { const template = ` template: function MyComponent_Template(rf, $ctx$) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δstyling(); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵstyling(); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔclassMap($ctx$.myClassExp); - $r3$.ΔstylingApply(); + $r3$.ɵɵselect(0); + $r3$.ɵɵclassMap($ctx$.myClassExp); + $r3$.ɵɵstylingApply(); } } `; @@ -752,7 +752,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){ @@ -762,17 +762,17 @@ describe('compiler compliance: styling', () => { vars: 1, template: function MyComponent_Template(rf, $ctx$) { if (rf & 1) { - $r3$.ΔelementStart(0, "div", $e0_attrs$); - $r3$.Δstyling($e0_bindings$); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div", $e0_attrs$); + $r3$.ɵɵstyling($e0_bindings$); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔclassMap($ctx$.myClassExp); - $r3$.ΔclassProp(0, $ctx$.yesToApple); - $r3$.ΔclassProp(1, $ctx$.yesToOrange); - $r3$.ΔstylingApply(); - $r3$.ΔelementAttribute(0, "class", $r3$.Δbind("banana")); + $r3$.ɵɵselect(0); + $r3$.ɵɵclassMap($ctx$.myClassExp); + $r3$.ɵɵclassProp(0, $ctx$.yesToApple); + $r3$.ɵɵclassProp(1, $ctx$.yesToOrange); + $r3$.ɵɵstylingApply(); + $r3$.ɵɵelementAttribute(0, "class", $r3$.ɵɵbind("banana")); } }, encapsulation: 2 @@ -808,7 +808,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){ @@ -818,12 +818,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 @@ -884,15 +884,15 @@ describe('compiler compliance: styling', () => { const template = ` template: function MyComponent_Template(rf, $ctx$) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δstyling(null, null, $r3$.ΔdefaultStyleSanitizer); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵstyling(null, null, $r3$.ɵɵdefaultStyleSanitizer); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔstyleMap($ctx$.myStyleExp); - $r3$.ΔclassMap($ctx$.myClassExp); - $r3$.ΔstylingApply(); + $r3$.ɵɵselect(0); + $r3$.ɵɵstyleMap($ctx$.myStyleExp); + $r3$.ɵɵclassMap($ctx$.myClassExp); + $r3$.ɵɵstylingApply(); } } `; @@ -926,17 +926,17 @@ describe('compiler compliance: styling', () => { const template = ` template: function MyComponent_Template(rf, $ctx$) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δstyling(null, null, $r3$.ΔdefaultStyleSanitizer); - $r3$.Δpipe(1, "stylePipe"); - $r3$.Δpipe(2, "classPipe"); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵstyling(null, null, $r3$.ɵɵdefaultStyleSanitizer); + $r3$.ɵɵpipe(1, "stylePipe"); + $r3$.ɵɵpipe(2, "classPipe"); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔstyleMap($r3$.ΔpipeBind1(1, 0, $ctx$.myStyleExp)); - $r3$.ΔclassMap($r3$.ΔpipeBind1(2, 2, $ctx$.myClassExp)); - $r3$.ΔstylingApply(); + $r3$.ɵɵselect(0); + $r3$.ɵɵstyleMap($r3$.ɵɵpipeBind1(1, 0, $ctx$.myStyleExp)); + $r3$.ɵɵclassMap($r3$.ɵɵpipeBind1(2, 2, $ctx$.myClassExp)); + $r3$.ɵɵstylingApply(); } } `; @@ -981,25 +981,25 @@ describe('compiler compliance: styling', () => { … template: function MyComponent_Template(rf, $ctx$) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δstyling($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$.ɵɵstyling($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$.Δselect(0); - $r3$.ΔstyleMap($r3$.ΔpipeBind2(1, 1, $ctx$.myStyleExp, 1000)); - $r3$.ΔclassMap($e2_styling$); - $r3$.ΔstyleProp(0, $r3$.ΔpipeBind2(2, 4, $ctx$.barExp, 3000)); - $r3$.ΔstyleProp(1, $r3$.ΔpipeBind2(3, 7, $ctx$.bazExp, 4000)); - $r3$.ΔclassProp(0, $r3$.ΔpipeBind2(4, 10, $ctx$.fooExp, 2000)); - $r3$.ΔstylingApply(); - $r3$.Δselect(5); - $r3$.ΔtextBinding(5, $r3$.Δinterpolation1(" ", $ctx$.item, "")); + $r3$.ɵɵselect(0); + $r3$.ɵɵstyleMap($r3$.ɵɵpipeBind2(1, 1, $ctx$.myStyleExp, 1000)); + $r3$.ɵɵclassMap($e2_styling$); + $r3$.ɵɵstyleProp(0, $r3$.ɵɵpipeBind2(2, 4, $ctx$.barExp, 3000)); + $r3$.ɵɵstyleProp(1, $r3$.ɵɵpipeBind2(3, 7, $ctx$.bazExp, 4000)); + $r3$.ɵɵclassProp(0, $r3$.ɵɵpipeBind2(4, 10, $ctx$.fooExp, 2000)); + $r3$.ɵɵstylingApply(); + $r3$.ɵɵselect(5); + $r3$.ɵɵtextBinding(5, $r3$.ɵɵinterpolation1(" ", $ctx$.item, "")); } } `; @@ -1041,18 +1041,18 @@ describe('compiler compliance: styling', () => { template: function MyComponent_Template(rf, $ctx$) { … if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔstyleProp(0, $ctx$.w1); - $r3$.ΔstylingApply(); - $r3$.Δselect(1); - $r3$.ΔstyleProp(0, $ctx$.h1); - $r3$.ΔstylingApply(); - $r3$.Δselect(2); - $r3$.ΔclassProp(0, $ctx$.a1); - $r3$.ΔstylingApply(); - $r3$.Δselect(3); - $r3$.ΔclassProp(0, $ctx$.r1); - $r3$.ΔstylingApply(); + $r3$.ɵɵselect(0); + $r3$.ɵɵstyleProp(0, $ctx$.w1); + $r3$.ɵɵstylingApply(); + $r3$.ɵɵselect(1); + $r3$.ɵɵstyleProp(0, $ctx$.h1); + $r3$.ɵɵstylingApply(); + $r3$.ɵɵselect(2); + $r3$.ɵɵclassProp(0, $ctx$.a1); + $r3$.ɵɵstylingApply(); + $r3$.ɵɵselect(3); + $r3$.ɵɵclassProp(0, $ctx$.r1); + $r3$.ɵɵstylingApply(); } } `; @@ -1104,15 +1104,15 @@ describe('compiler compliance: styling', () => { … hostBindings: function MyComponent_HostBindings(rf, ctx, elIndex) { if (rf & 1) { - $r3$.ΔelementHostAttrs($e0_attrs$); - $r3$.Δstyling($e0_classBindings$, $e0_styleBindings$, $r3$.ΔdefaultStyleSanitizer); + $r3$.ɵɵelementHostAttrs($e0_attrs$); + $r3$.ɵɵstyling($e0_classBindings$, $e0_styleBindings$, $r3$.ɵɵdefaultStyleSanitizer); } if (rf & 2) { - $r3$.ΔstyleMap(ctx.myStyle); - $r3$.ΔclassMap(ctx.myClass); - $r3$.ΔstyleProp(0, ctx.myColorProp); - $r3$.ΔclassProp(0, ctx.myFooClass); - $r3$.ΔstylingApply(); + $r3$.ɵɵstyleMap(ctx.myStyle); + $r3$.ɵɵclassMap(ctx.myClass); + $r3$.ɵɵstyleProp(0, ctx.myColorProp); + $r3$.ɵɵclassProp(0, ctx.myFooClass); + $r3$.ɵɵstylingApply(); } }, consts: 0, @@ -1166,16 +1166,16 @@ describe('compiler compliance: styling', () => { … hostBindings: function MyComponent_HostBindings(rf, ctx, elIndex) { if (rf & 1) { - $r3$.Δstyling(_c0, _c1, $r3$.ΔdefaultStyleSanitizer); + $r3$.ɵɵstyling(_c0, _c1, $r3$.ɵɵdefaultStyleSanitizer); } if (rf & 2) { - $r3$.ΔstyleMap(ctx.myStyle); - $r3$.ΔclassMap(ctx.myClasses); - $r3$.ΔstyleProp(0, ctx.myHeightProp, "pt"); - $r3$.ΔstyleProp(1, ctx.myWidthProp); - $r3$.ΔclassProp(0, ctx.myBarClass); - $r3$.ΔclassProp(1, ctx.myFooClass); - $r3$.ΔstylingApply(); + $r3$.ɵɵstyleMap(ctx.myStyle); + $r3$.ɵɵclassMap(ctx.myClasses); + $r3$.ɵɵstyleProp(0, ctx.myHeightProp, "pt"); + $r3$.ɵɵstyleProp(1, ctx.myWidthProp); + $r3$.ɵɵclassProp(0, ctx.myBarClass); + $r3$.ɵɵclassProp(1, ctx.myFooClass); + $r3$.ɵɵstylingApply(); } }, consts: 0, @@ -1229,17 +1229,17 @@ describe('compiler compliance: styling', () => { … function MyComponent_Template(rf, ctx) { if (rf & 1) { - $r3$.ΔelementStart(0, "div"); - $r3$.Δstyling(_c2, _c3, $r3$.ΔdefaultStyleSanitizer); - $r3$.ΔelementEnd(); + $r3$.ɵɵelementStart(0, "div"); + $r3$.ɵɵstyling(_c2, _c3, $r3$.ɵɵdefaultStyleSanitizer); + $r3$.ɵɵelementEnd(); } if (rf & 2) { - $r3$.Δselect(0); - $r3$.ΔstyleMap(ctx.myStyleExp); - $r3$.ΔclassMap(ctx.myClassExp); - $r3$.ΔstyleProp(0, ctx.myHeightExp, null, true); - $r3$.ΔclassProp(0, ctx.myBarClassExp, true); - $r3$.ΔstylingApply(); + $r3$.ɵɵselect(0); + $r3$.ɵɵstyleMap(ctx.myStyleExp); + $r3$.ɵɵclassMap(ctx.myClassExp); + $r3$.ɵɵstyleProp(0, ctx.myHeightExp, null, true); + $r3$.ɵɵclassProp(0, ctx.myBarClassExp, true); + $r3$.ɵɵstylingApply(); } }, `; @@ -1250,14 +1250,14 @@ describe('compiler compliance: styling', () => { … hostBindings: function MyComponent_HostBindings(rf, ctx, elIndex) { if (rf & 1) { - $r3$.Δstyling(_c0, _c1, $r3$.ΔdefaultStyleSanitizer); + $r3$.ɵɵstyling(_c0, _c1, $r3$.ɵɵdefaultStyleSanitizer); } if (rf & 2) { - $r3$.ΔstyleMap(ctx.myStyleExp); - $r3$.ΔclassMap(ctx.myClassExp); - $r3$.ΔstyleProp(0, ctx.myWidthExp, null, true); - $r3$.ΔclassProp(0, ctx.myFooClassExp, true); - $r3$.ΔstylingApply(); + $r3$.ɵɵstyleMap(ctx.myStyleExp); + $r3$.ɵɵclassMap(ctx.myClassExp); + $r3$.ɵɵstyleProp(0, ctx.myWidthExp, null, true); + $r3$.ɵɵclassProp(0, ctx.myFooClassExp, true); + $r3$.ɵɵstylingApply(); } }, `; @@ -1319,33 +1319,33 @@ describe('compiler compliance: styling', () => { … function ClassDirective_HostBindings(rf, ctx, elIndex) { if (rf & 1) { - $r3$.Δstyling(); + $r3$.ɵɵstyling(); } if (rf & 2) { - $r3$.ΔclassMap(ctx.myClassMap); - $r3$.ΔstylingApply(); + $r3$.ɵɵclassMap(ctx.myClassMap); + $r3$.ɵɵstylingApply(); } } … function WidthDirective_HostBindings(rf, ctx, elIndex) { if (rf & 1) { - $r3$.Δstyling($widthDir_classes$, $widthDir_styles$); + $r3$.ɵɵstyling($widthDir_classes$, $widthDir_styles$); } if (rf & 2) { - $r3$.ΔstyleProp(0, ctx.myWidth); - $r3$.ΔclassProp(0, ctx.myFooClass); - $r3$.ΔstylingApply(); + $r3$.ɵɵstyleProp(0, ctx.myWidth); + $r3$.ɵɵclassProp(0, ctx.myFooClass); + $r3$.ɵɵstylingApply(); } } … function HeightDirective_HostBindings(rf, ctx, elIndex) { if (rf & 1) { - $r3$.Δstyling($heightDir_classes$, $heightDir_styles$); + $r3$.ɵɵstyling($heightDir_classes$, $heightDir_styles$); } if (rf & 2) { - $r3$.ΔstyleProp(0, ctx.myHeight); - $r3$.ΔclassProp(0, ctx.myBarClass); - $r3$.ΔstylingApply(); + $r3$.ɵɵstyleProp(0, ctx.myHeight); + $r3$.ɵɵclassProp(0, ctx.myBarClass); + $r3$.ɵɵstylingApply(); } } … @@ -1399,16 +1399,16 @@ describe('compiler compliance: styling', () => { … hostBindings: function MyComponent_HostBindings(rf, ctx, elIndex) { if (rf & 1) { - $r3$.ΔallocHostVars(2); - $r3$.ΔelementHostAttrs($_c0$); - $r3$.Δstyling(null, null, $r3$.ΔdefaultStyleSanitizer); + $r3$.ɵɵallocHostVars(2); + $r3$.ɵɵelementHostAttrs($_c0$); + $r3$.ɵɵstyling(null, null, $r3$.ɵɵdefaultStyleSanitizer); } if (rf & 2) { - $r3$.Δproperty("id", ctx.id, null, true); - $r3$.Δproperty("title", ctx.title, null, true); - $r3$.ΔstyleMap(ctx.myStyle); - $r3$.ΔclassMap(ctx.myClass); - $r3$.ΔstylingApply(); + $r3$.ɵɵproperty("id", ctx.id, null, true); + $r3$.ɵɵproperty("title", ctx.title, null, true); + $r3$.ɵɵstyleMap(ctx.myStyle); + $r3$.ɵɵclassMap(ctx.myClass); + $r3$.ɵɵstylingApply(); } } `; @@ -1447,15 +1447,15 @@ describe('compiler compliance: styling', () => { … hostBindings: function WidthDirective_HostBindings(rf, ctx, elIndex) { if (rf & 1) { - $r3$.ΔallocHostVars(2); - $r3$.Δstyling($_c0$, $_c1$); + $r3$.ɵɵallocHostVars(2); + $r3$.ɵɵstyling($_c0$, $_c1$); } if (rf & 2) { - $r3$.Δproperty("id", ctx.id, null, true); - $r3$.Δproperty("title", ctx.title, null, true); - $r3$.ΔstyleProp(0, ctx.myWidth); - $r3$.ΔclassProp(0, ctx.myFooClass); - $r3$.ΔstylingApply(); + $r3$.ɵɵproperty("id", ctx.id, null, true); + $r3$.ɵɵproperty("title", ctx.title, null, true); + $r3$.ɵɵstyleProp(0, ctx.myWidth); + $r3$.ɵɵclassProp(0, ctx.myFooClass); + $r3$.ɵɵstylingApply(); } } `; 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 4adf227d14..0ab46c841b 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$.Δproperty("title", $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$.ɵɵproperty("title", $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$.Δproperty("ngForOf", $myComp2$.items); + const $myComp2$ = $i0$.ɵɵnextContext(2); + $r3$.ɵɵselect(1); + $i0$.ɵɵproperty("ngForOf", $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$.Δproperty("ngForOf", $outer2$.items); + $r3$.ɵɵselect(1); + $i0$.ɵɵproperty("ngForOf", $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$.Δproperty("ngForOf", ctx.items); + $i0$.ɵɵselect(0); + $i0$.ɵɵproperty("ngForOf", 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$.Δproperty("ngForOf", ctx._data); + $r3$.ɵɵselect(0); + $r3$.ɵɵproperty("ngForOf", 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$.Δproperty("ngForOf", ctx.items); + $i0$.ɵɵselect(0); + $i0$.ɵɵproperty("ngForOf", 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$.Δproperty("ngIf", $app$.showing); + const $app$ = $i0$.ɵɵnextContext(); + $r3$.ɵɵselect(1); + $i0$.ɵɵproperty("ngIf", $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$.Δproperty("ngForOf", ctx.items); + $i0$.ɵɵselect(0); + $i0$.ɵɵproperty("ngForOf", 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$.Δproperty("ngForOf", $middle$.items); + $r3$.ɵɵselect(1); + $i0$.ɵɵproperty("ngForOf", $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$.Δproperty("ngForOf", $outer$.items); + $r3$.ɵɵselect(1); + $i0$.ɵɵproperty("ngForOf", $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$.Δproperty("ngForOf", ctx.items); + $i0$.ɵɵselect(0); + $i0$.ɵɵproperty("ngForOf", 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$.Δproperty("boundAttr", ctx.b); + $i0$.ɵɵselect(0); + $i0$.ɵɵproperty("boundAttr", 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(); }); } }`; @@ -705,7 +705,7 @@ describe('compiler compliance: template', () => { function MyComponent_div_0_Template(rf, ctx) { if (rf & 1) { - $i0$.Δelement(0, "div"); + $i0$.ɵɵelement(0, "div"); } } @@ -713,11 +713,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$.Δproperty("ngIf", $i0$.ΔpipeBind1(1, 1, ctx.val)); + $i0$.ɵɵselect(0); + $i0$.ɵɵproperty("ngIf", $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 cee9296932..665bd37c98 100644 --- a/packages/compiler-cli/test/ngc_spec.ts +++ b/packages/compiler-cli/test/ngc_spec.ts @@ -2113,7 +2113,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/); }); @@ -2169,7 +2169,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', () => { @@ -2189,7 +2189,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', () => { @@ -2209,7 +2209,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', () => { @@ -2226,7 +2226,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/); }); @@ -2253,7 +2253,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 e4f66a272c..3e5fc4eba6 100644 --- a/packages/compiler-cli/test/ngtsc/fake_core/index.ts +++ b/packages/compiler-cli/test/ngtsc/fake_core/index.ts @@ -62,9 +62,9 @@ export function forwardRef(fn: () => T): T { export interface SimpleChanges { [propName: string]: any; } -export type ΔNgModuleDefWithMeta = any; -export type ΔDirectiveDefWithMeta = any; -export type ΔPipeDefWithMeta = any; +export type ɵɵNgModuleDefWithMeta = any; +export type ɵɵDirectiveDefWithMeta = any; +export type ɵɵPipeDefWithMeta = 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 b1d1452f1b..4150691c0e 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 emit the id when the module\'s id is a string', () => { @@ -488,7 +489,7 @@ describe('ngtsc behavioral tests', () => { env.driveMain(); const jsContents = env.getContents('test.js'); - expect(jsContents).toContain(`i0.ΔdefineNgModule({ type: TestModule, id: 'test' })`); + expect(jsContents).toContain(`i0.ɵɵdefineNgModule({ type: TestModule, id: 'test' })`); }); it('should emit the id when the module\'s id is defined as `module.id`', () => { @@ -506,7 +507,7 @@ describe('ngtsc behavioral tests', () => { env.driveMain(); const jsContents = env.getContents('test.js'); - expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule, id: module.id })'); + expect(jsContents).toContain('i0.ɵɵdefineNgModule({ type: TestModule, id: module.id })'); }); it('should filter out directives and pipes from module exports in the injector def', () => { @@ -547,15 +548,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; } `); @@ -564,7 +565,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] });'); }); @@ -596,18 +597,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', () => { @@ -637,18 +638,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', () => { @@ -682,18 +683,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', () => { @@ -854,9 +855,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', () => { @@ -877,9 +878,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', () => { @@ -901,7 +902,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', () => { @@ -921,7 +922,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', () => { @@ -947,7 +948,7 @@ describe('ngtsc behavioral tests', () => { const dtsContents = env.getContents('test.d.ts'); expect(dtsContents) .toContain( - 'i0.ΔNgModuleDefWithMeta'); + 'i0.ɵɵNgModuleDefWithMeta'); }); describe('empty and missing selectors', () => { @@ -1062,7 +1063,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', () => { @@ -1309,7 +1310,7 @@ describe('ngtsc behavioral tests', () => { `); env.driveMain(); - expect(env.getContents('test.js')).toContain('i0.ΔpureFunction1'); + expect(env.getContents('test.js')).toContain('i0.ɵɵpureFunction1'); }); }); @@ -1325,11 +1326,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; } `); @@ -1341,7 +1342,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', () => { @@ -1366,9 +1368,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; } `); @@ -1381,18 +1383,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', ` @@ -1427,13 +1429,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; } `); @@ -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 unwrap a namespace imported ModuleWithProviders function if a generic type is provided for it', @@ -1466,7 +1468,7 @@ describe('ngtsc behavioral tests', () => { declare class RouterModule { static forRoot(): core.ModuleWithProviders; - static ngModuleDef: ΔNgModuleDefWithMeta; + static ngModuleDef: ɵɵNgModuleDefWithMeta; } `); @@ -1479,7 +1481,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', () => { @@ -1517,7 +1519,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', () => { @@ -1547,9 +1549,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)); }); @@ -1579,10 +1581,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)); @@ -1608,11 +1610,11 @@ 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)); - // match `i0.ΔcontentQuery(dirIndex, _c0, true, null)` + // match `i0.ɵɵcontentQuery(dirIndex, _c0, true, null)` expect(jsContents).toContain('_c0 = ["parens"];'); expect(jsContents).toMatch(contentQueryRegExp('_c0', true)); }); @@ -1662,9 +1664,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); } } `; @@ -1760,17 +1762,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.Δstyling(_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.ɵɵstyling(_c0); } if (rf & 2) { - i0.ΔelementAttribute(elIndex, "hello", i0.Δbind(ctx.foo)); - i0.Δproperty("prop", ctx.bar, null, true); - i0.ΔclassProp(0, ctx.someClass); - i0.ΔstylingApply(); + i0.ɵɵelementAttribute(elIndex, "hello", i0.ɵɵbind(ctx.foo)); + i0.ɵɵproperty("prop", ctx.bar, null, true); + i0.ɵɵclassProp(0, ctx.someClass); + i0.ɵɵstylingApply(); } } `; @@ -1799,7 +1801,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', () => { @@ -1824,7 +1826,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', () => { @@ -1846,7 +1848,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); }); } } `; @@ -2041,7 +2043,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', () => { @@ -2296,8 +2298,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 \u0275Child_BaseFactory = i0.ΔgetInheritedFactory(Child)'); + .toContain('function Base_Factory(t) { return new (t || Base)(i0.ɵɵinject(Dep)); }'); + expect(jsContents).toContain('var \u0275Child_BaseFactory = i0.ɵɵgetInheritedFactory(Child)'); expect(jsContents) .toContain('function Child_Factory(t) { return \u0275Child_BaseFactory(t || Child); }'); expect(jsContents) @@ -2322,7 +2324,7 @@ describe('ngtsc behavioral tests', () => { env.driveMain(); const jsContents = env.getContents('test.js'); - expect(jsContents).toContain('var \u0275Dir_BaseFactory = i0.ΔgetInheritedFactory(Dir)'); + expect(jsContents).toContain('var \u0275Dir_BaseFactory = i0.ɵɵgetInheritedFactory(Dir)'); }); it('should wrap "directives" in component metadata in a closure when forward references are present', @@ -2463,8 +2465,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')); }); @@ -2575,8 +2577,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', () => { @@ -2767,14 +2769,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', ` @@ -2803,19 +2805,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', ` @@ -3024,14 +3026,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; } `); @@ -3211,15 +3213,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)); } } `; @@ -3266,15 +3268,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.Δproperty("href", ctx.propHref, i0.ΔsanitizeUrlOrResourceUrl, true); - i0.Δproperty("src", ctx.propSrc, i0.ΔsanitizeUrlOrResourceUrl, true); - i0.Δproperty("action", ctx.propAction, i0.ΔsanitizeUrl, true); - i0.Δproperty("profile", ctx.propProfile, i0.ΔsanitizeResourceUrl, true); - i0.Δproperty("innerHTML", ctx.propInnerHTML, i0.ΔsanitizeHtml, true); - i0.Δproperty("title", ctx.propSafeTitle, null, true); + i0.ɵɵproperty("href", ctx.propHref, i0.ɵɵsanitizeUrlOrResourceUrl, true); + i0.ɵɵproperty("src", ctx.propSrc, i0.ɵɵsanitizeUrlOrResourceUrl, true); + i0.ɵɵproperty("action", ctx.propAction, i0.ɵɵsanitizeUrl, true); + i0.ɵɵproperty("profile", ctx.propProfile, i0.ɵɵsanitizeResourceUrl, true); + i0.ɵɵproperty("innerHTML", ctx.propInnerHTML, i0.ɵɵsanitizeHtml, true); + i0.ɵɵproperty("title", ctx.propSafeTitle, null, true); } } `; @@ -3306,15 +3308,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.Δproperty("src", ctx.srcProp, null, true); - i0.Δproperty("href", ctx.hrefProp, null, true); - i0.Δproperty("title", 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.ɵɵproperty("src", ctx.srcProp, null, true); + i0.ɵɵproperty("href", ctx.hrefProp, null, true); + i0.ɵɵproperty("title", 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)); } } `; @@ -3344,13 +3346,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; } `); }); @@ -3980,24 +3982,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; } `); @@ -4029,26 +4031,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 3c0d117bb2..135311857d 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.ΔpropertyInterpolate("id", ctx.name)', + generated: 'i0.ɵɵpropertyInterpolate("id", 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.Δproperty("attr", ctx.name)', + generated: 'i0.ɵɵproperty("attr", ctx.name)', sourceUrl: '../test.ts' }); }); @@ -114,12 +114,12 @@ describe('template source-mapping', () => { 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.Δproperty("attr", ctx.greeting + ctx.name)', + generated: 'i0.ɵɵproperty("attr", ctx.greeting + ctx.name)', sourceUrl: '../test.ts' }); }); @@ -128,12 +128,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.Δproperty("attr", ctx.name)', + generated: 'i0.ɵɵproperty("attr", ctx.name)', sourceUrl: '../test.ts' }); }); @@ -142,15 +142,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', () => { @@ -158,11 +158,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' }); }); @@ -216,19 +216,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' }); }); @@ -237,17 +237,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'}); }); }); @@ -257,20 +257,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' // }); }); @@ -283,18 +283,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' // }); }); @@ -305,14 +305,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'}); }); @@ -331,20 +331,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'}); }); }); @@ -353,24 +353,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' }); @@ -381,24 +381,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' }); @@ -410,7 +410,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' }); @@ -429,30 +429,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' }); @@ -464,39 +464,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 7a8dd63f32..09116d003a 100644 --- a/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts +++ b/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts @@ -34,17 +34,17 @@ export declare class IndexPipe { 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: 'binding'; - 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 4978a6996e..dd2b88f603 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, 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 fb9944cf36..af400aa98c 100644 --- a/packages/compiler/src/render3/r3_identifiers.ts +++ b/packages/compiler/src/render3/r3_identifiers.ts @@ -17,237 +17,237 @@ 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 classProp: o.ExternalReference = {name: 'ΔclassProp', moduleName: CORE}; + static classProp: o.ExternalReference = {name: 'ɵɵclassProp', 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 styling: o.ExternalReference = {name: 'Δstyling', moduleName: CORE}; + static styling: o.ExternalReference = {name: 'ɵɵstyling', moduleName: CORE}; - static styleMap: o.ExternalReference = {name: 'ΔstyleMap', moduleName: CORE}; + static styleMap: o.ExternalReference = {name: 'ɵɵstyleMap', moduleName: CORE}; - static classMap: o.ExternalReference = {name: 'ΔclassMap', moduleName: CORE}; + static classMap: o.ExternalReference = {name: 'ɵɵclassMap', moduleName: CORE}; - static styleProp: o.ExternalReference = {name: 'ΔstyleProp', moduleName: CORE}; + static styleProp: o.ExternalReference = {name: 'ɵɵstyleProp', moduleName: CORE}; - static stylingApply: o.ExternalReference = {name: 'ΔstylingApply', moduleName: CORE}; + static stylingApply: o.ExternalReference = {name: 'ɵɵstylingApply', moduleName: CORE}; - static elementHostAttrs: o.ExternalReference = {name: 'ΔelementHostAttrs', moduleName: CORE}; + static elementHostAttrs: o.ExternalReference = {name: 'ɵɵelementHostAttrs', 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 property: o.ExternalReference = {name: 'Δproperty', moduleName: CORE}; + static property: o.ExternalReference = {name: 'ɵɵproperty', moduleName: CORE}; static propertyInterpolate: - o.ExternalReference = {name: 'ΔpropertyInterpolate', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵpropertyInterpolate', moduleName: CORE}; static propertyInterpolate1: - o.ExternalReference = {name: 'ΔpropertyInterpolate1', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵpropertyInterpolate1', moduleName: CORE}; static propertyInterpolate2: - o.ExternalReference = {name: 'ΔpropertyInterpolate2', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵpropertyInterpolate2', moduleName: CORE}; static propertyInterpolate3: - o.ExternalReference = {name: 'ΔpropertyInterpolate3', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵpropertyInterpolate3', moduleName: CORE}; static propertyInterpolate4: - o.ExternalReference = {name: 'ΔpropertyInterpolate4', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵpropertyInterpolate4', moduleName: CORE}; static propertyInterpolate5: - o.ExternalReference = {name: 'ΔpropertyInterpolate5', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵpropertyInterpolate5', moduleName: CORE}; static propertyInterpolate6: - o.ExternalReference = {name: 'ΔpropertyInterpolate6', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵpropertyInterpolate6', moduleName: CORE}; static propertyInterpolate7: - o.ExternalReference = {name: 'ΔpropertyInterpolate7', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵpropertyInterpolate7', moduleName: CORE}; static propertyInterpolate8: - o.ExternalReference = {name: 'ΔpropertyInterpolate8', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵpropertyInterpolate8', moduleName: CORE}; static propertyInterpolateV: - o.ExternalReference = {name: 'ΔpropertyInterpolateV', moduleName: CORE}; + o.ExternalReference = {name: 'ɵɵpropertyInterpolateV', 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 e45f8f0acb..df83a468d6 100644 --- a/packages/compiler/src/render3/r3_module_compiler.ts +++ b/packages/compiler/src/render3/r3_module_compiler.ts @@ -107,7 +107,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); @@ -122,7 +122,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); @@ -150,7 +150,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 17c1fbf41d..758ceb66ea 100644 --- a/packages/compiler/src/render3/view/template.ts +++ b/packages/compiler/src/render3/view/template.ts @@ -874,7 +874,7 @@ export class TemplateDefinitionBuilder implements t.Visitor, LocalResolver return trimTrailingNulls(parameters); }); - // handle property bindings e.g. Δproperty('ngForOf', ctx.items), et al; + // handle property bindings e.g. ɵɵproperty('ngForOf', ctx.items), et al; 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 41a2a4d67c..d4f139a16e 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, Δ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, ɵɵ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 0bd5a86bab..f2b48983e4 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,114 +38,114 @@ 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, - Δproperty, - ΔpropertyInterpolate, - ΔpropertyInterpolate1, - ΔpropertyInterpolate2, - ΔpropertyInterpolate3, - ΔpropertyInterpolate4, - ΔpropertyInterpolate5, - ΔpropertyInterpolate6, - ΔpropertyInterpolate7, - ΔpropertyInterpolate8, - ΔpropertyInterpolateV, - ΔcomponentHostSyntheticProperty, - ΔcomponentHostSyntheticListener, - ΔprojectionDef, - Δreference, - ΔenableBindings, - ΔdisableBindings, - ΔallocHostVars, - ΔelementAttribute, - ΔelementContainerStart, - ΔelementContainerEnd, - Δstyling, - ΔstyleMap, - ΔclassMap, - ΔstyleProp, - ΔstylingApply, - ΔclassProp, - ΔelementHostAttrs, + ɵɵrestoreView, + ɵɵcontainerRefreshStart, + ɵɵcontainerRefreshEnd, + ɵɵqueryRefresh, + ɵɵviewQuery, + ɵɵstaticViewQuery, + ɵɵstaticContentQuery, + ɵɵloadViewQuery, + ɵɵcontentQuery, + ɵɵloadContentQuery, + ɵɵelementEnd, + ɵɵelementProperty, + ɵɵproperty, + ɵɵpropertyInterpolate, + ɵɵpropertyInterpolate1, + ɵɵpropertyInterpolate2, + ɵɵpropertyInterpolate3, + ɵɵpropertyInterpolate4, + ɵɵpropertyInterpolate5, + ɵɵpropertyInterpolate6, + ɵɵpropertyInterpolate7, + ɵɵpropertyInterpolate8, + ɵɵpropertyInterpolateV, + ɵɵcomponentHostSyntheticProperty, + ɵɵcomponentHostSyntheticListener, + ɵɵprojectionDef, + ɵɵreference, + ɵɵenableBindings, + ɵɵdisableBindings, + ɵɵallocHostVars, + ɵɵelementAttribute, + ɵɵelementContainerStart, + ɵɵelementContainerEnd, + ɵɵstyling, + ɵɵstyleMap, + ɵɵclassMap, + ɵɵstyleProp, + ɵɵstylingApply, + ɵɵclassProp, + ɵɵelementHostAttrs, - Δ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'; @@ -167,18 +167,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 1733f522a0..6435213cad 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, ɵɵ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} from './injector'; -export {Δinject, inject, ɵɵinject, INJECTOR} from './injector_compatibility'; +export {ɵɵinject, inject, INJECTOR} 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 3216018e5a..cd6556c18e 100644 --- a/packages/core/src/di/injector.ts +++ b/packages/core/src/di/injector.ts @@ -11,8 +11,8 @@ import {stringify} from '../util/stringify'; import {resolveForwardRef} from './forward_ref'; import {InjectionToken} from './injection_token'; -import {INJECTOR, NG_TEMP_TOKEN_PATH, NullInjector, THROW_IF_NOT_FOUND, USE_VALUE, catchInjectorError, formatError, Δinject} from './injector_compatibility'; -import {ΔdefineInjectable} from './interface/defs'; +import {INJECTOR, NG_TEMP_TOKEN_PATH, NullInjector, THROW_IF_NOT_FOUND, USE_VALUE, catchInjectorError, formatError, ɵɵ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'; @@ -88,9 +88,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 10eb13f290..83cc2638ab 100644 --- a/packages/core/src/di/injector_compatibility.ts +++ b/packages/core/src/di/injector_compatibility.ts @@ -13,7 +13,7 @@ import {stringify} from '../util/stringify'; import {resolveForwardRef} from './forward_ref'; 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 {ValueProvider} from './interface/provider'; import {Inject, Optional, Self, SkipSelf} from './metadata'; @@ -107,9 +107,10 @@ export function injectInjectorOnly( * @see inject * @codeGenApi */ -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); } @@ -137,13 +138,7 @@ export function Δinject(token: Type| InjectionToken, flags = InjectFla * * @publicApi */ -export const inject = Δinject; - -/** - * @deprecated delete by v8, use `inject`. - * @codeGenApi - */ -export const ɵɵinject = Δinject; +export const inject = ɵɵinject; /** * Injects `root` tokens in limp mode. @@ -154,7 +149,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; @@ -191,9 +186,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 f98c09cf6a..e92f931825 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,28 +131,21 @@ export interface InjectorTypeWithProviders { * * @codeGenApi */ -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; - -/** - * @deprecated delete before v8. Use `defineInjectable`, which is also deprecated, but will be - * around until v10. - * @publicApi - */ -export const ɵɵdefineInjectable = ΔdefineInjectable; +export const defineInjectable = ɵɵdefineInjectable; /** * Construct an `InjectorDef` which configures an injector. @@ -174,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; } /** @@ -187,7 +180,7 @@ export function ΔdefineInjector(options: {factory: () => any, providers?: any[] * * @param type A type which may have its own (non-inherited) `ngInjectableDef`. */ -export function getInjectableDef(type: any): ΔInjectableDef|null { +export function getInjectableDef(type: any): ɵɵInjectableDef|null { return type && type.hasOwnProperty(NG_INJECTABLE_DEF) ? type[NG_INJECTABLE_DEF] : null; } @@ -199,7 +192,7 @@ export function getInjectableDef(type: any): ΔInjectableDef|null { * @deprecated Will be removed in v10, where an error will occur in the scenario if we find the * `ngInjectableDef` on an ancestor only. */ -export function getInheritedInjectableDef(type: any): ΔInjectableDef|null { +export function getInheritedInjectableDef(type: any): ɵɵInjectableDef|null { if (type && type[NG_INJECTABLE_DEF]) { // TODO(FW-1307): Re-add ngDevMode when closure can handle it // ngDevMode && @@ -217,7 +210,7 @@ export function getInheritedInjectableDef(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 d7c2daca54..be8b0cb07c 100644 --- a/packages/core/src/di/r3_injector.ts +++ b/packages/core/src/di/r3_injector.ts @@ -14,8 +14,8 @@ import {stringify} from '../util/stringify'; import {resolveForwardRef} from './forward_ref'; import {InjectionToken} from './injection_token'; import {Injector} from './injector'; -import {INJECTOR, NG_TEMP_TOKEN_PATH, NullInjector, THROW_IF_NOT_FOUND, USE_VALUE, catchInjectorError, injectArgs, setCurrentInjector, Δinject} from './injector_compatibility'; -import {InjectorType, InjectorTypeWithProviders, getInheritedInjectableDef, getInjectableDef, getInjectorDef, ΔInjectableDef} from './interface/defs'; +import {INJECTOR, NG_TEMP_TOKEN_PATH, NullInjector, THROW_IF_NOT_FOUND, USE_VALUE, catchInjectorError, injectArgs, setCurrentInjector, ɵɵinject} from './injector_compatibility'; +import {InjectorType, InjectorTypeWithProviders, getInheritedInjectableDef, 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'; @@ -366,7 +366,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') { @@ -450,7 +450,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 b4fcb65be5..0b7638f0ad 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. */ @@ -350,7 +350,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 index dc7fcba617..359ae0937f 100644 --- a/packages/core/src/render3/CODE_GEN_API.md +++ b/packages/core/src/render3/CODE_GEN_API.md @@ -1,11 +1,11 @@ # Code Gen API -### Prefix Δ +### 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. +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. +- 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 979f5aa113..77fca80daf 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 6e3126fd20..b2637ef8db 100644 --- a/packages/core/src/render3/definition.ts +++ b/packages/core/src/render3/definition.ts @@ -9,7 +9,7 @@ import '../util/ng_dev_mode'; import {ChangeDetectionStrategy} from '../change_detection/constants'; -import {NG_INJECTABLE_DEF, ΔdefineInjectable} from '../di/interface/defs'; +import {NG_INJECTABLE_DEF, ɵɵdefineInjectable} from '../di/interface/defs'; import {Mutable, Type} from '../interface/type'; import {NgModuleDef} from '../metadata/ng_module'; import {SchemaMetadata} from '../metadata/schema'; @@ -19,7 +19,7 @@ import {stringify} from '../util/stringify'; import {EMPTY_ARRAY, EMPTY_OBJ} from './empty'; import {NG_BASE_DEF, 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'; @@ -42,7 +42,7 @@ let _renderCompCount = 0; * ``` * @codeGenApi */ -export function ΔdefineComponent(componentDefinition: { +export function ɵɵdefineComponent(componentDefinition: { /** * Directive type, needed to configure the injector. */ @@ -309,7 +309,7 @@ export function ΔdefineComponent(componentDefinition: { // be retrieved through the node injector, so this isn't a problem. if (!type.hasOwnProperty(NG_INJECTABLE_DEF)) { (type as any)[NG_INJECTABLE_DEF] = - ΔdefineInjectable({factory: componentDefinition.factory as() => T}); + ɵɵdefineInjectable({factory: componentDefinition.factory as() => T}); } }) as never; @@ -319,7 +319,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); @@ -346,7 +346,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; @@ -394,7 +394,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[]); @@ -498,7 +498,7 @@ function invertObject( * # Example * ```ts * class ShouldBeInherited { - * static ngBaseDef = ΔdefineBase({ + * static ngBaseDef = ɵɵdefineBase({ * ... * }) * } @@ -508,7 +508,7 @@ function invertObject( * * @codeGenApi */ -export function ΔdefineBase(baseDefinition: { +export function ɵɵdefineBase(baseDefinition: { /** * A map of input names. * @@ -581,7 +581,7 @@ export function ΔdefineBase(baseDefinition: { * Function executed by the parent template to allow children to apply host bindings. */ hostBindings?: HostBindingsFunction; -}): ΔBaseDef { +}): ɵɵBaseDef { const declaredInputs: {[P in keyof T]: string} = {} as any; return { inputs: invertObject(baseDefinition.inputs as any, declaredInputs), @@ -601,7 +601,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({ * ... * }); * } @@ -609,7 +609,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. */ @@ -727,7 +727,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, @@ -766,7 +766,7 @@ export function getPipeDef(type: any): PipeDef|null { return (type as any)[NG_PIPE_DEF] || null; } -export function getBaseDef(type: any): ΔBaseDef|null { +export function getBaseDef(type: any): ɵɵBaseDef|null { return (type as any)[NG_BASE_DEF] || null; } diff --git a/packages/core/src/render3/di.ts b/packages/core/src/render3/di.ts index 6302c26ea3..c8507b871a 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 a025ab9375..441af1e386 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, ContentQueriesFunction, DirectiveDef, DirectiveDefFeature, 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) { @@ -117,7 +117,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 f2a0cff59e..34c39ec47f 100644 --- a/packages/core/src/render3/index.ts +++ b/packages/core/src/render3/index.ts @@ -6,115 +6,115 @@ * 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, - ΔclassMap, - ΔclassProp, - ΔcomponentHostSyntheticListener, - ΔcomponentHostSyntheticProperty, + ɵɵallocHostVars, + ɵɵbind, + ɵɵclassMap, + ɵɵclassProp, + ɵɵcomponentHostSyntheticListener, + ɵɵcomponentHostSyntheticProperty, - Δcontainer, - ΔcontainerRefreshEnd, - ΔcontainerRefreshStart, + ɵɵcontainer, + ɵɵcontainerRefreshEnd, + ɵɵcontainerRefreshStart, - ΔdirectiveInject, + ɵɵdirectiveInject, - Δelement, - ΔelementAttribute, - ΔelementContainerEnd, + ɵɵelement, + ɵɵelementAttribute, + ɵɵelementContainerEnd, - ΔelementContainerStart, - ΔelementEnd, + ɵɵelementContainerStart, + ɵɵelementEnd, - ΔelementHostAttrs, - ΔelementProperty, - ΔelementStart, - ΔembeddedViewEnd, + ɵɵelementHostAttrs, + ɵɵelementProperty, + ɵɵelementStart, + ɵɵ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, - ΔpropertyInterpolate, - ΔpropertyInterpolate1, - ΔpropertyInterpolate2, - ΔpropertyInterpolate3, - ΔpropertyInterpolate4, - ΔpropertyInterpolate5, - ΔpropertyInterpolate6, - ΔpropertyInterpolate7, - ΔpropertyInterpolate8, - ΔpropertyInterpolateV, + ɵɵprojection, + ɵɵprojectionDef, + ɵɵproperty, + ɵɵpropertyInterpolate, + ɵɵpropertyInterpolate1, + ɵɵpropertyInterpolate2, + ɵɵpropertyInterpolate3, + ɵɵpropertyInterpolate4, + ɵɵpropertyInterpolate5, + ɵɵpropertyInterpolate6, + ɵɵpropertyInterpolate7, + ɵɵpropertyInterpolate8, + ɵɵpropertyInterpolateV, - Δreference, + ɵɵreference, - Δselect, - ΔstyleMap, - ΔstyleProp, - Δstyling, - ΔstylingApply, - Δtemplate, + ɵɵselect, + ɵɵstyleMap, + ɵɵstyleProp, + ɵɵstyling, + ɵɵstylingApply, + ɵɵ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'; @@ -128,71 +128,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 fcea0fbc5d..f5909b2947 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 f8fc6c19c5..7bb92341a7 100644 --- a/packages/core/src/render3/instructions/di.ts +++ b/packages/core/src/render3/instructions/di.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import {InjectFlags, InjectionToken, resolveForwardRef} from '../../di'; -import {Δinject} from '../../di/injector_compatibility'; +import {ɵɵinject} from '../../di/injector_compatibility'; import {Type} from '../../interface/type'; import {getOrCreateInjectable, injectAttributeImpl} from '../di'; import {TContainerNode, TElementContainerNode, TElementNode} from '../interfaces/node'; @@ -24,9 +24,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)) * }); * } * ``` @@ -36,15 +36,15 @@ 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); const lView = getLView(); // Fall back to inject() if view hasn't been created. This situation can happen in tests // if inject utilities are used before bootstrapping. - if (lView == null) return Δinject(token, flags); + if (lView == null) return ɵɵinject(token, flags); return getOrCreateInjectable( getPreviousOrParentTNode() as TElementNode | TContainerNode | TElementContainerNode, lView, @@ -56,6 +56,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 2fdb61954e..b6e859fd11 100644 --- a/packages/core/src/render3/instructions/element.ts +++ b/packages/core/src/render3/instructions/element.ts @@ -46,7 +46,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]; @@ -136,7 +136,7 @@ export function ΔelementStart( * * @codeGenApi */ -export function ΔelementEnd(): void { +export function ɵɵelementEnd(): void { let previousOrParentTNode = getPreviousOrParentTNode(); if (getIsParent()) { setIsParent(false); @@ -190,10 +190,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(); } @@ -209,7 +209,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) { @@ -277,7 +277,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 63cd9dd235..e2e5ea31f8 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 @@ -127,7 +128,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 b34c35b45c..ee61c22680 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 d4ce901d7f..301b43bc48 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 e93cb7eff2..4a4b14ad91 100644 --- a/packages/core/src/render3/instructions/property.ts +++ b/packages/core/src/render3/instructions/property.ts @@ -35,16 +35,16 @@ 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(); ngDevMode && assertNotEqual(index, -1, 'selected index cannot be -1'); - const bindReconciledValue = Δbind(value); + const bindReconciledValue = ɵɵbind(value); if (bindReconciledValue !== NO_CHANGE) { elementPropertyInternal(index, propName, bindReconciledValue, sanitizer, nativeOnly); } - return Δproperty; + return ɵɵproperty; } /** @@ -54,7 +54,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); @@ -79,7 +79,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 { if (value !== NO_CHANGE) { @@ -110,7 +110,7 @@ export function ΔelementProperty( * * @codeGenApi */ -export function ΔcomponentHostSyntheticProperty( +export function ɵɵcomponentHostSyntheticProperty( index: number, propName: string, value: T | NO_CHANGE, sanitizer?: SanitizerFn | null, nativeOnly?: boolean) { if (value !== NO_CHANGE) { diff --git a/packages/core/src/render3/instructions/property_interpolation.ts b/packages/core/src/render3/instructions/property_interpolation.ts index e8d53f3562..044d7d2b18 100644 --- a/packages/core/src/render3/instructions/property_interpolation.ts +++ b/packages/core/src/render3/instructions/property_interpolation.ts @@ -31,7 +31,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; @@ -76,7 +76,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); @@ -88,7 +88,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]; @@ -109,7 +109,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(); @@ -135,7 +135,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(); @@ -163,7 +163,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(); @@ -193,7 +193,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(); @@ -224,7 +224,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 { @@ -258,7 +258,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 { @@ -306,7 +306,7 @@ export function Δinterpolation8( * 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, @@ -321,10 +321,10 @@ export function Δinterpolation8( * @returns itself, so that it may be chained. * @codeGenApi */ -export function ΔpropertyInterpolate( +export function ɵɵpropertyInterpolate( propName: string, v0: any, sanitizer?: SanitizerFn): TsickleIssue1009 { - ΔpropertyInterpolate1(propName, '', v0, '', sanitizer); - return ΔpropertyInterpolate; + ɵɵpropertyInterpolate1(propName, '', v0, '', sanitizer); + return ɵɵpropertyInterpolate; } @@ -341,7 +341,7 @@ export function ΔpropertyInterpolate( * 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, @@ -356,15 +356,15 @@ export function ΔpropertyInterpolate( * @returns itself, so that it may be chained. * @codeGenApi */ -export function ΔpropertyInterpolate1( +export function ɵɵpropertyInterpolate1( propName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009 { const index = getSelectedIndex(); - const interpolatedValue = Δinterpolation1(prefix, v0, suffix); + const interpolatedValue = ɵɵinterpolation1(prefix, v0, suffix); if (interpolatedValue !== NO_CHANGE) { elementPropertyInternal(index, propName, interpolatedValue, sanitizer); } - return ΔpropertyInterpolate1; + return ɵɵpropertyInterpolate1; } /** @@ -380,7 +380,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, @@ -397,15 +397,15 @@ export function ΔpropertyInterpolate1( * @returns itself, so that it may be chained. * @codeGenApi */ -export function ΔpropertyInterpolate2( +export function ɵɵpropertyInterpolate2( propName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009 { const index = getSelectedIndex(); - const interpolatedValue = Δinterpolation2(prefix, v0, i0, v1, suffix); + const interpolatedValue = ɵɵinterpolation2(prefix, v0, i0, v1, suffix); if (interpolatedValue !== NO_CHANGE) { elementPropertyInternal(index, propName, interpolatedValue, sanitizer); } - return ΔpropertyInterpolate2; + return ɵɵpropertyInterpolate2; } /** @@ -421,7 +421,7 @@ export function ΔpropertyInterpolate2( * Its compiled representation is:: * * ```ts - * ΔpropertyInterpolate3( + * ɵɵpropertyInterpolate3( * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix'); * ``` * @@ -441,15 +441,15 @@ export function ΔpropertyInterpolate2( * @returns itself, so that it may be chained. * @codeGenApi */ -export function ΔpropertyInterpolate3( +export function ɵɵpropertyInterpolate3( propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009 { const index = getSelectedIndex(); - const interpolatedValue = Δinterpolation3(prefix, v0, i0, v1, i1, v2, suffix); + const interpolatedValue = ɵɵinterpolation3(prefix, v0, i0, v1, i1, v2, suffix); if (interpolatedValue !== NO_CHANGE) { elementPropertyInternal(index, propName, interpolatedValue, sanitizer); } - return ΔpropertyInterpolate3; + return ɵɵpropertyInterpolate3; } /** @@ -465,7 +465,7 @@ export function ΔpropertyInterpolate3( * Its compiled representation is:: * * ```ts - * ΔpropertyInterpolate4( + * ɵɵpropertyInterpolate4( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix'); * ``` * @@ -487,15 +487,15 @@ export function ΔpropertyInterpolate3( * @returns itself, so that it may be chained. * @codeGenApi */ -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, sanitizer?: SanitizerFn): TsickleIssue1009 { const index = getSelectedIndex(); - const interpolatedValue = Δinterpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix); + const interpolatedValue = ɵɵinterpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix); if (interpolatedValue !== NO_CHANGE) { elementPropertyInternal(index, propName, interpolatedValue, sanitizer); } - return ΔpropertyInterpolate4; + return ɵɵpropertyInterpolate4; } /** @@ -511,7 +511,7 @@ export function ΔpropertyInterpolate4( * Its compiled representation is:: * * ```ts - * ΔpropertyInterpolate5( + * ɵɵpropertyInterpolate5( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix'); * ``` * @@ -535,15 +535,15 @@ export function ΔpropertyInterpolate4( * @returns itself, so that it may be chained. * @codeGenApi */ -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, sanitizer?: SanitizerFn): TsickleIssue1009 { const index = getSelectedIndex(); - const interpolatedValue = Δinterpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix); + const interpolatedValue = ɵɵinterpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix); if (interpolatedValue !== NO_CHANGE) { elementPropertyInternal(index, propName, interpolatedValue, sanitizer); } - return ΔpropertyInterpolate5; + return ɵɵpropertyInterpolate5; } /** @@ -559,7 +559,7 @@ export function ΔpropertyInterpolate5( * Its compiled representation is:: * * ```ts - * ΔpropertyInterpolate6( + * ɵɵpropertyInterpolate6( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix'); * ``` * @@ -585,17 +585,17 @@ export function ΔpropertyInterpolate5( * @returns itself, so that it may be chained. * @codeGenApi */ -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, sanitizer?: SanitizerFn): TsickleIssue1009 { const index = getSelectedIndex(); const interpolatedValue = - Δinterpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix); + ɵɵinterpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix); if (interpolatedValue !== NO_CHANGE) { elementPropertyInternal(index, propName, interpolatedValue, sanitizer); } - return ΔpropertyInterpolate6; + return ɵɵpropertyInterpolate6; } /** @@ -611,7 +611,7 @@ export function ΔpropertyInterpolate6( * Its compiled representation is:: * * ```ts - * ΔpropertyInterpolate7( + * ɵɵpropertyInterpolate7( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix'); * ``` * @@ -639,17 +639,17 @@ export function ΔpropertyInterpolate6( * @returns itself, so that it may be chained. * @codeGenApi */ -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, sanitizer?: SanitizerFn): TsickleIssue1009 { const index = getSelectedIndex(); const interpolatedValue = - Δinterpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix); + ɵɵinterpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix); if (interpolatedValue !== NO_CHANGE) { elementPropertyInternal(index, propName, interpolatedValue, sanitizer); } - return ΔpropertyInterpolate7; + return ɵɵpropertyInterpolate7; } /** @@ -665,7 +665,7 @@ export function ΔpropertyInterpolate7( * Its compiled representation is:: * * ```ts - * ΔpropertyInterpolate8( + * ɵɵpropertyInterpolate8( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix'); * ``` * @@ -695,17 +695,17 @@ export function ΔpropertyInterpolate7( * @returns itself, so that it may be chained. * @codeGenApi */ -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, sanitizer?: SanitizerFn): TsickleIssue1009 { const index = getSelectedIndex(); const interpolatedValue = - Δinterpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix); + ɵɵinterpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix); if (interpolatedValue !== NO_CHANGE) { elementPropertyInternal(index, propName, interpolatedValue, sanitizer); } - return ΔpropertyInterpolate8; + return ɵɵpropertyInterpolate8; } /** @@ -721,7 +721,7 @@ export function ΔpropertyInterpolate8( * Its compiled representation is:: * * ```ts - * ΔpropertyInterpolateV( + * ɵɵpropertyInterpolateV( * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9, * 'suffix']); * ``` @@ -738,13 +738,13 @@ export function ΔpropertyInterpolate8( * @returns itself, so that it may be chained. * @codeGenApi */ -export function ΔpropertyInterpolateV( +export function ɵɵpropertyInterpolateV( propName: string, values: any[], sanitizer?: SanitizerFn): TsickleIssue1009 { const index = getSelectedIndex(); - const interpolatedValue = ΔinterpolationV(values); + const interpolatedValue = ɵɵinterpolationV(values); if (interpolatedValue !== NO_CHANGE) { elementPropertyInternal(index, propName, interpolatedValue, sanitizer); } - return ΔpropertyInterpolateV; + return ɵɵpropertyInterpolateV; } diff --git a/packages/core/src/render3/instructions/select.ts b/packages/core/src/render3/instructions/select.ts index 76816b2181..1c77ac0176 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( @@ -44,6 +44,6 @@ export function Δselect(index: number): void { // We must set the selected index *after* running the hooks, because hooks may have side-effects // that cause other template functions to run, thus updating the selected index, which is global // state. If we run `setSelectedIndex` *before* we run the hooks, in some cases the selected index - // will be altered by the time we leave the `Δselect` instruction. + // will be altered by the time we leave the `ɵɵselect` instruction. setSelectedIndex(index); } diff --git a/packages/core/src/render3/instructions/shared.ts b/packages/core/src/render3/instructions/shared.ts index 14ad2b880a..6d5f7797ea 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, getSelectedIndex, incrementActiveDirectiveId, isCreationMode, leaveView, setActiveHostElement, setBindingRoot, setCheckNoChangesMode, setCurrentDirectiveDef, setCurrentQueryIndex, setIsParent, setPreviousOrParentTNode, setSelectedIndex, ΔnamespaceHTML} from '../state'; +import {enterView, getBindingsEnabled, getCheckNoChangesMode, getIsParent, getLView, getNamespace, getPreviousOrParentTNode, getSelectedIndex, incrementActiveDirectiveId, isCreationMode, leaveView, 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'; @@ -445,7 +445,7 @@ export function renderComponentOrTemplate( } function executeTemplate(templateFn: ComponentTemplate, rf: RenderFlags, context: T) { - ΔnamespaceHTML(); + ɵɵnamespaceHTML(); const prevSelectedIndex = getSelectedIndex(); try { setActiveHostElement(null); 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 6fd0186849..f607d90a62 100644 --- a/packages/core/src/render3/instructions/styling.ts +++ b/packages/core/src/render3/instructions/styling.ts @@ -66,7 +66,7 @@ import {scheduleTick, setInputsForProperty} from './shared'; * * @codeGenApi */ -export function Δstyling( +export function ɵɵstyling( classBindingNames?: string[] | null, styleBindingNames?: string[] | null, styleSanitizer?: StyleSanitizeFn | null): void { const tNode = getPreviousOrParentTNode(); @@ -143,7 +143,7 @@ function initStyling( * * @codeGenApi */ -export function ΔstyleProp( +export function ɵɵstyleProp( styleIndex: number, value: string | number | String | PlayerFactory | null, suffix?: string | null, forceOverride?: boolean): void { const index = getSelectedIndex(); @@ -209,7 +209,7 @@ function resolveStylePropValue( * * @codeGenApi */ -export function ΔclassProp( +export function ɵɵclassProp( classIndex: number, value: boolean | PlayerFactory, forceOverride?: boolean): void { const index = getSelectedIndex(); const input = (value instanceof BoundPlayerFactory) ? @@ -262,7 +262,7 @@ function booleanOrNull(value: any): boolean|null { * * @codeGenApi */ -export function ΔstyleMap(styles: {[styleName: string]: any} | NO_CHANGE | null): void { +export function ɵɵstyleMap(styles: {[styleName: string]: any} | NO_CHANGE | null): void { const index = getSelectedIndex(); const lView = getLView(); const stylingContext = getStylingContext(index, lView); @@ -306,7 +306,7 @@ export function ΔstyleMap(styles: {[styleName: string]: any} | NO_CHANGE | null * * @codeGenApi */ -export function ΔclassMap(classes: {[styleName: string]: any} | NO_CHANGE | string | null): void { +export function ɵɵclassMap(classes: {[styleName: string]: any} | NO_CHANGE | string | null): void { const index = getSelectedIndex(); const lView = getLView(); const stylingContext = getStylingContext(index, lView); @@ -339,7 +339,7 @@ export function ΔclassMap(classes: {[styleName: string]: any} | NO_CHANGE | str * * @codeGenApi */ -export function ΔstylingApply(): void { +export function ɵɵstylingApply(): void { const index = getSelectedIndex(); const directiveStylingIndex = getActiveDirectiveStylingIndex() || DEFAULT_TEMPLATE_DIRECTIVE_INDEX; 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 04816932f2..5817ec267e 100644 --- a/packages/core/src/render3/interfaces/definition.ts +++ b/packages/core/src/render3/interfaces/definition.ts @@ -89,7 +89,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; @@ -104,7 +104,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 @@ -157,7 +157,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; @@ -203,7 +203,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; @@ -356,7 +356,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 c246c12672..7dcb88d3a5 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 {Δinject} from '../../di/injector_compatibility'; -import {ΔdefineInjectable, ΔdefineInjector} from '../../di/interface/defs'; +import {ɵɵinject} from '../../di/injector_compatibility'; +import {ɵɵdefineInjectable, ɵɵdefineInjector} from '../../di/interface/defs'; import * as sanitization from '../../sanitization/sanitization'; import * as r3 from '../index'; @@ -20,124 +20,124 @@ import * as r3 from '../index'; */ 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, - 'Δproperty': r3.Δproperty, - 'ΔpropertyInterpolate': r3.ΔpropertyInterpolate, - 'ΔpropertyInterpolate1': r3.ΔpropertyInterpolate1, - 'ΔpropertyInterpolate2': r3.ΔpropertyInterpolate2, - 'ΔpropertyInterpolate3': r3.ΔpropertyInterpolate3, - 'ΔpropertyInterpolate4': r3.ΔpropertyInterpolate4, - 'ΔpropertyInterpolate5': r3.ΔpropertyInterpolate5, - 'ΔpropertyInterpolate6': r3.ΔpropertyInterpolate6, - 'ΔpropertyInterpolate7': r3.ΔpropertyInterpolate7, - 'ΔpropertyInterpolate8': r3.ΔpropertyInterpolate8, - 'ΔpropertyInterpolateV': r3.ΔpropertyInterpolateV, - 'Δ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, - 'ΔclassMap': r3.ΔclassMap, - 'Δstyling': r3.Δstyling, - 'ΔstyleMap': r3.ΔstyleMap, - 'ΔstyleProp': r3.ΔstyleProp, - 'ΔstylingApply': r3.ΔstylingApply, - 'ΔclassProp': r3.ΔclassProp, - 'Δ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, + 'ɵɵproperty': r3.ɵɵproperty, + 'ɵɵpropertyInterpolate': r3.ɵɵpropertyInterpolate, + 'ɵɵpropertyInterpolate1': r3.ɵɵpropertyInterpolate1, + 'ɵɵpropertyInterpolate2': r3.ɵɵpropertyInterpolate2, + 'ɵɵpropertyInterpolate3': r3.ɵɵpropertyInterpolate3, + 'ɵɵpropertyInterpolate4': r3.ɵɵpropertyInterpolate4, + 'ɵɵpropertyInterpolate5': r3.ɵɵpropertyInterpolate5, + 'ɵɵpropertyInterpolate6': r3.ɵɵpropertyInterpolate6, + 'ɵɵpropertyInterpolate7': r3.ɵɵpropertyInterpolate7, + 'ɵɵpropertyInterpolate8': r3.ɵɵpropertyInterpolate8, + 'ɵɵpropertyInterpolateV': r3.ɵɵpropertyInterpolateV, + 'ɵɵ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, + 'ɵɵclassMap': r3.ɵɵclassMap, + 'ɵɵstyling': r3.ɵɵstyling, + 'ɵɵstyleMap': r3.ɵɵstyleMap, + 'ɵɵstyleProp': r3.ɵɵstyleProp, + 'ɵɵstylingApply': r3.ɵɵstylingApply, + 'ɵɵclassProp': r3.ɵɵclassProp, + 'ɵɵ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 7f1967f5a9..82d5572526 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'; @@ -391,7 +391,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(); @@ -413,10 +413,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) { @@ -434,7 +434,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(); @@ -454,10 +454,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); } /** @@ -472,7 +472,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 { @@ -503,11 +503,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) { @@ -519,7 +519,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 647446ae32..6d409d0b83 100644 --- a/packages/core/src/render3/state.ts +++ b/packages/core/src/render3/state.ts @@ -83,17 +83,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; } @@ -106,17 +106,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; } @@ -291,7 +291,7 @@ export function getActiveDirectiveSuperClassDepth() { * * @codeGenApi */ -export function ΔrestoreView(viewToRestore: OpaqueViewState) { +export function ɵɵrestoreView(viewToRestore: OpaqueViewState) { contextLView = viewToRestore as any as LView; } @@ -516,7 +516,7 @@ let _currentNamespace: string|null = null; * * @codeGenApi */ -export function ΔnamespaceSVG() { +export function ɵɵnamespaceSVG() { _currentNamespace = 'http://www.w3.org/2000/svg'; } @@ -525,7 +525,7 @@ export function ΔnamespaceSVG() { * * @codeGenApi */ -export function ΔnamespaceMathML() { +export function ɵɵnamespaceMathML() { _currentNamespace = 'http://www.w3.org/1998/MathML/'; } @@ -535,7 +535,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 2deedccd18..cf45c6f6c4 100644 --- a/packages/core/src/render3/util/misc_utils.ts +++ b/packages/core/src/render3/util/misc_utils.ts @@ -57,7 +57,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}; } @@ -65,7 +65,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}; } @@ -73,7 +73,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 85150b3af1..1d05760c6d 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,14 +183,14 @@ 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' || prop === 'clip-path'; } - 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 5ad60881d7..6d064e91af 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} from '../di/injector'; import {INJECTOR, 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 55fb136989..8c705f378e 100644 --- a/packages/core/src/view/services.ts +++ b/packages/core/src/view/services.ts @@ -9,7 +9,7 @@ import {DebugElement__PRE_R3__, DebugEventListener, DebugNode__PRE_R3__, 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 94c5b7ccc8..a9e77d9110 100644 --- a/packages/core/test/bundling/cyclic_import/bundle.golden_symbols.json +++ b/packages/core/test/bundling/cyclic_import/bundle.golden_symbols.json @@ -732,33 +732,33 @@ "name": "viewAttachedToChangeDetector" }, { - "name": "ΔdefineComponent" + "name": "ɵɵdefineComponent" }, { - "name": "ΔdefineInjectable" + "name": "ɵɵdefineInjectable" }, { - "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 414f37283c..7e4eba0c56 100644 --- a/packages/core/test/bundling/hello_world/bundle.golden_symbols.json +++ b/packages/core/test/bundling/hello_world/bundle.golden_symbols.json @@ -498,15 +498,15 @@ "name": "viewAttachedToChangeDetector" }, { - "name": "ΔdefineComponent" + "name": "ɵɵdefineComponent" }, { - "name": "ΔdefineInjectable" + "name": "ɵɵdefineInjectable" }, { - "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 50cbf4564b..817c2a8d75 100644 --- a/packages/core/test/bundling/injection/bundle.golden_symbols.json +++ b/packages/core/test/bundling/injection/bundle.golden_symbols.json @@ -201,12 +201,12 @@ "name": "throwMixedMultiProviderError" }, { - "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 be0d39505d..8b49e0c126 100644 --- a/packages/core/test/bundling/todo/bundle.golden_symbols.json +++ b/packages/core/test/bundling/todo/bundle.golden_symbols.json @@ -1506,72 +1506,72 @@ "name": "wrapListener" }, { - "name": "Δbind" + "name": "ɵɵbind" }, { - "name": "ΔclassProp" + "name": "ɵɵclassProp" }, { - "name": "ΔdefineComponent" + "name": "ɵɵdefineComponent" }, { - "name": "ΔdefineDirective" + "name": "ɵɵdefineDirective" }, { - "name": "ΔdefineInjectable" + "name": "ɵɵdefineInjectable" }, { - "name": "ΔdirectiveInject" + "name": "ɵɵdirectiveInject" }, { - "name": "ΔelementEnd" + "name": "ɵɵelementEnd" }, { - "name": "ΔelementStart" + "name": "ɵɵelementStart" }, { - "name": "ΔgetCurrentView" + "name": "ɵɵgetCurrentView" }, { - "name": "Δinject" + "name": "ɵɵinject" }, { - "name": "Δinterpolation1" + "name": "ɵɵinterpolation1" }, { - "name": "Δlistener" + "name": "ɵɵlistener" }, { - "name": "ΔnamespaceHTML" + "name": "ɵɵnamespaceHTML" }, { - "name": "ΔnextContext" + "name": "ɵɵnextContext" }, { - "name": "Δproperty" + "name": "ɵɵproperty" }, { - "name": "Δreference" + "name": "ɵɵreference" }, { - "name": "ΔrestoreView" + "name": "ɵɵrestoreView" }, { - "name": "Δselect" + "name": "ɵɵselect" }, { - "name": "Δstyling" + "name": "ɵɵstyling" }, { - "name": "ΔstylingApply" + "name": "ɵɵstylingApply" }, { - "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 6017ee8bef..54ce976a3a 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'; @@ -1374,7 +1374,7 @@ function declareTests(config?: {useJit: boolean}) { } class Bar { - static ngInjectableDef: ΔInjectableDef = ΔdefineInjectable({ + static ngInjectableDef: ɵɵInjectableDef = ɵɵdefineInjectable({ factory: () => new Bar(), providedIn: SomeModule, }); @@ -1406,7 +1406,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 9660061dfc..52629da45b 100644 --- a/packages/core/test/render3/change_detection_spec.ts +++ b/packages/core/test/render3/change_detection_spec.ts @@ -10,8 +10,8 @@ import {withBody} from '@angular/private/testing'; import {ChangeDetectionStrategy, DoCheck} from '../../src/core'; import {whenRendered} from '../../src/render3/component'; -import {LifecycleHooksFeature, getRenderedText, ΔdefineComponent, ΔgetCurrentView} from '../../src/render3/index'; -import {detectChanges, markDirty, tick, Δbind, Δelement, ΔelementEnd, ΔelementProperty, ΔelementStart, Δinterpolation1, Δinterpolation2, Δlistener, Δtext, ΔtextBinding} from '../../src/render3/instructions/all'; +import {LifecycleHooksFeature, getRenderedText, ɵɵdefineComponent, ɵɵgetCurrentView} from '../../src/render3/index'; +import {detectChanges, markDirty, tick, ɵɵbind, ɵɵelement, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵinterpolation1, ɵɵinterpolation2, ɵɵlistener, ɵɵtext, ɵɵtextBinding} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; import {Renderer3, RendererFactory3} from '../../src/render3/interfaces/renderer'; import {FLAGS, LViewFlags} from '../../src/render3/interfaces/view'; @@ -25,7 +25,7 @@ describe('change detection', () => { doCheckCount = 0; ngDoCheck(): void { this.doCheckCount++; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComponent, selectors: [['my-comp']], factory: () => new MyComponent(), @@ -33,12 +33,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)); } } }); @@ -100,7 +100,7 @@ describe('change detection', () => { onClick() {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComponent, selectors: [['my-comp']], factory: () => comp = new MyComponent(), @@ -112,15 +112,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, @@ -138,7 +138,7 @@ describe('change detection', () => { onClick() {} - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ManualComponent, selectors: [['manual-comp']], factory: () => comp = new ManualComponent(), @@ -152,18 +152,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, @@ -174,7 +174,7 @@ describe('change detection', () => { class ManualApp { name: string = 'Nancy'; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ManualApp, selectors: [['manual-app']], factory: () => new ManualApp(), @@ -183,10 +183,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)); } }, @@ -229,7 +229,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(), @@ -238,11 +238,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], @@ -252,7 +252,7 @@ describe('change detection', () => { const MyButtonApp = createComponent('my-button-app', function(rf: RenderFlags) { if (rf & RenderFlags.Create) { - Δelement(0, 'button-parent'); + ɵɵelement(0, 'button-parent'); } }, 1, 0, [ButtonParent]); @@ -306,7 +306,7 @@ describe('change detection', () => { return 'works'; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: MyComponent, selectors: [['my-comp']], factory: () => new MyComponent(), @@ -314,10 +314,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_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 f173155635..fbd43b429e 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 {ViewEncapsulation, ΔdefineInjectable, ΔdefineInjector} from '../../src/core'; +import {ViewEncapsulation, ɵɵdefineInjectable, ɵɵdefineInjector} from '../../src/core'; import {createInjector} from '../../src/di/r3_injector'; -import {AttributeMarker, ComponentFactory, LifecycleHooksFeature, getRenderedText, markDirty, Δ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, ɵɵ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'; @@ -21,7 +21,7 @@ describe('component', () => { increment() { this.count++; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: CounterComponent, encapsulation: ViewEncapsulation.None, selectors: [['counter']], @@ -29,10 +29,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, @@ -64,30 +64,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')}] }); @@ -112,7 +112,7 @@ describe('component', () => { // @Input name = ''; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Comp, selectors: [['comp']], factory: () => new Comp(), @@ -120,10 +120,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'} @@ -134,10 +134,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]); @@ -156,16 +156,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, @@ -181,13 +181,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)); } } }); @@ -213,32 +214,32 @@ it('should not invoke renderer destroy method for embedded views', () => { 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']], @@ -246,16 +247,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, @@ -265,10 +266,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)); } } @@ -315,7 +316,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']], @@ -324,40 +325,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'} @@ -379,7 +380,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']], @@ -389,18 +390,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)); } }, @@ -410,23 +411,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)); } } @@ -459,19 +460,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]); @@ -493,19 +494,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]); @@ -524,7 +525,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']], diff --git a/packages/core/test/render3/content_spec.ts b/packages/core/test/render3/content_spec.ts index f241610077..49aa362f8f 100644 --- a/packages/core/test/render3/content_spec.ts +++ b/packages/core/test/render3/content_spec.ts @@ -9,7 +9,7 @@ import {SelectorFlags} from '@angular/core/src/render3/interfaces/projection'; import {AttributeMarker, detectChanges} from '../../src/render3/index'; -import {Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, Δelement, ΔelementContainerEnd, ΔelementContainerStart, ΔelementEnd, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, Δprojection, ΔprojectionDef, Δtext} from '../../src/render3/instructions/all'; +import {ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵelement, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵprojection, ɵɵprojectionDef, ɵɵtext} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; import {ComponentFixture, createComponent, getDirectiveOnNode, renderComponent, toHtml} from './render_util'; @@ -18,10 +18,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,26 +36,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]); @@ -75,8 +75,8 @@ describe('content projection', () => { /** */ const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δprojection(0); + ɵɵprojectionDef(); + ɵɵprojection(0); } }, 1); @@ -89,22 +89,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]); @@ -124,10 +124,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); @@ -144,31 +144,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]); @@ -196,25 +196,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); @@ -226,14 +226,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); @@ -261,31 +261,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); @@ -313,23 +313,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); @@ -338,12 +338,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]); @@ -367,27 +367,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); @@ -402,26 +402,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]); @@ -447,23 +447,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); @@ -478,27 +478,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]); @@ -506,13 +506,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); } @@ -541,25 +541,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); @@ -568,12 +568,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]); @@ -592,13 +592,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); @@ -607,9 +607,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]); @@ -638,24 +638,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); @@ -664,12 +664,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]); @@ -684,10 +684,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); @@ -703,26 +703,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]); @@ -742,10 +742,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); @@ -762,28 +762,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]); @@ -797,12 +797,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]); @@ -823,8 +823,8 @@ describe('content projection', () => { ``; const Child = createComponent('child', function(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - ΔprojectionDef(); - Δprojection(0); + ɵɵprojectionDef(); + ɵɵprojection(0); } }, 1); @@ -837,17 +837,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]); @@ -860,8 +860,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); @@ -870,10 +870,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]); @@ -886,17 +886,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]); @@ -913,13 +913,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); @@ -931,16 +931,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]); @@ -957,16 +957,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); @@ -978,16 +978,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]); @@ -1004,16 +1004,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); @@ -1025,16 +1025,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]); @@ -1051,13 +1051,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); @@ -1069,16 +1069,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]); @@ -1095,13 +1095,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); @@ -1113,17 +1113,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]); @@ -1140,13 +1140,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); @@ -1159,17 +1159,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]); @@ -1192,10 +1192,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); @@ -1207,15 +1207,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]); @@ -1228,13 +1228,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]); @@ -1253,10 +1253,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); @@ -1268,15 +1268,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]); @@ -1287,9 +1287,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]); @@ -1306,8 +1306,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); @@ -1319,16 +1319,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]); 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 6d10532cc8..7ad45750f1 100644 --- a/packages/core/test/render3/di_spec.ts +++ b/packages/core/test/render3/di_spec.ts @@ -10,9 +10,9 @@ import {ChangeDetectorRef, Host, InjectFlags, Injector, Optional, Renderer2, Sel import {createLView, createNodeAtIndex, createTView} from '@angular/core/src/render3/instructions/shared'; import {RenderFlags} from '@angular/core/src/render3/interfaces/definition'; -import {ΔdefineComponent} from '../../src/render3/definition'; +import {ɵɵdefineComponent} from '../../src/render3/definition'; import {bloomAdd, bloomHasToken, bloomHashBitOrFactory as bloomHash, getOrCreateNodeInjectorForNode} from '../../src/render3/di'; -import {Δbind, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, ΔdefineDirective, ΔdirectiveInject, Δelement, ΔelementEnd, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, Δinterpolation2, Δprojection, ΔprojectionDef, Δreference, Δtext, ΔtextBinding} from '../../src/render3/index'; +import {ɵɵbind, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵdefineDirective, ɵɵdirectiveInject, ɵɵelement, ɵɵelementEnd, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵinterpolation2, ɵɵprojection, ɵɵprojectionDef, ɵɵreference, ɵɵtext, ɵɵtextBinding} from '../../src/render3/index'; import {TNODE} from '../../src/render3/interfaces/injector'; import {TNodeType} from '../../src/render3/interfaces/node'; import {isProceduralRenderer} from '../../src/render3/interfaces/renderer'; @@ -31,7 +31,7 @@ describe('di', () => { value = 'DirB'; constructor() { log.push(this.value); } - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ selectors: [['', 'dirB', '']], type: DirB, factory: () => new DirB(), @@ -49,10 +49,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)) }); } @@ -63,19 +63,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]); @@ -92,11 +92,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'] }); } @@ -117,45 +117,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]); @@ -170,7 +170,7 @@ describe('di', () => { // TODO(issue/24571): remove '!'. value !: string; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DirB, selectors: [['', 'dirB', '']], factory: () => new DirB(), @@ -184,10 +184,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)) }); } @@ -198,7 +198,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]); @@ -213,10 +213,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)) }); } @@ -229,9 +229,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]); @@ -250,10 +250,10 @@ 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)) }); } @@ -271,27 +271,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); @@ -318,16 +318,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); } } }); @@ -338,10 +338,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'] }); } @@ -349,11 +349,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)) }); } @@ -370,10 +370,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, /** @@ -383,26 +383,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 @@ -424,15 +424,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'); } } }); @@ -448,7 +448,7 @@ describe('di', () => { () => { expect(() => new ComponentFixture(MyComp)).toThrow(); }); }); - describe('Δinject', () => { + describe('ɵɵinject', () => { describe('bloom filter', () => { let mockTView: any; beforeEach(() => { @@ -535,10 +535,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'] }); } @@ -546,11 +546,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'] }); } @@ -566,29 +566,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/exports_spec.ts b/packages/core/test/render3/exports_spec.ts index 461eb685d2..4a1fd89b1d 100644 --- a/packages/core/test/render3/exports_spec.ts +++ b/packages/core/test/render3/exports_spec.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {Δbind, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, Δelement, ΔelementEnd, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, Δreference, Δtext, ΔtextBinding} from '../../src/render3/instructions/all'; +import {ɵɵbind, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵelement, ɵɵelementEnd, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵreference, ɵɵtext, ɵɵtextBinding} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; import {ComponentFixture, createComponent} from './render_util'; @@ -23,29 +23,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); diff --git a/packages/core/test/render3/i18n_spec.ts b/packages/core/test/render3/i18n_spec.ts index 1f21500068..10df144f31 100644 --- a/packages/core/test/render3/i18n_spec.ts +++ b/packages/core/test/render3/i18n_spec.ts @@ -7,8 +7,8 @@ */ import {noop} from '../../../compiler/src/render3/view/util'; -import {getTranslationForTemplate, Δi18nAttributes, Δi18nPostprocess, Δi18nStart} from '../../src/render3/i18n'; -import {ΔelementEnd, ΔelementStart} from '../../src/render3/instructions/all'; +import {getTranslationForTemplate, ɵɵi18nAttributes, ɵɵi18nPostprocess, ɵɵi18nStart} from '../../src/render3/i18n'; +import {ɵɵelementEnd, ɵɵelementStart} from '../../src/render3/instructions/all'; import {COMMENT_MARKER, ELEMENT_MARKER, I18nMutateOpCode, I18nUpdateOpCode, I18nUpdateOpCodes, TI18n} from '../../src/render3/interfaces/i18n'; import {HEADER_OFFSET, LView, TVIEW} from '../../src/render3/interfaces/view'; import {getNativeByIndex} from '../../src/render3/util/view_utils'; @@ -68,7 +68,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 const debugOps = (opCodes as any).create.debug !.operations; @@ -99,7 +99,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, @@ -135,7 +135,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�!'} @@ -160,7 +160,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, @@ -193,7 +193,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, @@ -223,7 +223,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, @@ -250,7 +250,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, @@ -275,7 +275,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; @@ -463,7 +463,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; @@ -579,9 +579,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; @@ -598,7 +598,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 @@ -615,7 +615,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 @@ -631,7 +631,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 @@ -724,7 +724,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); }); }); @@ -776,7 +776,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', () => { @@ -794,7 +794,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/instructions_spec.ts b/packages/core/test/render3/instructions_spec.ts index 90ec5eb979..cc75beec31 100644 --- a/packages/core/test/render3/instructions_spec.ts +++ b/packages/core/test/render3/instructions_spec.ts @@ -8,11 +8,11 @@ import {NgForOfContext} from '@angular/common'; -import {ΔdefineComponent} from '../../src/render3/definition'; -import {RenderFlags, Δbind, ΔclassMap, Δelement, ΔelementAttribute, ΔelementEnd, ΔelementProperty, ΔelementStart, Δinterpolation1, Δproperty, Δselect, ΔstyleMap, ΔstyleProp, Δstyling, ΔstylingApply, Δtemplate, Δtext, ΔtextBinding} from '../../src/render3/index'; +import {ɵɵdefineComponent} from '../../src/render3/definition'; +import {RenderFlags, ɵɵbind, ɵɵclassMap, ɵɵelement, ɵɵelementAttribute, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵinterpolation1, ɵɵproperty, ɵɵselect, ɵɵstyleMap, ɵɵstyleProp, ɵɵstyling, ɵɵstylingApply, ɵɵ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'; @@ -21,9 +21,9 @@ import {ComponentFixture, TemplateFixture} from './render_util'; describe('instructions', () => { function createAnchor() { - ΔelementStart(0, 'a'); - Δstyling(); - ΔelementEnd(); + ɵɵelementStart(0, 'a'); + ɵɵstyling(); + ɵɵelementEnd(); } function createDiv( @@ -37,20 +37,20 @@ describe('instructions', () => { if (initialStyles) { attrs.push(AttributeMarker.Styles, ...initialStyles); } - ΔelementStart(0, 'div', attrs); - Δstyling(classBindingNames || null, styleBindingNames || null, styleSanitizer); - ΔelementEnd(); + ɵɵelementStart(0, 'div', attrs); + ɵɵstyling(classBindingNames || null, styleBindingNames || null, styleSanitizer); + ɵɵelementEnd(); } - function createScript() { Δelement(0, 'script'); } + function createScript() { ɵɵelement(0, 'script'); } - 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(); }); }); @@ -58,10 +58,10 @@ describe('instructions', () => { it('should update bindings when value changes with the correct perf counters', () => { 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, @@ -74,7 +74,7 @@ describe('instructions', () => { it('should not update bindings when value does not change, with the correct perf counters', () => { - const idempotentUpdate = () => ΔelementProperty(0, 'title', Δbind('Hello')); + const idempotentUpdate = () => ɵɵelementProperty(0, 'title', ɵɵbind('Hello')); const t = new TemplateFixture(createAnchor, idempotentUpdate, 1, 1); t.update(); @@ -95,7 +95,7 @@ describe('instructions', () => { describe('element', () => { it('should create an element with the correct perf counters', () => { 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') !; @@ -114,12 +114,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, @@ -141,13 +141,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({ @@ -159,13 +159,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(); }); @@ -174,20 +174,20 @@ describe('instructions', () => { describe('styleProp', () => { 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(() => { - Δselect(0); - ΔstyleProp(0, 'url("http://server")'); - ΔstylingApply(); + ɵɵselect(0); + ɵɵstyleProp(0, 'url("http://server")'); + ɵɵstylingApply(); }); // nothing is set because sanitizer suppresses it. expect(t.html).toEqual('
'); t.update(() => { - Δselect(0); - ΔstyleProp(0, bypassSanitizationTrustStyle('url("http://server2")')); - ΔstylingApply(); + ɵɵselect(0); + ɵɵstyleProp(0, bypassSanitizationTrustStyle('url("http://server2")')); + ɵɵstylingApply(); }); expect((t.hostElement.firstChild as HTMLElement).style.getPropertyValue('background-image')) .toEqual('url("http://server2")'); @@ -201,18 +201,18 @@ describe('instructions', () => { 1, sanitizerInterceptor); t.update(() => { - Δselect(0); - ΔstyleProp(0, bypassSanitizationTrustStyle('apple')); - ΔstylingApply(); + ɵɵselect(0); + ɵɵstyleProp(0, bypassSanitizationTrustStyle('apple')); + ɵɵstylingApply(); }); expect(sanitizerInterceptor.lastValue !).toEqual('apple'); sanitizerInterceptor.lastValue = null; t.update(() => { - Δselect(0); - ΔstyleProp(0, bypassSanitizationTrustStyle('apple')); - ΔstylingApply(); + ɵɵselect(0); + ɵɵstyleProp(0, bypassSanitizationTrustStyle('apple')); + ɵɵstylingApply(); }); expect(sanitizerInterceptor.lastValue).toEqual(null); }); @@ -220,17 +220,17 @@ describe('instructions', () => { describe('styleMap', () => { function createDivWithStyle() { - ΔelementStart(0, 'div', [AttributeMarker.Styles, 'height', '10px']); - Δstyling([], ['height']); - ΔelementEnd(); + ɵɵelementStart(0, 'div', [AttributeMarker.Styles, 'height', '10px']); + ɵɵstyling([], ['height']); + ɵɵelementEnd(); } it('should add style', () => { const fixture = new TemplateFixture(createDivWithStyle, () => {}, 1); fixture.update(() => { - Δselect(0); - ΔstyleMap({'background-color': 'red'}); - ΔstylingApply(); + ɵɵselect(0); + ɵɵstyleMap({'background-color': 'red'}); + ɵɵstylingApply(); }); expect(fixture.html).toEqual('
'); }); @@ -244,8 +244,8 @@ describe('instructions', () => { sanitizerInterceptor); fixture.update(() => { - Δselect(0); - ΔstyleMap({ + ɵɵselect(0); + ɵɵstyleMap({ 'background-image': 'background-image', 'background': 'background', 'border-image': 'border-image', @@ -254,7 +254,7 @@ describe('instructions', () => { 'filter': 'filter', 'width': 'width' }); - ΔstylingApply(); + ɵɵstylingApply(); }); const props = detectedValues.sort(); @@ -266,17 +266,17 @@ describe('instructions', () => { describe('elementClass', () => { function createDivWithStyling() { - ΔelementStart(0, 'div'); - Δstyling(); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵstyling(); + ɵɵelementEnd(); } it('should add class', () => { const fixture = new TemplateFixture(createDivWithStyling, () => {}, 1); fixture.update(() => { - Δselect(0); - ΔclassMap('multiple classes'); - ΔstylingApply(); + ɵɵselect(0); + ɵɵclassMap('multiple classes'); + ɵɵstylingApply(); }); expect(fixture.html).toEqual('
'); }); @@ -289,26 +289,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, '')); } } @@ -320,7 +320,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(); }, @@ -328,10 +328,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] @@ -353,7 +353,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); }); @@ -364,7 +364,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(); }); @@ -375,7 +375,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(); }); @@ -386,7 +386,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); }); @@ -397,7 +397,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(); }); @@ -408,7 +408,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(); }); @@ -419,7 +419,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); }); @@ -430,7 +430,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(); }); @@ -441,7 +441,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(); }); @@ -452,7 +452,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); }); @@ -463,7 +463,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(); }); @@ -474,7 +474,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(); }); @@ -485,7 +485,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); }); @@ -496,7 +496,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(); }); @@ -507,7 +507,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(); }); @@ -552,7 +552,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 6994ec97bf..0674229a90 100644 --- a/packages/core/test/render3/integration_spec.ts +++ b/packages/core/test/render3/integration_spec.ts @@ -8,14 +8,14 @@ import {RendererType2} from '../../src/render/api'; import {getLContext} from '../../src/render3/context_discovery'; -import {AttributeMarker, ΔdefineComponent, ΔdefineDirective} from '../../src/render3/index'; -import {ΔallocHostVars, Δbind, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, Δelement, ΔelementAttribute, ΔelementEnd, ΔelementProperty, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, Δprojection, ΔprojectionDef, Δselect, Δstyling, ΔstylingApply, Δtemplate, Δtext, ΔtextBinding} from '../../src/render3/instructions/all'; +import {AttributeMarker, ɵɵdefineComponent, ɵɵdefineDirective} from '../../src/render3/index'; +import {ɵɵallocHostVars, ɵɵbind, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵelement, ɵɵelementAttribute, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵprojection, ɵɵprojectionDef, ɵɵselect, ɵɵstyling, ɵɵstylingApply, ɵɵ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 {ΔsanitizeUrl} from '../../src/sanitization/sanitization'; +import {ɵɵsanitizeUrl} from '../../src/sanitization/sanitization'; import {Sanitizer, SecurityContext} from '../../src/sanitization/security'; import {NgIf} from './common_with_def'; @@ -28,8 +28,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'); @@ -59,56 +59,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(); } } @@ -117,7 +117,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, @@ -125,26 +125,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, @@ -154,20 +154,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(); } } @@ -199,7 +199,7 @@ describe('render3 integration test', () => { 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, @@ -209,7 +209,7 @@ describe('component styles', () => { factory: () => new StyledComp(), template: (rf: RenderFlags, ctx: StyledComp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div'); + ɵɵelement(0, 'div'); } } }); @@ -227,7 +227,7 @@ describe('component animations', () => { const animB = {name: 'b'}; class AnimComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: AnimComp, consts: 0, vars: 0, @@ -254,7 +254,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, @@ -274,7 +274,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, @@ -282,10 +282,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)); } } }); @@ -310,7 +310,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, @@ -318,7 +318,7 @@ describe('component animations', () => { factory: () => new AnimComp(), template: (rf: RenderFlags, ctx: AnimComp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'div', ['@fooAnimation', '']); + ɵɵelement(0, 'div', ['@fooAnimation', '']); } } }); @@ -337,13 +337,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); } }, }); @@ -352,7 +352,7 @@ describe('component animations', () => { } class ParentComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ParentComp, consts: 1, vars: 1, @@ -360,7 +360,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] @@ -382,7 +382,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(), @@ -390,10 +390,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) { } @@ -414,7 +414,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(), @@ -422,16 +422,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], @@ -440,10 +440,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(); } } }); @@ -464,7 +464,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], @@ -473,19 +473,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); } } }); @@ -512,7 +512,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], @@ -521,8 +521,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'); } } }); @@ -550,7 +550,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(), @@ -558,7 +558,7 @@ describe('element discovery', () => { vars: 0, template: (rf: RenderFlags, ctx: StructuredComp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'section'); + ɵɵelement(0, 'section'); } } }); @@ -582,7 +582,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(), @@ -590,9 +590,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(); } } }); @@ -615,7 +615,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(), @@ -623,13 +623,13 @@ describe('element discovery', () => { vars: 0, template: (rf: RenderFlags, ctx: StructuredComp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'section'); - Δstyling(['class-foo']); - ΔelementEnd(); + ɵɵelementStart(0, 'section'); + ɵɵstyling(['class-foo']); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - Δselect(0); - ΔstylingApply(); + ɵɵselect(0); + ɵɵstylingApply(); } } }); @@ -670,7 +670,7 @@ describe('element discovery', () => { */ class ProjectorComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ProjectorComp, selectors: [['projector-comp']], factory: () => new ProjectorComp(), @@ -678,13 +678,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) { } @@ -693,7 +693,7 @@ describe('element discovery', () => { } class ParentComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ParentComp, selectors: [['parent-comp']], directives: [ProjectorComp], @@ -702,14 +702,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(); } } }); @@ -767,7 +767,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(), @@ -775,7 +775,7 @@ describe('element discovery', () => { vars: 0, template: (rf: RenderFlags, ctx: StructuredComp) => { if (rf & RenderFlags.Create) { - Δelement(0, 'section'); + ɵɵelement(0, 'section'); } } }); @@ -794,7 +794,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(), @@ -833,7 +833,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() @@ -841,7 +841,7 @@ describe('element discovery', () => { } class MyDir2 { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: MyDir2, selectors: [['', 'my-dir-2', '']], factory: () => myDir2Instance = new MyDir2() @@ -849,7 +849,7 @@ describe('element discovery', () => { } class MyDir3 { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: MyDir3, selectors: [['', 'my-dir-3', '']], factory: () => myDir3Instance = new MyDir2() @@ -857,7 +857,7 @@ describe('element discovery', () => { } class StructuredComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: StructuredComp, selectors: [['structured-comp']], directives: [MyDir1, MyDir2, MyDir3], @@ -866,8 +866,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']); } } }); @@ -922,7 +922,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() @@ -930,7 +930,7 @@ describe('element discovery', () => { } class MyDir2 { - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: MyDir2, selectors: [['', 'my-dir-2', '']], factory: () => myDir2Instance = new MyDir2() @@ -938,7 +938,7 @@ describe('element discovery', () => { } class ChildComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: ChildComp, selectors: [['child-comp']], factory: () => childComponentInstance = new ChildComp(), @@ -946,14 +946,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], @@ -962,7 +962,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', '']); } } }); @@ -1015,7 +1015,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(), @@ -1023,16 +1023,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], @@ -1041,10 +1041,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(); } } }); @@ -1076,7 +1076,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(), @@ -1084,10 +1084,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); } } }); @@ -1118,23 +1118,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(), @@ -1142,7 +1142,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 c58d0fa88d..6fb5771030 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 b0883302c2..2c69104aad 100644 --- a/packages/core/test/render3/lifecycle_spec.ts +++ b/packages/core/test/render3/lifecycle_spec.ts @@ -7,8 +7,8 @@ */ import {OnDestroy} from '../../src/core'; -import {AttributeMarker, ComponentTemplate, ΔNgOnChangesFeature, ΔdefineComponent, ΔdefineDirective} from '../../src/render3/index'; -import {Δbind, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, Δelement, ΔelementEnd, ΔelementProperty, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, Δprojection, ΔprojectionDef, Δselect, Δtemplate, Δtext} from '../../src/render3/instructions/all'; +import {AttributeMarker, ComponentTemplate, ɵɵNgOnChangesFeature, ɵɵdefineComponent, ɵɵdefineDirective} from '../../src/render3/index'; +import {ɵɵbind, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵelement, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵ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) => { 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) => { 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()}); } @@ -86,20 +86,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); 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 efc1c8605f..58607ea713 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 {Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, ΔelementEnd, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, Δlistener, Δtext} from '../../src/render3/instructions/all'; +import {ɵɵdefineComponent, ɵɵdefineDirective} from '../../src/render3/index'; +import {ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵelementEnd, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵlistener, ɵɵtext} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; import {renderToHtml} from './render_util'; @@ -21,7 +21,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) {}, @@ -37,7 +37,7 @@ describe('outputs', () => { class OtherDir { changeStream = new EventEmitter(); - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: OtherDir, selectors: [['', 'otherDir', '']], factory: () => otherDir = new OtherDir, @@ -60,39 +60,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 44f0464af3..e91dadd74a 100644 --- a/packages/core/test/render3/pipe_spec.ts +++ b/packages/core/test/render3/pipe_spec.ts @@ -6,11 +6,11 @@ * found in the LICENSE file at https://angular.io/license */ -import {Directive as _Directive, Pipe as _Pipe, PipeTransform, WrappedValue, ΔdefinePipe} from '@angular/core'; +import {Directive as _Directive, Pipe as _Pipe, PipeTransform, WrappedValue, ɵɵdefinePipe} from '@angular/core'; import {expect} from '@angular/platform-browser/testing/src/matchers'; -import {Δinterpolation1, Δtext, ΔtextBinding} from '../../src/render3/instructions/all'; -import {Δpipe, ΔpipeBind1} from '../../src/render3/pipe'; +import {ɵɵinterpolation1, ɵɵtext, ɵɵtextBinding} from '../../src/render3/instructions/all'; +import {ɵɵpipe, ɵɵpipeBind1} from '../../src/render3/pipe'; import {TemplateFixture} from './render_util'; @@ -29,7 +29,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(); }, @@ -38,11 +38,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 = 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 f8a99c225a..42f7a17476 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 {ΔdefineComponent} from '../../src/render3/index'; -import {Δbind, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, ΔelementEnd, ΔelementProperty, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart} from '../../src/render3/instructions/all'; +import {ɵɵdefineComponent} from '../../src/render3/index'; +import {ɵɵbind, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵelementEnd, ɵɵelementProperty, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; -import {ΔpureFunction2} from '../../src/render3/pure_function'; +import {ɵɵpureFunction2} from '../../src/render3/pure_function'; import {getDirectiveOnNode, renderToHtml} from '../../test/render3/render_util'; @@ -19,7 +19,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(); }, @@ -45,27 +45,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 0ee0ff8859..bc54502ab9 100644 --- a/packages/core/test/render3/query_spec.ts +++ b/packages/core/test/render3/query_spec.ts @@ -9,13 +9,13 @@ import {ElementRef, QueryList, TemplateRef, ViewContainerRef} from '@angular/core'; import {EventEmitter} from '../..'; -import {AttributeMarker, detectChanges, ΔProvidersFeature, ΔdefineComponent, ΔdefineDirective} from '../../src/render3/index'; -import {Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, ΔdirectiveInject, Δelement, ΔelementContainerEnd, ΔelementContainerStart, ΔelementEnd, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, Δload, Δtemplate, Δtext} from '../../src/render3/instructions/all'; +import {AttributeMarker, detectChanges, ɵɵProvidersFeature, ɵɵdefineComponent, ɵɵdefineDirective} from '../../src/render3/index'; +import {ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵdirectiveInject, ɵɵelement, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵload, ɵɵ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 {ComponentFixture, TemplateFixture, createComponent, createDirective, getDirectiveOnNode, renderComponent} from './render_util'; @@ -68,9 +68,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); @@ -80,14 +80,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); } }); @@ -113,18 +113,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); } }); @@ -150,19 +150,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); } }); @@ -186,17 +186,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); } }); @@ -217,13 +217,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}])], }); } @@ -245,7 +245,7 @@ describe('query', () => { service?: Service; alias?: Alias; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: App, selectors: [['app']], consts: 1, @@ -253,21 +253,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] @@ -291,7 +292,7 @@ describe('query', () => { class App { service?: Service; - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: App, selectors: [['app']], consts: 1, @@ -299,16 +300,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] @@ -337,19 +339,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); } }); @@ -375,22 +377,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); } }); @@ -422,21 +424,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); } }); @@ -462,19 +464,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); } }); @@ -499,19 +501,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); } }); @@ -535,19 +537,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); } }); @@ -597,25 +599,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); } }); @@ -638,17 +640,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); } }); @@ -670,17 +672,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); } }); @@ -703,18 +705,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); } }); @@ -738,17 +740,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); } }); @@ -771,17 +773,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); } }); @@ -806,7 +808,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); @@ -815,11 +817,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); } }); @@ -834,7 +836,7 @@ describe('query', () => { let childInstance: Child; class Child { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Child, selectors: [['child']], factory: () => childInstance = new Child(), @@ -855,17 +857,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); } }); @@ -891,7 +893,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); @@ -900,11 +902,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); } }); @@ -930,7 +932,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) { @@ -941,11 +943,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); } }); @@ -972,7 +974,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); @@ -981,14 +983,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); } }); @@ -1018,18 +1020,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); } }); @@ -1054,7 +1056,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) { @@ -1064,11 +1066,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); } }); @@ -1093,17 +1095,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); } }); @@ -1127,17 +1129,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); } }); @@ -1161,17 +1163,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); } }); @@ -1192,17 +1194,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); } }); @@ -1225,17 +1227,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); } }); @@ -1259,17 +1261,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); } }); @@ -1282,9 +1284,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(); } } /** @@ -1300,28 +1302,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); } }); @@ -1360,33 +1362,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); } }); @@ -1422,37 +1424,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); } }); @@ -1493,43 +1495,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); } }); @@ -1567,50 +1569,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); } }); @@ -1652,38 +1654,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); } }); @@ -1722,37 +1724,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(); } /** @@ -1779,18 +1781,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'); } } @@ -1802,19 +1804,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); } }); @@ -1840,17 +1842,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); } } }); @@ -1864,9 +1866,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]); @@ -1895,23 +1897,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]); @@ -1937,7 +1939,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]); @@ -1961,20 +1963,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); } }); @@ -2002,20 +2004,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); } }); @@ -2028,7 +2030,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'], @@ -2037,11 +2039,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); } } }); @@ -2063,19 +2065,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]); @@ -2092,7 +2094,7 @@ describe('query', () => { class QueryDirective { fooBars: any; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: QueryDirective, selectors: [['', 'query', '']], exportAs: ['query'], @@ -2101,11 +2103,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); } } }); @@ -2122,17 +2124,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]); @@ -2148,7 +2150,7 @@ describe('query', () => { class QueryDirective { fooBars: any; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: QueryDirective, selectors: [['', 'query', '']], exportAs: ['query'], @@ -2157,11 +2159,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); } } }); @@ -2178,17 +2180,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]); @@ -2208,7 +2210,7 @@ describe('query', () => { () => { class ShallowQueryDirective { foos: any; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: ShallowQueryDirective, selectors: [['', 'shallow-query', '']], exportAs: ['shallow-query'], @@ -2217,11 +2219,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); } } }); @@ -2229,7 +2231,7 @@ describe('query', () => { class DeepQueryDirective { foos: any; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: DeepQueryDirective, selectors: [['', 'deep-query', '']], exportAs: ['deep-query'], @@ -2238,11 +2240,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); } } }); @@ -2263,20 +2265,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]); @@ -2291,7 +2293,7 @@ describe('query', () => { class TextDirective { value !: string; - static ngDirectiveDef = ΔdefineDirective({ + static ngDirectiveDef = ɵɵdefineDirective({ type: TextDirective, selectors: [['', 'text', '']], factory: () => new TextDirective(), @@ -2306,7 +2308,7 @@ describe('query', () => { // @ContentChildren(TextDirective) texts !: QueryList; - static ngComponentDef = ΔdefineDirective({ + static ngComponentDef = ɵɵdefineDirective({ type: ContentQueryDirective, selectors: [['', 'content-query', '']], factory: () => contentQueryDirective = new ContentQueryDirective(), @@ -2314,11 +2316,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); } } }); @@ -2339,17 +2341,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]); @@ -2374,19 +2376,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, @@ -2394,10 +2396,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 37c836b80a..51e8d418d5 100644 --- a/packages/core/test/render3/render_util.ts +++ b/packages/core/test/render3/render_util.ts @@ -28,7 +28,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 {ComponentDef, ComponentTemplate, ComponentType, DirectiveDef, DirectiveType, RenderFlags, renderComponent as _renderComponent, tick, ΔProvidersFeature, ΔdefineComponent, ΔdefineDirective} from '../../src/render3/index'; +import {ComponentDef, ComponentTemplate, ComponentType, DirectiveDef, DirectiveType, RenderFlags, renderComponent as _renderComponent, tick, ɵɵProvidersFeature, ɵɵdefineComponent, ɵɵdefineDirective} from '../../src/render3/index'; import {DirectiveDefList, DirectiveDefListOrFactory, DirectiveTypesOrFactory, HostBindingsFunction, PipeDef, PipeDefList, PipeDefListOrFactory, 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'; @@ -258,7 +258,7 @@ export function renderTemplate( LViewFlags.CheckAlways | LViewFlags.IsRoot, null, null, providedRendererFactory, renderer); enterView(hostLView, null); // SUSPECT! why do we need to enter the View? - const def: ComponentDef = ΔdefineComponent({ + const def: ComponentDef = ɵɵdefineComponent({ factory: () => null, selectors: [], type: Object, @@ -367,7 +367,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, @@ -378,7 +378,7 @@ export function createComponent( directives: directives, hostBindings, pipes: pipes, features: (providers.length > 0 || viewProviders.length > 0)? - [ΔProvidersFeature(providers || [], viewProviders || [])]: [] + [ɵɵProvidersFeature(providers || [], viewProviders || [])]: [] }); }; } @@ -386,7 +386,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 b13582d769..1e7473bdbd 100644 --- a/packages/core/test/render3/renderer_factory_spec.ts +++ b/packages/core/test/render3/renderer_factory_spec.ts @@ -7,8 +7,8 @@ */ import {RendererType2, ViewEncapsulation} from '../../src/core'; -import {ΔdefineComponent} from '../../src/render3/index'; -import {Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, Δelement, ΔelementEnd, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, Δtext} from '../../src/render3/instructions/all'; +import {ɵɵdefineComponent} from '../../src/render3/index'; +import {ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵelement, ɵɵelementEnd, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵtext} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; import {getRendererFactory2} from './imported_renderer2'; @@ -26,7 +26,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']], @@ -35,7 +35,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'); @@ -46,7 +46,7 @@ describe('renderer factory lifecycle', () => { } class SomeComponentWhichThrows { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: SomeComponentWhichThrows, encapsulation: ViewEncapsulation.None, selectors: [['some-component-with-Error']], @@ -62,7 +62,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'); @@ -74,8 +74,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'); @@ -114,27 +114,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( @@ -150,7 +150,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']], @@ -158,7 +158,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, @@ -168,27 +168,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 f85cc1e3af..3dfecb239f 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 {ΔclassMap, ΔclassProp, ΔdefineComponent, ΔdefineDirective, ΔelementEnd, ΔelementStart, ΔnamespaceSVG, Δselect, ΔstyleMap, ΔstyleProp, Δstyling, ΔstylingApply} from '../../../src/render3/index'; +import {ɵɵclassMap, ɵɵclassProp, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵelementEnd, ɵɵelementStart, ɵɵnamespaceSVG, ɵɵselect, ɵɵstyleMap, ɵɵstyleProp, ɵɵstyling, ɵɵstylingApply} 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'; @@ -383,7 +383,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', @@ -392,14 +392,14 @@ describe('style and class based bindings', () => { 'opacity', '0.5', ]); - Δstyling(null, ['width']); - ΔelementEnd(); + ɵɵstyling(null, ['width']); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - Δselect(0); - ΔstyleMap(ctx.myStyles); - ΔstyleProp(0, ctx.myWidth); - ΔstylingApply(); + ɵɵselect(0); + ɵɵstyleMap(ctx.myStyles); + ɵɵstyleProp(0, ctx.myWidth); + ɵɵstylingApply(); } } @@ -419,7 +419,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(), @@ -427,18 +427,18 @@ describe('style and class based bindings', () => { vars: 0, template: (rf: RenderFlags, ctx: Comp) => { if (rf & RenderFlags.Create) { - ΔnamespaceSVG(); - ΔelementStart(0, 'svg'); - Δstyling(null, ['width', 'height']); - ΔelementStart(1, 'circle', ['stroke', 'green', 'fill', 'yellow']); - ΔelementEnd(); - ΔelementEnd(); + ɵɵnamespaceSVG(); + ɵɵelementStart(0, 'svg'); + ɵɵstyling(null, ['width', 'height']); + ɵɵelementStart(1, 'circle', ['stroke', 'green', 'fill', 'yellow']); + ɵɵelementEnd(); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - Δselect(0); - ΔstyleProp(0, ctx.diameter, 'px'); - ΔstyleProp(1, ctx.diameter, 'px'); - ΔstylingApply(); + ɵɵselect(0); + ɵɵstyleProp(0, ctx.diameter, 'px'); + ɵɵstyleProp(1, ctx.diameter, 'px'); + ɵɵstylingApply(); } } }); @@ -462,7 +462,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(), @@ -470,15 +470,15 @@ describe('style and class based bindings', () => { vars: 0, template: (rf: RenderFlags, ctx: Comp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - Δstyling(null, ['borderWidth', 'border-color']); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵstyling(null, ['borderWidth', 'border-color']); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - Δselect(0); - ΔstyleProp(0, ctx.borderWidth); - ΔstyleProp(1, ctx.borderColor); - ΔstylingApply(); + ɵɵselect(0); + ɵɵstyleProp(0, ctx.borderWidth); + ɵɵstyleProp(1, ctx.borderColor); + ɵɵstylingApply(); } } }); @@ -1279,7 +1279,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); @@ -3099,7 +3099,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], @@ -3108,17 +3108,17 @@ describe('style and class based bindings', () => { vars: 0, template: (rf: RenderFlags, ctx: Comp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - Δstyling(['foo'], ['width']); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵstyling(['foo'], ['width']); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - Δselect(0); - ΔstyleMap(styleMapFactory); - ΔclassMap(classMapFactory); - ΔstyleProp(0, widthFactory); - ΔclassProp(0, fooFactory); - ΔstylingApply(); + ɵɵselect(0); + ɵɵstyleMap(styleMapFactory); + ɵɵclassMap(classMapFactory); + ɵɵstyleProp(0, widthFactory); + ɵɵclassProp(0, fooFactory); + ɵɵstylingApply(); } } }); @@ -3174,7 +3174,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], @@ -3183,17 +3183,17 @@ describe('style and class based bindings', () => { vars: 0, template: (rf: RenderFlags, ctx: Comp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - Δstyling(['foo'], ['width']); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵstyling(['foo'], ['width']); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - Δselect(0); - ΔstyleMap(styleMapFactory); - ΔclassMap(classMapFactory); - ΔstyleProp(0, widthFactory); - ΔclassProp(0, fooFactory); - ΔstylingApply(); + ɵɵselect(0); + ɵɵstyleMap(styleMapFactory); + ɵɵclassMap(classMapFactory); + ɵɵstyleProp(0, widthFactory); + ɵɵclassProp(0, fooFactory); + ɵɵstylingApply(); } } }); @@ -3251,18 +3251,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) { - Δstyling(['foo'], ['width']); + ɵɵstyling(['foo'], ['width']); } if (rf & RenderFlags.Update) { - ΔstyleProp(0, ctx.widthFactory); - ΔclassProp(0, ctx.fooFactory); - ΔstylingApply(); + ɵɵstyleProp(0, ctx.widthFactory); + ɵɵclassProp(0, ctx.fooFactory); + ɵɵstylingApply(); } } }); @@ -3272,7 +3272,7 @@ describe('style and class based bindings', () => { } class Comp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: Comp, selectors: [['comp']], directives: [Comp, MyDir], @@ -3281,15 +3281,15 @@ describe('style and class based bindings', () => { vars: 0, template: (rf: RenderFlags, ctx: Comp) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div', ['my-dir', '']); - Δstyling(['foo'], ['width']); - ΔelementEnd(); + ɵɵelementStart(0, 'div', ['my-dir', '']); + ɵɵstyling(['foo'], ['width']); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - Δselect(0); - ΔstyleProp(0, ctx.widthFactory); - ΔclassProp(0, ctx.fooFactory); - ΔstylingApply(); + ɵɵselect(0); + ɵɵstyleProp(0, ctx.widthFactory); + ɵɵclassProp(0, ctx.fooFactory); + ɵɵstylingApply(); } } }); diff --git a/packages/core/test/render3/styling/players_spec.ts b/packages/core/test/render3/styling/players_spec.ts index 5f73651386..f0b494ddf5 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, Δselect, Δstyling, ΔstylingApply} from '../../../src/render3/instructions/all'; +import {getHostElement, ɵɵdefineComponent, ɵɵloadViewQuery, ɵɵviewQuery} from '../../../src/render3/index'; +import {markDirty, ɵɵelement, ɵɵelementEnd, ɵɵelementStart, ɵɵselect, ɵɵstyling, ɵɵstylingApply} 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,13 +257,13 @@ class CompWithStyling { vars: 0, template: (rf: RenderFlags, ctx: CompWithStyling) => { if (rf & RenderFlags.Create) { - ΔelementStart(0, 'div'); - Δstyling(['fooClass']); - ΔelementEnd(); + ɵɵelementStart(0, 'div'); + ɵɵstyling(['fooClass']); + ɵɵelementEnd(); } if (rf & RenderFlags.Update) { - Δselect(0); - ΔstylingApply(); + ɵɵselect(0); + ɵɵstylingApply(); } } }); @@ -272,7 +272,7 @@ class CompWithStyling { } class SuperComp { - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: SuperComp, selectors: [['super-comp']], factory: () => new SuperComp(), @@ -280,18 +280,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/view_container_ref_spec.ts b/packages/core/test/render3/view_container_ref_spec.ts index bfdadb8472..a56f0834ae 100644 --- a/packages/core/test/render3/view_container_ref_spec.ts +++ b/packages/core/test/render3/view_container_ref_spec.ts @@ -8,9 +8,9 @@ import {ChangeDetectorRef, Component as _Component, ComponentFactoryResolver, ComponentRef, ElementRef, QueryList, TemplateRef, ViewContainerRef, ViewRef,} from '../../src/core'; import {ViewEncapsulation} from '../../src/metadata'; -import {injectComponentFactoryResolver, ΔdefineComponent, ΔdefineDirective, Δlistener, ΔloadViewQuery, ΔqueryRefresh, ΔviewQuery,} from '../../src/render3/index'; +import {injectComponentFactoryResolver, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵlistener, ɵɵloadViewQuery, ɵɵqueryRefresh, ɵɵviewQuery,} from '../../src/render3/index'; -import {Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, ΔdirectiveInject, Δelement, ΔelementEnd, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, Δtemplate, Δtext,} from '../../src/render3/instructions/all'; +import {ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵdirectiveInject, ɵɵelement, ɵɵelementEnd, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵtemplate, ɵɵtext,} from '../../src/render3/instructions/all'; import {RenderFlags} from '../../src/render3/interfaces/definition'; import {RElement} from '../../src/render3/interfaces/renderer'; import {getLView} from '../../src/render3/state'; @@ -29,12 +29,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'} }); @@ -57,13 +57,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); @@ -80,13 +80,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'); } } @@ -99,7 +99,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']], @@ -108,10 +108,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] @@ -134,12 +134,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<{}>) {} @@ -156,7 +156,7 @@ describe('ViewContainerRef', () => { function EmbeddedTemplateA(rf: RenderFlags, ctx: any) { if (rf & RenderFlags.Create) { - Δtext(0, 'A'); + ɵɵtext(0, 'A'); } } @@ -172,7 +172,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']], @@ -181,25 +181,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] @@ -239,12 +239,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) => {} @@ -256,7 +256,7 @@ describe('ViewContainerRef', () => { ngDoCheck() { this.doCheckCount++; } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: DynamicComp, selectors: [['dynamic-comp']], factory: () => dynamicComp = new DynamicComp(), @@ -316,8 +316,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]); @@ -335,8 +335,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]); @@ -355,11 +355,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) => {} @@ -383,7 +383,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); @@ -424,7 +424,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(), @@ -432,18 +432,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); } } @@ -468,7 +468,7 @@ describe('ViewContainerRef', () => { ngOnDestroy() { this.viewRef.destroy(); } - static ngComponentDef = ΔdefineComponent({ + static ngComponentDef = ɵɵdefineComponent({ type: CompWithListenerThatDestroysItself, selectors: [['comp-with-listener-and-on-destroy']], consts: 2, @@ -476,18 +476,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)), }); } @@ -495,7 +495,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 a2b32bbd9c..fa546d6ac1 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, Input, NgModule, Optional, Pipe, ɵsetClassMetadata as setClassMetadata, ΔdefineComponent as defineComponent, Δtext as text} from '@angular/core'; +import {Component, Directive, ErrorHandler, Inject, Injectable, InjectionToken, Input, 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 0f270b9cb2..ec81d5c0ed 100644 --- a/packages/core/test/view/ng_module_spec.ts +++ b/packages/core/test/view/ng_module_spec.ts @@ -10,7 +10,7 @@ import {NgModuleRef} from '@angular/core'; import {InjectFlags, inject} from '@angular/core/src/di'; import {Injector} from '@angular/core/src/di/injector'; import {INJECTOR} from '@angular/core/src/di/injector_compatibility'; -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'; @@ -27,14 +27,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, }); @@ -43,7 +43,7 @@ class Baz { class HasNormalDep { constructor(public foo: Foo) {} - static ngInjectableDef: ΔInjectableDef = ΔdefineInjectable({ + static ngInjectableDef: ɵɵInjectableDef = ɵɵdefineInjectable({ factory: () => new HasNormalDep(inject(Foo)), providedIn: MyModule, }); @@ -52,7 +52,7 @@ class HasNormalDep { class HasDefinedDep { constructor(public bar: Bar) {} - static ngInjectableDef: ΔInjectableDef = ΔdefineInjectable({ + static ngInjectableDef: ɵɵInjectableDef = ɵɵdefineInjectable({ factory: () => new HasDefinedDep(inject(Bar)), providedIn: MyModule, }); @@ -61,14 +61,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, }); @@ -76,7 +76,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, }); @@ -86,7 +86,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), @@ -209,7 +209,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 c9153b4063..e18e7f81fa 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, 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, 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 dc664d6c6f..1a3c687730 100644 --- a/tools/public_api_guard/core/core.d.ts +++ b/tools/public_api_guard/core/core.d.ts @@ -266,7 +266,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; @@ -383,7 +383,7 @@ export interface HostListenerDecorator { new (eventName: string, args?: string[]): any; } -export declare const inject: typeof Δinject; +export declare const inject: typeof ɵɵinject; export interface Inject { token: any; @@ -659,6 +659,386 @@ export interface OutputDecorator { new (bindingPropertyName?: string): any; } +export declare function ɵɵallocHostVars(count: number): void; + +export interface ɵɵBaseDef { + contentQueries: ContentQueriesFunction | null; + /** @deprecated */ readonly declaredInputs: { + [P in keyof T]: string; + }; + hostBindings: HostBindingsFunction | null; + readonly inputs: { + [P in keyof T]: string; + }; + readonly outputs: { + [P in keyof T]: string; + }; + viewQuery: ViewQueriesFunction | null; +} + +export declare function ɵɵbind(value: T): T | NO_CHANGE; + +export declare function ɵɵclassMap(classes: { + [styleName: string]: any; +} | NO_CHANGE | string | null): void; + +export declare function ɵɵclassProp(classIndex: number, value: boolean | PlayerFactory, forceOverride?: boolean): void; + +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; + }; + contentQueries?: ContentQueriesFunction | null; + viewQuery?: ViewQueriesFunction | null; + hostBindings?: HostBindingsFunction; +}): ɵɵ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; + id?: string | 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 ɵɵ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 ɵɵ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 ɵɵ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 ɵɵproperty(propName: string, value: T, sanitizer?: SanitizerFn | null, nativeOnly?: boolean): TsickleIssue1009; + +export declare function ɵɵpropertyInterpolate(propName: string, v0: any, sanitizer?: SanitizerFn): TsickleIssue1009; + +export declare function ɵɵpropertyInterpolate1(propName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009; + +export declare function ɵɵpropertyInterpolate2(propName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009; + +export declare function ɵɵpropertyInterpolate3(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009; + +export declare function ɵɵpropertyInterpolate4(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009; + +export declare 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, sanitizer?: SanitizerFn): TsickleIssue1009; + +export declare 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, sanitizer?: SanitizerFn): TsickleIssue1009; + +export declare 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, sanitizer?: SanitizerFn): TsickleIssue1009; + +export declare 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, sanitizer?: SanitizerFn): TsickleIssue1009; + +export declare function ɵɵpropertyInterpolateV(propName: string, values: any[], sanitizer?: SanitizerFn): TsickleIssue1009; + +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 ɵɵstyleMap(styles: { + [styleName: string]: any; +} | NO_CHANGE | null): void; + +export declare function ɵɵstyleProp(styleIndex: number, value: string | number | String | PlayerFactory | null, suffix?: string | null, forceOverride?: boolean): void; + +export declare function ɵɵstyling(classBindingNames?: string[] | null, styleBindingNames?: string[] | null, styleSanitizer?: StyleSanitizeFn | null): void; + +export declare function ɵɵstylingApply(): 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 { @@ -1051,383 +1431,3 @@ export interface WtfScopeFn { } export declare const wtfStartTimeRange: (rangeType: string, action: string) => any; - -export declare function ΔallocHostVars(count: number): void; - -export interface ΔBaseDef { - contentQueries: ContentQueriesFunction | null; - /** @deprecated */ readonly declaredInputs: { - [P in keyof T]: string; - }; - hostBindings: HostBindingsFunction | null; - readonly inputs: { - [P in keyof T]: string; - }; - readonly outputs: { - [P in keyof T]: string; - }; - viewQuery: ViewQueriesFunction | null; -} - -export declare function Δbind(value: T): T | NO_CHANGE; - -export declare function ΔclassMap(classes: { - [styleName: string]: any; -} | NO_CHANGE | string | null): void; - -export declare function ΔclassProp(classIndex: number, value: boolean | PlayerFactory, forceOverride?: boolean): void; - -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; - }; - contentQueries?: ContentQueriesFunction | null; - viewQuery?: ViewQueriesFunction | null; - hostBindings?: HostBindingsFunction; -}): Δ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; - id?: string | 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 Δ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 Δ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 Δ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 Δproperty(propName: string, value: T, sanitizer?: SanitizerFn | null, nativeOnly?: boolean): TsickleIssue1009; - -export declare function ΔpropertyInterpolate(propName: string, v0: any, sanitizer?: SanitizerFn): TsickleIssue1009; - -export declare function ΔpropertyInterpolate1(propName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009; - -export declare function ΔpropertyInterpolate2(propName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009; - -export declare function ΔpropertyInterpolate3(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009; - -export declare function ΔpropertyInterpolate4(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009; - -export declare 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, sanitizer?: SanitizerFn): TsickleIssue1009; - -export declare 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, sanitizer?: SanitizerFn): TsickleIssue1009; - -export declare 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, sanitizer?: SanitizerFn): TsickleIssue1009; - -export declare 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, sanitizer?: SanitizerFn): TsickleIssue1009; - -export declare function ΔpropertyInterpolateV(propName: string, values: any[], sanitizer?: SanitizerFn): TsickleIssue1009; - -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 ΔstyleMap(styles: { - [styleName: string]: any; -} | NO_CHANGE | null): void; - -export declare function ΔstyleProp(styleIndex: number, value: string | number | String | PlayerFactory | null, suffix?: string | null, forceOverride?: boolean): void; - -export declare function Δstyling(classBindingNames?: string[] | null, styleBindingNames?: string[] | null, styleSanitizer?: StyleSanitizeFn | null): void; - -export declare function ΔstylingApply(): 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 71f35129b8..da378c2882 100644 --- a/tools/ts-api-guardian/index.bzl +++ b/tools/ts-api-guardian/index.bzl @@ -24,7 +24,7 @@ def ts_api_guardian_test( golden, actual, data = [], - strip_export_pattern = ["^__", "^ɵ"], + strip_export_pattern = ["^__", "^ɵ[^ɵ]"], allow_module_identifiers = COMMON_MODULE_IDENTIFIERS, use_angular_tag_rules = True, **kwargs):