From 5565810bd6ea72e790bdb07c9718751af7c64128 Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Thu, 4 Mar 2021 20:55:25 +0000 Subject: [PATCH] =?UTF-8?q?refactor(compiler-cli):=20implement=20`=C9=B5?= =?UTF-8?q?=C9=B5ngDeclareNgModule`=20and=20`=C9=B5=C9=B5ngDeclareInjector?= =?UTF-8?q?`=20(#41080)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit changes the partial compilation so that it outputs declaration calls rather than definition calls for NgModules and Injectors. The JIT compiler and the linker are updated to be able to handle these new declarations. PR Close #41080 --- packages/compiler-cli/linker/index.ts | 2 +- .../src/file_linker/linker_environment.ts | 3 +- .../linker/src/file_linker/linker_options.ts | 9 + .../partial_injector_linker_1.ts | 49 ++ .../partial_linker_selector.ts | 20 +- .../partial_ng_module_linker_1.ts | 128 ++++ .../partial_linker_selector_spec.ts | 15 +- .../src/ngtsc/annotations/src/ng_module.ts | 112 +++- .../GOLDEN_PARTIAL.js | 45 +- .../content_projection/GOLDEN_PARTIAL.js | 30 +- .../lifecycle_hooks/GOLDEN_PARTIAL.js | 20 +- .../pipes/GOLDEN_PARTIAL.js | 15 +- .../queries/GOLDEN_PARTIAL.js | 45 +- .../template_variables/GOLDEN_PARTIAL.js | 15 +- .../value_composition/GOLDEN_PARTIAL.js | 50 +- .../elements/GOLDEN_PARTIAL.js | 60 +- .../ng_modules/GOLDEN_PARTIAL.js | 563 ++++++++++++++++++ .../ng_modules/TEST_CASES.json | 149 +++++ .../ng_modules/basic.js | 3 + .../ng_modules/basic.ts | 5 + .../ng_modules/declarations.js | 17 + .../ng_modules/declarations.ts | 19 + .../ng_modules/declarations_jit_mode.js | 17 + .../ng_modules/declarations_jit_mode.ts | 19 + .../ng_modules/forward_refs.js | 13 + .../ng_modules/forward_refs.ts | 13 + .../ng_modules/imports_exports.js | 31 + .../ng_modules/imports_exports.ts | 29 + .../ng_modules/imports_exports_jit_mode.js | 31 + .../ng_modules/imports_exports_jit_mode.ts | 29 + .../ng_modules/inheritance.js | 22 + .../ng_modules/inheritance.ts | 14 + .../ng_modules/no_aot.js | 4 + .../ng_modules/no_aot.ts | 5 + .../ng_modules/providers.js | 21 + .../ng_modules/providers.ts | 27 + .../r3_view_compiler/GOLDEN_PARTIAL.js | 5 +- .../animations/GOLDEN_PARTIAL.js | 10 +- .../hello_world/GOLDEN_PARTIAL.js | 5 +- .../interpolations/GOLDEN_PARTIAL.js | 5 +- .../attribute_bindings/GOLDEN_PARTIAL.js | 15 +- .../host_bindings/GOLDEN_PARTIAL.js | 40 +- .../non_bindable_behavior/GOLDEN_PARTIAL.js | 20 +- .../property_bindings/GOLDEN_PARTIAL.js | 45 +- .../text_bindings/GOLDEN_PARTIAL.js | 5 +- .../r3_view_compiler_di/di/GOLDEN_PARTIAL.js | 10 +- .../matching/GOLDEN_PARTIAL.js | 40 +- .../element_attributes/GOLDEN_PARTIAL.js | 80 +-- .../es5_support/GOLDEN_PARTIAL.js | 5 +- .../icu_logic/GOLDEN_PARTIAL.js | 80 +-- .../GOLDEN_PARTIAL.js | 40 +- .../GOLDEN_PARTIAL.js | 10 +- .../namespaces/GOLDEN_PARTIAL.js | 10 +- .../nested_nodes/GOLDEN_PARTIAL.js | 80 +-- .../GOLDEN_PARTIAL.js | 55 +- .../GOLDEN_PARTIAL.js | 20 +- .../GOLDEN_PARTIAL.js | 5 +- .../GOLDEN_PARTIAL.js | 10 +- .../GOLDEN_PARTIAL.js | 40 +- .../GOLDEN_PARTIAL.js | 20 +- .../binding_slots/GOLDEN_PARTIAL.js | 10 +- .../class_bindings/GOLDEN_PARTIAL.js | 20 +- .../component_animations/GOLDEN_PARTIAL.js | 25 +- .../component_styles/GOLDEN_PARTIAL.js | 15 +- .../host_bindings/GOLDEN_PARTIAL.js | 30 +- .../mixed_style_and_class/GOLDEN_PARTIAL.js | 20 +- .../style_bindings/GOLDEN_PARTIAL.js | 30 +- .../GOLDEN_PARTIAL.js | 75 +-- .../inline_templates/GOLDEN_PARTIAL.js | 42 +- packages/compiler/src/compiler.ts | 7 +- .../compiler/src/compiler_facade_interface.ts | 23 + packages/compiler/src/jit_compiler_facade.ts | 35 +- packages/compiler/src/render3/partial/api.ts | 55 +- .../compiler/src/render3/partial/injector.ts | 39 ++ .../compiler/src/render3/partial/ng_module.ts | 65 ++ .../compiler/src/render3/r3_identifiers.ts | 7 +- .../src/render3/r3_injector_compiler.ts | 41 ++ .../src/render3/r3_module_compiler.ts | 98 +-- packages/compiler/src/render3/util.ts | 5 + .../src/compiler/compiler_facade_interface.ts | 22 + .../core/src/core_render3_private_export.ts | 2 + packages/core/src/render3/jit/partial.ts | 24 +- .../test/render3/jit/declare_injector_spec.ts | 42 ++ .../render3/jit/declare_ng_module_spec.ts | 119 ++++ .../core/test/render3/jit_environment_spec.ts | 2 + 85 files changed, 2330 insertions(+), 827 deletions(-) create mode 100644 packages/compiler-cli/linker/src/file_linker/partial_linkers/partial_injector_linker_1.ts create mode 100644 packages/compiler-cli/linker/src/file_linker/partial_linkers/partial_ng_module_linker_1.ts create mode 100644 packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/GOLDEN_PARTIAL.js create mode 100644 packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/TEST_CASES.json create mode 100644 packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/basic.js create mode 100644 packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/basic.ts create mode 100644 packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/declarations.js create mode 100644 packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/declarations.ts create mode 100644 packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/declarations_jit_mode.js create mode 100644 packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/declarations_jit_mode.ts create mode 100644 packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/forward_refs.js create mode 100644 packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/forward_refs.ts create mode 100644 packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/imports_exports.js create mode 100644 packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/imports_exports.ts create mode 100644 packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/imports_exports_jit_mode.js create mode 100644 packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/imports_exports_jit_mode.ts create mode 100644 packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/inheritance.js create mode 100644 packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/inheritance.ts create mode 100644 packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/no_aot.js create mode 100644 packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/no_aot.ts create mode 100644 packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/providers.js create mode 100644 packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/providers.ts create mode 100644 packages/compiler/src/render3/partial/injector.ts create mode 100644 packages/compiler/src/render3/partial/ng_module.ts create mode 100644 packages/compiler/src/render3/r3_injector_compiler.ts create mode 100644 packages/core/test/render3/jit/declare_injector_spec.ts create mode 100644 packages/core/test/render3/jit/declare_ng_module_spec.ts diff --git a/packages/compiler-cli/linker/index.ts b/packages/compiler-cli/linker/index.ts index ae0962151af..30504f1d5db 100644 --- a/packages/compiler-cli/linker/index.ts +++ b/packages/compiler-cli/linker/index.ts @@ -11,5 +11,5 @@ export {FatalLinkerError, isFatalLinkerError} from './src/fatal_linker_error'; export {DeclarationScope} from './src/file_linker/declaration_scope'; export {FileLinker} from './src/file_linker/file_linker'; export {LinkerEnvironment} from './src/file_linker/linker_environment'; -export {LinkerOptions} from './src/file_linker/linker_options'; +export {DEFAULT_LINKER_OPTIONS, LinkerOptions} from './src/file_linker/linker_options'; export {needsLinking} from './src/file_linker/needs_linking'; diff --git a/packages/compiler-cli/linker/src/file_linker/linker_environment.ts b/packages/compiler-cli/linker/src/file_linker/linker_environment.ts index d6dfd0f1610..06c4a86d6e9 100644 --- a/packages/compiler-cli/linker/src/file_linker/linker_environment.ts +++ b/packages/compiler-cli/linker/src/file_linker/linker_environment.ts @@ -34,7 +34,8 @@ export class LinkerEnvironment { i18nNormalizeLineEndingsInICUs: options.i18nNormalizeLineEndingsInICUs ?? DEFAULT_LINKER_OPTIONS.i18nNormalizeLineEndingsInICUs, i18nUseExternalIds: options.i18nUseExternalIds ?? DEFAULT_LINKER_OPTIONS.i18nUseExternalIds, - sourceMapping: options.sourceMapping ?? DEFAULT_LINKER_OPTIONS.sourceMapping + sourceMapping: options.sourceMapping ?? DEFAULT_LINKER_OPTIONS.sourceMapping, + linkerJitMode: options.linkerJitMode ?? DEFAULT_LINKER_OPTIONS.linkerJitMode, }); } } diff --git a/packages/compiler-cli/linker/src/file_linker/linker_options.ts b/packages/compiler-cli/linker/src/file_linker/linker_options.ts index 120be4d417e..a11112291e0 100644 --- a/packages/compiler-cli/linker/src/file_linker/linker_options.ts +++ b/packages/compiler-cli/linker/src/file_linker/linker_options.ts @@ -33,6 +33,14 @@ export interface LinkerOptions { * The default is `true`. */ sourceMapping: boolean; + + /** + * This option tells the linker to generate information used by a downstream JIT compiler. + * + * Specifically, in JIT mode, NgModule definitions must describe the `declarations`, `imports`, + * `exports`, etc, which are otherwise not needed. + */ + linkerJitMode: boolean; } /** @@ -43,4 +51,5 @@ export const DEFAULT_LINKER_OPTIONS: LinkerOptions = { i18nNormalizeLineEndingsInICUs: false, i18nUseExternalIds: false, sourceMapping: true, + linkerJitMode: false, }; diff --git a/packages/compiler-cli/linker/src/file_linker/partial_linkers/partial_injector_linker_1.ts b/packages/compiler-cli/linker/src/file_linker/partial_linkers/partial_injector_linker_1.ts new file mode 100644 index 00000000000..9c124a9adc7 --- /dev/null +++ b/packages/compiler-cli/linker/src/file_linker/partial_linkers/partial_injector_linker_1.ts @@ -0,0 +1,49 @@ +/** + * @license + * Copyright Google LLC All Rights Reserved. + * + * 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 {compileInjector, ConstantPool, R3DeclareInjectorMetadata, R3InjectorMetadata, R3PartialDeclaration} from '@angular/compiler'; +import * as o from '@angular/compiler/src/output/output_ast'; + +import {AstObject} from '../../ast/ast_value'; +import {FatalLinkerError} from '../../fatal_linker_error'; + +import {PartialLinker} from './partial_linker'; +import {wrapReference} from './util'; + +/** + * A `PartialLinker` that is designed to process `ɵɵngDeclareInjector()` call expressions. + */ +export class PartialInjectorLinkerVersion1 implements PartialLinker { + linkPartialDeclaration( + constantPool: ConstantPool, + metaObj: AstObject): o.Expression { + const meta = toR3InjectorMeta(metaObj); + const def = compileInjector(meta); + return def.expression; + } +} + +/** + * Derives the `R3InjectorMetadata` structure from the AST object. + */ +export function toR3InjectorMeta( + metaObj: AstObject): R3InjectorMetadata { + const typeExpr = metaObj.getValue('type'); + const typeName = typeExpr.getSymbolName(); + if (typeName === null) { + throw new FatalLinkerError( + typeExpr.expression, 'Unsupported type, its name could not be determined'); + } + + return { + name: typeName, + type: wrapReference(typeExpr.getOpaque()), + internalType: metaObj.getOpaque('type'), + providers: metaObj.has('providers') ? metaObj.getOpaque('providers') : null, + imports: metaObj.has('imports') ? metaObj.getArray('imports').map(i => i.getOpaque()) : [], + }; +} diff --git a/packages/compiler-cli/linker/src/file_linker/partial_linkers/partial_linker_selector.ts b/packages/compiler-cli/linker/src/file_linker/partial_linkers/partial_linker_selector.ts index b4d33f4d578..690d3f3b339 100644 --- a/packages/compiler-cli/linker/src/file_linker/partial_linkers/partial_linker_selector.ts +++ b/packages/compiler-cli/linker/src/file_linker/partial_linkers/partial_linker_selector.ts @@ -13,13 +13,20 @@ import {LinkerEnvironment} from '../linker_environment'; import {PartialComponentLinkerVersion1} from './partial_component_linker_1'; import {PartialDirectiveLinkerVersion1} from './partial_directive_linker_1'; +import {PartialInjectorLinkerVersion1} from './partial_injector_linker_1'; import {PartialLinker} from './partial_linker'; +import {PartialNgModuleLinkerVersion1} from './partial_ng_module_linker_1'; import {PartialPipeLinkerVersion1} from './partial_pipe_linker_1'; export const ɵɵngDeclareDirective = 'ɵɵngDeclareDirective'; export const ɵɵngDeclareComponent = 'ɵɵngDeclareComponent'; +export const ɵɵngDeclareInjector = 'ɵɵngDeclareInjector'; +export const ɵɵngDeclareNgModule = 'ɵɵngDeclareNgModule'; export const ɵɵngDeclarePipe = 'ɵɵngDeclarePipe'; -export const declarationFunctions = [ɵɵngDeclareDirective, ɵɵngDeclareComponent, ɵɵngDeclarePipe]; +export const declarationFunctions = [ + ɵɵngDeclareDirective, ɵɵngDeclareComponent, ɵɵngDeclareInjector, ɵɵngDeclareNgModule, + ɵɵngDeclarePipe +]; interface LinkerRange { range: string; @@ -83,6 +90,9 @@ export class PartialLinkerSelector { const partialComponentLinkerVersion1 = new PartialComponentLinkerVersion1( environment, createGetSourceFile(sourceUrl, code, environment.sourceFileLoader), sourceUrl, code); + const partialInjectorLinkerVersion1 = new PartialInjectorLinkerVersion1(); + const partialNgModuleLinkerVersion1 = + new PartialNgModuleLinkerVersion1(environment.options.linkerJitMode); const partialPipeLinkerVersion1 = new PartialPipeLinkerVersion1(); const linkers = new Map[]>(); @@ -94,6 +104,14 @@ export class PartialLinkerSelector { {range: '0.0.0-PLACEHOLDER', linker: partialComponentLinkerVersion1}, {range: '>=11.1.0-next.1', linker: partialComponentLinkerVersion1}, ]); + linkers.set(ɵɵngDeclareInjector, [ + {range: '0.0.0-PLACEHOLDER', linker: partialInjectorLinkerVersion1}, + {range: '>=11.1.0-next.1', linker: partialInjectorLinkerVersion1}, + ]); + linkers.set(ɵɵngDeclareNgModule, [ + {range: '0.0.0-PLACEHOLDER', linker: partialNgModuleLinkerVersion1}, + {range: '>=11.1.0-next.1', linker: partialNgModuleLinkerVersion1}, + ]); linkers.set(ɵɵngDeclarePipe, [ {range: '0.0.0-PLACEHOLDER', linker: partialPipeLinkerVersion1}, {range: '>=11.1.0-next.1', linker: partialPipeLinkerVersion1}, diff --git a/packages/compiler-cli/linker/src/file_linker/partial_linkers/partial_ng_module_linker_1.ts b/packages/compiler-cli/linker/src/file_linker/partial_linkers/partial_ng_module_linker_1.ts new file mode 100644 index 00000000000..cca10c8a8af --- /dev/null +++ b/packages/compiler-cli/linker/src/file_linker/partial_linkers/partial_ng_module_linker_1.ts @@ -0,0 +1,128 @@ +/** + * @license + * Copyright Google LLC All Rights Reserved. + * + * 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 {compileNgModule, ConstantPool, R3DeclareNgModuleMetadata, R3NgModuleMetadata, R3PartialDeclaration, R3Reference} from '@angular/compiler'; +import * as o from '@angular/compiler/src/output/output_ast'; + +import {AstObject, AstValue} from '../../ast/ast_value'; + +import {PartialLinker} from './partial_linker'; +import {wrapReference} from './util'; + +/** + * A `PartialLinker` that is designed to process `ɵɵngDeclareNgModule()` call expressions. + */ +export class PartialNgModuleLinkerVersion1 implements PartialLinker { + constructor( + /** + * If true then emit the additional declarations, imports, exports, etc in the NgModule + * definition. These are only used by JIT compilation. + */ + private emitInline: boolean) {} + + linkPartialDeclaration( + constantPool: ConstantPool, + metaObj: AstObject): o.Expression { + const meta = toR3NgModuleMeta(metaObj, this.emitInline); + const def = compileNgModule(meta); + return def.expression; + } +} + +/** + * Derives the `R3NgModuleMetadata` structure from the AST object. + */ +export function toR3NgModuleMeta( + metaObj: AstObject, + emitInline: boolean): R3NgModuleMetadata { + const wrappedType = metaObj.getOpaque('type'); + + const meta: R3NgModuleMetadata = { + type: wrapReference(wrappedType), + internalType: wrappedType, + adjacentType: wrappedType, + bootstrap: [], + declarations: [], + imports: [], + exports: [], + emitInline, + containsForwardDecls: false, + schemas: [], + id: metaObj.has('id') ? metaObj.getOpaque('id') : null, + }; + + // Each of `bootstrap`, `declarations`, `imports` and `exports` are normally an array. But if any + // of the references are not yet declared, then the arrays must be wrapped in a function to + // prevent errors at runtime when accessing the values. + + // The following blocks of code will unwrap the arrays from such functions, because + // `R3NgModuleMetadata` expects arrays of `R3Reference` objects. + + // Further, since the `ɵdefineNgModule()` will also suffer from the forward declaration problem, + // we must update the `containsForwardDecls` property if a function wrapper was found. + + if (metaObj.has('bootstrap')) { + const bootstrap: AstValue = metaObj.getValue('bootstrap'); + if (bootstrap.isFunction()) { + meta.containsForwardDecls = true; + meta.bootstrap = wrapReferences(unwrapForwardRefs(bootstrap)); + } else + meta.bootstrap = wrapReferences(bootstrap); + } + + if (metaObj.has('declarations')) { + const declarations: AstValue = metaObj.getValue('declarations'); + if (declarations.isFunction()) { + meta.containsForwardDecls = true; + meta.declarations = wrapReferences(unwrapForwardRefs(declarations)); + } else + meta.declarations = wrapReferences(declarations); + } + + if (metaObj.has('imports')) { + const imports: AstValue = metaObj.getValue('imports'); + if (imports.isFunction()) { + meta.containsForwardDecls = true; + meta.imports = wrapReferences(unwrapForwardRefs(imports)); + } else + meta.imports = wrapReferences(imports); + } + + if (metaObj.has('exports')) { + const exports: AstValue = metaObj.getValue('exports'); + if (exports.isFunction()) { + meta.containsForwardDecls = true; + meta.exports = wrapReferences(unwrapForwardRefs(exports)); + } else + meta.exports = wrapReferences(exports); + } + + if (metaObj.has('schemas')) { + const schemas: AstValue = metaObj.getValue('schemas'); + meta.schemas = wrapReferences(schemas); + } + + return meta; +} + +/** + * Extract an array from the body of the function. + * + * If `field` is `function() { return [exp1, exp2, exp3]; }` then we return `[exp1, exp2, exp3]`. + * + */ +function unwrapForwardRefs(field: AstValue): + AstValue { + return (field as AstValue).getFunctionReturnValue(); +} + +/** + * Wrap the array of expressions into an array of R3 references. + */ +function wrapReferences(values: AstValue): R3Reference[] { + return values.getArray().map(i => wrapReference(i.getOpaque())); +} diff --git a/packages/compiler-cli/linker/test/file_linker/partial_linkers/partial_linker_selector_spec.ts b/packages/compiler-cli/linker/test/file_linker/partial_linkers/partial_linker_selector_spec.ts index 31561d4d502..0d56077b9e0 100644 --- a/packages/compiler-cli/linker/test/file_linker/partial_linkers/partial_linker_selector_spec.ts +++ b/packages/compiler-cli/linker/test/file_linker/partial_linkers/partial_linker_selector_spec.ts @@ -7,7 +7,7 @@ */ import * as ts from 'typescript'; -import {LinkerOptions} from '../../..'; +import {DEFAULT_LINKER_OPTIONS, LinkerOptions} from '../../..'; import {FileSystem} from '../../../../src/ngtsc/file_system'; import {MockFileSystemNative} from '../../../../src/ngtsc/file_system/testing'; import {MockLogger} from '../../../../src/ngtsc/logging/testing'; @@ -16,16 +16,13 @@ import {TypeScriptAstHost} from '../../../src/ast/typescript/typescript_ast_host import {LinkerEnvironment} from '../../../src/file_linker/linker_environment'; import {PartialComponentLinkerVersion1} from '../../../src/file_linker/partial_linkers/partial_component_linker_1'; import {PartialDirectiveLinkerVersion1} from '../../../src/file_linker/partial_linkers/partial_directive_linker_1'; +import {PartialInjectorLinkerVersion1} from '../../../src/file_linker/partial_linkers/partial_injector_linker_1'; import {PartialLinkerSelector} from '../../../src/file_linker/partial_linkers/partial_linker_selector'; +import {PartialNgModuleLinkerVersion1} from '../../../src/file_linker/partial_linkers/partial_ng_module_linker_1'; import {PartialPipeLinkerVersion1} from '../../../src/file_linker/partial_linkers/partial_pipe_linker_1'; describe('PartialLinkerSelector', () => { - const options: LinkerOptions = { - i18nNormalizeLineEndingsInICUs: true, - enableI18nLegacyMessageIdFormat: false, - i18nUseExternalIds: false, - sourceMapping: false, - }; + const options: LinkerOptions = DEFAULT_LINKER_OPTIONS; let environment: LinkerEnvironment; let fs: FileSystem; @@ -65,6 +62,10 @@ describe('PartialLinkerSelector', () => { .toBeInstanceOf(PartialComponentLinkerVersion1); expect(selector.getLinker('ɵɵngDeclarePipe', '0.0.0-PLACEHOLDER')) .toBeInstanceOf(PartialPipeLinkerVersion1); + expect(selector.getLinker('ɵɵngDeclareInjector', '0.0.0-PLACEHOLDER')) + .toBeInstanceOf(PartialInjectorLinkerVersion1); + expect(selector.getLinker('ɵɵngDeclareNgModule', '0.0.0-PLACEHOLDER')) + .toBeInstanceOf(PartialNgModuleLinkerVersion1); }); it('should return the linker that matches the name and valid full version', () => { diff --git a/packages/compiler-cli/src/ngtsc/annotations/src/ng_module.ts b/packages/compiler-cli/src/ngtsc/annotations/src/ng_module.ts index 88f2a432060..52aac200bb9 100644 --- a/packages/compiler-cli/src/ngtsc/annotations/src/ng_module.ts +++ b/packages/compiler-cli/src/ngtsc/annotations/src/ng_module.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {compileInjector, compileNgModule, CUSTOM_ELEMENTS_SCHEMA, Expression, ExternalExpr, Identifiers as R3, InvokeFunctionExpr, LiteralArrayExpr, LiteralExpr, NO_ERRORS_SCHEMA, R3DependencyMetadata, R3FactoryTarget, R3Identifiers, R3InjectorMetadata, R3NgModuleMetadata, R3Reference, SchemaMetadata, Statement, STRING_TYPE, WrappedNodeExpr} from '@angular/compiler'; +import {compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileFactoryFunction, compileInjector, compileNgModule, CUSTOM_ELEMENTS_SCHEMA, Expression, ExternalExpr, Identifiers as R3, InvokeFunctionExpr, LiteralArrayExpr, LiteralExpr, NO_ERRORS_SCHEMA, R3CompiledExpression, R3FactoryMetadata, R3FactoryTarget, R3Identifiers, R3InjectorMetadata, R3NgModuleMetadata, R3Reference, SchemaMetadata, Statement, STRING_TYPE, WrappedNodeExpr} from '@angular/compiler'; import * as ts from 'typescript'; import {ErrorCode, FatalDiagnosticError, makeDiagnostic, makeRelatedInformation} from '../../diagnostics'; @@ -22,7 +22,6 @@ import {AnalysisOutput, CompileResult, DecoratorHandler, DetectResult, HandlerPr import {getSourceFile} from '../../util/src/typescript'; import {createValueHasWrongTypeError, getProviderDiagnostics} from './diagnostics'; -import {compileNgFactoryDefField} from './factory'; import {generateSetClassMetadataCall} from './metadata'; import {ReferencesRegistry} from './references_registry'; import {combineResolvers, findAngularDecorator, forwardRefResolver, getValidConstructorDependencies, isExpressionForwardReference, resolveProvidersRequiringFactory, toR3Reference, unwrapExpression, wrapFunctionExpressionsInParens, wrapTypeReference} from './util'; @@ -30,7 +29,7 @@ import {combineResolvers, findAngularDecorator, forwardRefResolver, getValidCons export interface NgModuleAnalysis { mod: R3NgModuleMetadata; inj: R3InjectorMetadata; - deps: R3DependencyMetadata[]|null; + fac: R3FactoryMetadata; metadataStmt: Statement|null; declarations: Reference[]; rawDeclarations: ts.Expression|null; @@ -299,7 +298,7 @@ export class NgModuleDecoratorHandler implements const internalType = new WrappedNodeExpr(this.reflector.getInternalNameOfClass(node)); const adjacentType = new WrappedNodeExpr(this.reflector.getAdjacentNameOfClass(node)); - const ngModuleDef: R3NgModuleMetadata = { + const ngModuleMetadata: R3NgModuleMetadata = { type, internalType, adjacentType, @@ -333,7 +332,7 @@ export class NgModuleDecoratorHandler implements this.routeAnalyzer.add(node.getSourceFile(), name, rawImports, rawExports, rawProviders); } - const ngInjectorDef: R3InjectorMetadata = { + const injectorMetadata: R3InjectorMetadata = { name, type, internalType, @@ -341,14 +340,24 @@ export class NgModuleDecoratorHandler implements imports: injectorImports, }; + const factoryMetadata: R3FactoryMetadata = { + name, + type, + internalType, + typeArgumentCount: 0, + deps: getValidConstructorDependencies( + node, this.reflector, this.defaultImportRecorder, this.isCore), + injectFn: R3.inject, + target: R3FactoryTarget.NgModule, + }; + return { analysis: { id, - schemas: schemas, - mod: ngModuleDef, - inj: ngInjectorDef, - deps: getValidConstructorDependencies( - node, this.reflector, this.defaultImportRecorder, this.isCore), + schemas, + mod: ngModuleMetadata, + inj: injectorMetadata, + fac: factoryMetadata, declarations: declarationRefs, rawDeclarations, imports: importRefs, @@ -450,17 +459,55 @@ export class NgModuleDecoratorHandler implements compileFull( node: ClassDeclaration, - {inj, mod, deps, metadataStmt, declarations}: Readonly, - resolution: Readonly): CompileResult[] { - // Merge the injector imports (which are 'exports' that were later found to be NgModules) - // computed during resolution with the ones from analysis. - const ngInjectorDef = - compileInjector({...inj, imports: [...inj.imports, ...resolution.injectorImports]}); + {inj, mod, fac, metadataStmt, declarations}: Readonly, + {injectorImports}: Readonly): CompileResult[] { + const factoryFn = compileFactoryFunction(fac); + const ngInjectorDef = compileInjector(this.mergeInjectorImports(inj, injectorImports)); const ngModuleDef = compileNgModule(mod); - const ngModuleStatements = ngModuleDef.statements; + const statements = ngModuleDef.statements; + this.insertMetadataStatement(statements, metadataStmt); + this.appendRemoteScopingStatements(statements, node, declarations); + + return this.compileNgModule(factoryFn, ngInjectorDef, ngModuleDef); + } + + compilePartial( + node: ClassDeclaration, {inj, fac, mod, metadataStmt}: Readonly, + {injectorImports}: Readonly): CompileResult[] { + const factoryFn = compileFactoryFunction(fac); + const injectorDef = + compileDeclareInjectorFromMetadata(this.mergeInjectorImports(inj, injectorImports)); + const ngModuleDef = compileDeclareNgModuleFromMetadata(mod); + this.insertMetadataStatement(ngModuleDef.statements, metadataStmt); + // NOTE: no remote scoping required as this is banned in partial compilation. + return this.compileNgModule(factoryFn, injectorDef, ngModuleDef); + } + + /** + * Merge the injector imports (which are 'exports' that were later found to be NgModules) + * computed during resolution with the ones from analysis. + */ + private mergeInjectorImports(inj: R3InjectorMetadata, injectorImports: Expression[]): + R3InjectorMetadata { + return {...inj, imports: [...inj.imports, ...injectorImports]}; + } + + /** + * Add class metadata statements, if provided, to the `ngModuleStatements`. + */ + private insertMetadataStatement(ngModuleStatements: Statement[], metadataStmt: Statement|null): + void { if (metadataStmt !== null) { - ngModuleStatements.push(metadataStmt); + ngModuleStatements.unshift(metadataStmt); } + } + + /** + * Add remote scoping statements, as needed, to the `ngModuleStatements`. + */ + private appendRemoteScopingStatements( + ngModuleStatements: Statement[], node: ClassDeclaration, + declarations: Reference[]): void { const context = getSourceFile(node); for (const decl of declarations) { const remoteScope = this.scopeRegistry.getRemoteScope(decl.node); @@ -478,31 +525,34 @@ export class NgModuleDecoratorHandler implements ngModuleStatements.push(callExpr.toStmt()); } } + } + + private compileNgModule( + factoryFn: R3CompiledExpression, injectorDef: R3CompiledExpression, + ngModuleDef: R3CompiledExpression): CompileResult[] { const res: CompileResult[] = [ - compileNgFactoryDefField({ - name: inj.name, - type: inj.type, - internalType: inj.internalType, - typeArgumentCount: 0, - deps, - injectFn: R3.inject, - target: R3FactoryTarget.NgModule, - }), + { + name: 'ɵfac', + initializer: factoryFn.expression, + statements: factoryFn.statements, + type: factoryFn.type, + }, { name: 'ɵmod', initializer: ngModuleDef.expression, - statements: ngModuleStatements, + statements: ngModuleDef.statements, type: ngModuleDef.type, }, { name: 'ɵinj', - initializer: ngInjectorDef.expression, - statements: ngInjectorDef.statements, - type: ngInjectorDef.type, + initializer: injectorDef.expression, + statements: injectorDef.statements, + type: injectorDef.type, }, ]; if (this.localeId) { + // QUESTION: can this stuff be removed? res.push({ name: 'ɵloc', initializer: new LiteralExpr(this.localeId), diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/GOLDEN_PARTIAL.js index a916e92d87d..faba87db8b3 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/GOLDEN_PARTIAL.js @@ -29,9 +29,8 @@ MyForwardDirective.ɵdir = i0.ɵɵngDeclareDirective({ version: "0.0.0-PLACEHOLD export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [HostBindingComp, MyForwardDirective] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [HostBindingComp, MyForwardDirective] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [HostBindingComp, MyForwardDirective] }] @@ -82,9 +81,8 @@ MyForwardPipe.ɵpipe = i0.ɵɵngDeclarePipe({ version: "0.0.0-PLACEHOLDER", ngIm export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [HostBindingComp, MyForwardPipe] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [HostBindingComp, MyForwardPipe] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [HostBindingComp, MyForwardPipe] }] @@ -120,9 +118,8 @@ SomeDirective.ɵdir = i0.ɵɵngDeclareDirective({ version: "0.0.0-PLACEHOLDER", export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [SomeDirective] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [SomeDirective] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [SomeDirective] }] @@ -192,9 +189,8 @@ MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: My export class MyMod { } MyMod.ɵfac = function MyMod_Factory(t) { return new (t || MyMod)(); }; -MyMod.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyMod }); -MyMod.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyMod, { declarations: [SomeComp, MyApp] }); })(); +MyMod.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyMod, declarations: [SomeComp, MyApp] }); +MyMod.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyMod }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyMod, [{ type: NgModule, args: [{ declarations: [SomeComp, MyApp] }] @@ -248,9 +244,8 @@ MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: My export class MyMod { } MyMod.ɵfac = function MyMod_Factory(t) { return new (t || MyMod)(); }; -MyMod.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyMod }); -MyMod.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyMod, { declarations: [MyApp, SomeComp] }); })(); +MyMod.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyMod, declarations: [MyApp, SomeComp] }); +MyMod.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyMod }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyMod, [{ type: NgModule, args: [{ declarations: [MyApp, SomeComp] }] @@ -300,9 +295,8 @@ MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: My export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyApp] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyApp] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyApp] }] @@ -346,9 +340,8 @@ MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: My export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyApp] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyApp] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyApp] }] @@ -395,9 +388,8 @@ MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: My export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyApp] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyApp] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyApp] }] @@ -480,9 +472,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/content_projection/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/content_projection/GOLDEN_PARTIAL.js index 564b2d2ac91..0c1d56d7dce 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/content_projection/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/content_projection/GOLDEN_PARTIAL.js @@ -37,9 +37,8 @@ MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: My export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [SimpleComponent, ComplexComponent, MyApp] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [SimpleComponent, ComplexComponent, MyApp] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [SimpleComponent, ComplexComponent, MyApp] }] @@ -93,9 +92,8 @@ Cmp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: Cmp, class Module { } Module.ɵfac = function Module_Factory(t) { return new (t || Module)(); }; -Module.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: Module }); -Module.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(Module, { declarations: [Cmp] }); })(); +Module.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Module, declarations: [Cmp] }); +Module.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Module }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Module, [{ type: NgModule, args: [{ declarations: [Cmp] }] @@ -144,9 +142,8 @@ Cmp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: Cmp, class Module { } Module.ɵfac = function Module_Factory(t) { return new (t || Module)(); }; -Module.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: Module }); -Module.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(Module, { declarations: [Cmp] }); })(); +Module.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Module, declarations: [Cmp] }); +Module.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Module }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Module, [{ type: NgModule, args: [{ declarations: [Cmp] }] @@ -199,9 +196,8 @@ Cmp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: Cmp, class Module { } Module.ɵfac = function Module_Factory(t) { return new (t || Module)(); }; -Module.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: Module }); -Module.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(Module, { declarations: [Cmp] }); })(); +Module.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Module, declarations: [Cmp] }); +Module.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Module }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Module, [{ type: NgModule, args: [{ declarations: [Cmp] }] @@ -236,9 +232,8 @@ MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: My export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyApp, SimpleComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyApp, SimpleComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyApp, SimpleComponent] }] @@ -286,9 +281,8 @@ MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: My export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [SimpleComponent, MyApp] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [SimpleComponent, MyApp] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [SimpleComponent, MyApp] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/lifecycle_hooks/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/lifecycle_hooks/GOLDEN_PARTIAL.js index 4f9df0a0f54..3bc72ebaa51 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/lifecycle_hooks/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/lifecycle_hooks/GOLDEN_PARTIAL.js @@ -14,9 +14,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -82,9 +81,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [IfDirective, MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [IfDirective, MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [IfDirective, MyComponent] }] @@ -141,9 +139,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -228,9 +225,8 @@ SimpleLayout.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", t export class LifecycleModule { } LifecycleModule.ɵfac = function LifecycleModule_Factory(t) { return new (t || LifecycleModule)(); }; -LifecycleModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: LifecycleModule }); -LifecycleModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(LifecycleModule, { declarations: [LifecycleComp, SimpleLayout] }); })(); +LifecycleModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: LifecycleModule, declarations: [LifecycleComp, SimpleLayout] }); +LifecycleModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: LifecycleModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LifecycleModule, [{ type: NgModule, args: [{ declarations: [LifecycleComp, SimpleLayout] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/pipes/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/pipes/GOLDEN_PARTIAL.js index 20bc11ccab7..bd2c693e0f2 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/pipes/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/pipes/GOLDEN_PARTIAL.js @@ -47,9 +47,8 @@ MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: My export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyPipe, MyPurePipe, MyApp] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyPipe, MyPurePipe, MyApp] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyPipe, MyPurePipe, MyApp] }] @@ -117,9 +116,8 @@ MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: My export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyPipe, MyApp] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyPipe, MyApp] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyPipe, MyApp] }] @@ -192,9 +190,8 @@ MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: My export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyPipe, MyOtherPipe, MyApp] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyPipe, MyOtherPipe, MyApp] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyPipe, MyOtherPipe, MyApp] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/queries/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/queries/GOLDEN_PARTIAL.js index 8f49e5621a7..efd702fb5e8 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/queries/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/queries/GOLDEN_PARTIAL.js @@ -53,9 +53,8 @@ ViewQueryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLD export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [SomeDirective, ViewQueryComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [SomeDirective, ViewQueryComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [SomeDirective, ViewQueryComponent] }] @@ -111,9 +110,8 @@ ViewQueryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLD export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [ViewQueryComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [ViewQueryComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [ViewQueryComponent] }] @@ -191,9 +189,8 @@ ViewQueryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLD export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [SomeDirective, ViewQueryComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [SomeDirective, ViewQueryComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [SomeDirective, ViewQueryComponent] }] @@ -283,9 +280,8 @@ ViewQueryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLD export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [ViewQueryComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [ViewQueryComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [ViewQueryComponent] }] @@ -384,9 +380,8 @@ MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: My export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [SomeDirective, ContentQueryComponent, MyApp] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [SomeDirective, ContentQueryComponent, MyApp] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [SomeDirective, ContentQueryComponent, MyApp] }] @@ -446,9 +441,8 @@ ContentQueryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEH export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [ContentQueryComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [ContentQueryComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [ContentQueryComponent] }] @@ -545,9 +539,8 @@ MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: My export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [SomeDirective, ContentQueryComponent, MyApp] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [SomeDirective, ContentQueryComponent, MyApp] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [SomeDirective, ContentQueryComponent, MyApp] }] @@ -641,9 +634,8 @@ ContentQueryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEH export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [ContentQueryComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [ContentQueryComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [ContentQueryComponent] }] @@ -731,9 +723,8 @@ ContentQueryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEH export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [ContentQueryComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [ContentQueryComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [ContentQueryComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/template_variables/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/template_variables/GOLDEN_PARTIAL.js index ce1a806d303..4fe14ef99fd 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/template_variables/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/template_variables/GOLDEN_PARTIAL.js @@ -64,9 +64,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent, ForOfDirective] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent, ForOfDirective] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent, ForOfDirective] }] @@ -156,9 +155,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent, ForOfDirective] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent, ForOfDirective] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent, ForOfDirective] }] @@ -271,9 +269,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent, ForOfDirective] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent, ForOfDirective] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent, ForOfDirective] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/value_composition/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/value_composition/GOLDEN_PARTIAL.js index a687b75d891..80010dc8039 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/value_composition/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/value_composition/GOLDEN_PARTIAL.js @@ -30,9 +30,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [ChildComponent, SomeDirective, MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [ChildComponent, SomeDirective, MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [ChildComponent, SomeDirective, MyComponent] }] @@ -84,9 +83,8 @@ OtherDirective.ɵdir = i0.ɵɵngDeclareDirective({ version: "0.0.0-PLACEHOLDER", export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [SomeDirective, OtherDirective] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [SomeDirective, OtherDirective] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [SomeDirective, OtherDirective] }] @@ -126,9 +124,8 @@ SomeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [SomeComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [SomeComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [SomeComponent] }] @@ -172,9 +169,8 @@ EmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHO export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [EmptyOutletComponent, RouterOutlet] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [EmptyOutletComponent, RouterOutlet] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [EmptyOutletComponent, RouterOutlet] }] @@ -219,9 +215,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -274,9 +269,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [IfDirective, MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [IfDirective, MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [IfDirective, MyComponent] }] @@ -348,9 +342,8 @@ MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: My export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComp, MyApp] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComp, MyApp] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComp, MyApp] }] @@ -449,9 +442,8 @@ MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: My export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComp, MyApp] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComp, MyApp] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComp, MyApp] }] @@ -530,9 +522,8 @@ MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: My export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [ObjectComp, MyApp] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [ObjectComp, MyApp] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [ObjectComp, MyApp] }] @@ -610,9 +601,8 @@ MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: My export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [NestedComp, MyApp] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [NestedComp, MyApp] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [NestedComp, MyApp] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/elements/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/elements/GOLDEN_PARTIAL.js index d8bbfa26583..1803fcba88b 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/elements/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/elements/GOLDEN_PARTIAL.js @@ -17,9 +17,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -74,9 +73,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent, MathCmp, InfinityCmp] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent, MathCmp, InfinityCmp] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent, MathCmp, InfinityCmp] }] @@ -123,9 +121,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -164,9 +161,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -205,9 +201,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -243,9 +238,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -284,9 +278,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -369,9 +362,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent, DivDir, PipePipe] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent, DivDir, PipePipe] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent, DivDir, PipePipe] }] @@ -456,9 +448,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -506,9 +497,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -555,9 +545,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -618,9 +607,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/GOLDEN_PARTIAL.js new file mode 100644 index 00000000000..e118bc28843 --- /dev/null +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/GOLDEN_PARTIAL.js @@ -0,0 +1,563 @@ +/**************************************************************************************************** + * PARTIAL FILE: basic.js + ****************************************************************************************************/ +import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core'; +import * as i0 from "@angular/core"; +export class BasicModule { +} +BasicModule.ɵfac = function BasicModule_Factory(t) { return new (t || BasicModule)(); }; +BasicModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: BasicModule, id: 'BasicModuleId' }); +BasicModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: BasicModule }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BasicModule, [{ + type: NgModule, + args: [{ id: 'BasicModuleId', schemas: [NO_ERRORS_SCHEMA] }] + }], null, null); })(); + +/**************************************************************************************************** + * PARTIAL FILE: basic.d.ts + ****************************************************************************************************/ +import * as i0 from "@angular/core"; +export declare class BasicModule { + static ɵfac: i0.ɵɵFactoryDef; + static ɵmod: i0.ɵɵNgModuleDefWithMeta; + static ɵinj: i0.ɵɵInjectorDef; +} + +/**************************************************************************************************** + * PARTIAL FILE: declarations.js + ****************************************************************************************************/ +import { Component, Directive, NgModule, Pipe } from '@angular/core'; +import * as i0 from "@angular/core"; +export class FooComponent { + constructor() { + this.name = 'World'; + } +} +FooComponent.ɵfac = function FooComponent_Factory(t) { return new (t || FooComponent)(); }; +FooComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: FooComponent, selector: "foo", ngImport: i0, template: '
Hello, {{name}}!
', isInline: true }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FooComponent, [{ + type: Component, + args: [{ selector: 'foo', template: '
Hello, {{name}}!
' }] + }], null, null); })(); +export class BarDirective { +} +BarDirective.ɵfac = function BarDirective_Factory(t) { return new (t || BarDirective)(); }; +BarDirective.ɵdir = i0.ɵɵngDeclareDirective({ version: "0.0.0-PLACEHOLDER", type: BarDirective, selector: "[bar]", ngImport: i0 }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BarDirective, [{ + type: Directive, + args: [{ selector: '[bar]' }] + }], null, null); })(); +export class QuxPipe { + transform() { } +} +QuxPipe.ɵfac = function QuxPipe_Factory(t) { return new (t || QuxPipe)(); }; +QuxPipe.ɵpipe = i0.ɵɵngDeclarePipe({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: QuxPipe, name: "qux" }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QuxPipe, [{ + type: Pipe, + args: [{ name: 'qux' }] + }], null, null); })(); +export class FooModule { +} +FooModule.ɵfac = function FooModule_Factory(t) { return new (t || FooModule)(); }; +FooModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: FooModule, bootstrap: [FooComponent], declarations: [FooComponent, BarDirective, QuxPipe] }); +FooModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: FooModule }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FooModule, [{ + type: NgModule, + args: [{ declarations: [FooComponent, BarDirective, QuxPipe], bootstrap: [FooComponent] }] + }], null, null); })(); + +/**************************************************************************************************** + * PARTIAL FILE: declarations.d.ts + ****************************************************************************************************/ +import { PipeTransform } from '@angular/core'; +import * as i0 from "@angular/core"; +export declare class FooComponent { + name: string; + static ɵfac: i0.ɵɵFactoryDef; + static ɵcmp: i0.ɵɵComponentDefWithMeta; +} +export declare class BarDirective { + static ɵfac: i0.ɵɵFactoryDef; + static ɵdir: i0.ɵɵDirectiveDefWithMeta; +} +export declare class QuxPipe implements PipeTransform { + transform(): void; + static ɵfac: i0.ɵɵFactoryDef; + static ɵpipe: i0.ɵɵPipeDefWithMeta; +} +export declare class FooModule { + static ɵfac: i0.ɵɵFactoryDef; + static ɵmod: i0.ɵɵNgModuleDefWithMeta; + static ɵinj: i0.ɵɵInjectorDef; +} + +/**************************************************************************************************** + * PARTIAL FILE: declarations_jit_mode.js + ****************************************************************************************************/ +import { Component, Directive, NgModule, Pipe } from '@angular/core'; +import * as i0 from "@angular/core"; +export class FooComponent { + constructor() { + this.name = 'World'; + } +} +FooComponent.ɵfac = function FooComponent_Factory(t) { return new (t || FooComponent)(); }; +FooComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: FooComponent, selector: "foo", ngImport: i0, template: '
Hello, {{name}}!
', isInline: true }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FooComponent, [{ + type: Component, + args: [{ selector: 'foo', template: '
Hello, {{name}}!
' }] + }], null, null); })(); +export class BarDirective { +} +BarDirective.ɵfac = function BarDirective_Factory(t) { return new (t || BarDirective)(); }; +BarDirective.ɵdir = i0.ɵɵngDeclareDirective({ version: "0.0.0-PLACEHOLDER", type: BarDirective, selector: "[bar]", ngImport: i0 }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BarDirective, [{ + type: Directive, + args: [{ selector: '[bar]' }] + }], null, null); })(); +export class QuxPipe { + transform() { } +} +QuxPipe.ɵfac = function QuxPipe_Factory(t) { return new (t || QuxPipe)(); }; +QuxPipe.ɵpipe = i0.ɵɵngDeclarePipe({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: QuxPipe, name: "qux" }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QuxPipe, [{ + type: Pipe, + args: [{ name: 'qux' }] + }], null, null); })(); +export class FooModule { +} +FooModule.ɵfac = function FooModule_Factory(t) { return new (t || FooModule)(); }; +FooModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: FooModule, bootstrap: [FooComponent], declarations: [FooComponent, BarDirective, QuxPipe] }); +FooModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: FooModule }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FooModule, [{ + type: NgModule, + args: [{ declarations: [FooComponent, BarDirective, QuxPipe], bootstrap: [FooComponent] }] + }], null, null); })(); + +/**************************************************************************************************** + * PARTIAL FILE: declarations_jit_mode.d.ts + ****************************************************************************************************/ +import { PipeTransform } from '@angular/core'; +import * as i0 from "@angular/core"; +export declare class FooComponent { + name: string; + static ɵfac: i0.ɵɵFactoryDef; + static ɵcmp: i0.ɵɵComponentDefWithMeta; +} +export declare class BarDirective { + static ɵfac: i0.ɵɵFactoryDef; + static ɵdir: i0.ɵɵDirectiveDefWithMeta; +} +export declare class QuxPipe implements PipeTransform { + transform(): void; + static ɵfac: i0.ɵɵFactoryDef; + static ɵpipe: i0.ɵɵPipeDefWithMeta; +} +export declare class FooModule { + static ɵfac: i0.ɵɵFactoryDef; + static ɵmod: i0.ɵɵNgModuleDefWithMeta; + static ɵinj: i0.ɵɵInjectorDef; +} + +/**************************************************************************************************** + * PARTIAL FILE: providers.js + ****************************************************************************************************/ +import { Injectable, InjectionToken, NgModule } from '@angular/core'; +import * as i0 from "@angular/core"; +export class Thing { +} +Thing.ɵfac = function Thing_Factory(t) { return new (t || Thing)(); }; +Thing.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: Thing, factory: Thing.ɵfac }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Thing, [{ + type: Injectable + }], null, null); })(); +export class BaseService { + constructor(thing) { + this.thing = thing; + } + ; +} +BaseService.ɵfac = function BaseService_Factory(t) { return new (t || BaseService)(i0.ɵɵinject(Thing)); }; +BaseService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: BaseService, factory: BaseService.ɵfac }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseService, [{ + type: Injectable + }], function () { return [{ type: Thing }]; }, null); })(); +export class ChildService extends BaseService { +} +ChildService.ɵfac = function ChildService_Factory(t) { return ɵChildService_BaseFactory(t || ChildService); }; +ChildService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ChildService, factory: ChildService.ɵfac }); +const ɵChildService_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ChildService); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ChildService, [{ + type: Injectable + }], null, null); })(); +const MY_TOKEN = new InjectionToken('MY_TOKEN'); +export class FooModule { +} +FooModule.ɵfac = function FooModule_Factory(t) { return new (t || FooModule)(); }; +FooModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: FooModule }); +FooModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: FooModule, providers: [ + Thing, + BaseService, + ChildService, + { provide: MY_TOKEN, useFactory: (child) => ({ child }), deps: [ChildService] }, + ] }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FooModule, [{ + type: NgModule, + args: [{ + providers: [ + Thing, + BaseService, + ChildService, + { provide: MY_TOKEN, useFactory: (child) => ({ child }), deps: [ChildService] }, + ] + }] + }], null, null); })(); + +/**************************************************************************************************** + * PARTIAL FILE: providers.d.ts + ****************************************************************************************************/ +import * as i0 from "@angular/core"; +export declare class Thing { + static ɵfac: i0.ɵɵFactoryDef; + static ɵprov: i0.ɵɵInjectableDef; +} +export declare class BaseService { + protected thing: Thing; + constructor(thing: Thing); + static ɵfac: i0.ɵɵFactoryDef; + static ɵprov: i0.ɵɵInjectableDef; +} +export declare class ChildService extends BaseService { + static ɵfac: i0.ɵɵFactoryDef; + static ɵprov: i0.ɵɵInjectableDef; +} +export declare class FooModule { + static ɵfac: i0.ɵɵFactoryDef; + static ɵmod: i0.ɵɵNgModuleDefWithMeta; + static ɵinj: i0.ɵɵInjectorDef; +} + +/**************************************************************************************************** + * PARTIAL FILE: imports_exports.js + ****************************************************************************************************/ +import { Component, NgModule } from '@angular/core'; +import * as i0 from "@angular/core"; +export class A1Component { +} +A1Component.ɵfac = function A1Component_Factory(t) { return new (t || A1Component)(); }; +A1Component.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: A1Component, selector: "a1", ngImport: i0, template: 'A1', isInline: true }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(A1Component, [{ + type: Component, + args: [{ selector: 'a1', template: 'A1' }] + }], null, null); })(); +export class A2Component { +} +A2Component.ɵfac = function A2Component_Factory(t) { return new (t || A2Component)(); }; +A2Component.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: A2Component, selector: "a2", ngImport: i0, template: 'A2', isInline: true }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(A2Component, [{ + type: Component, + args: [{ selector: 'a2', template: 'A2' }] + }], null, null); })(); +export class AModule { +} +AModule.ɵfac = function AModule_Factory(t) { return new (t || AModule)(); }; +AModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AModule, declarations: [A1Component, A2Component], exports: [A1Component, A2Component] }); +AModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AModule }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AModule, [{ + type: NgModule, + args: [{ declarations: [A1Component, A2Component], exports: [A1Component, A2Component] }] + }], null, null); })(); +export class B1Component { +} +B1Component.ɵfac = function B1Component_Factory(t) { return new (t || B1Component)(); }; +B1Component.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: B1Component, selector: "b1", ngImport: i0, template: 'B1', isInline: true }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(B1Component, [{ + type: Component, + args: [{ selector: 'b1', template: 'B1' }] + }], null, null); })(); +export class B2Component { +} +B2Component.ɵfac = function B2Component_Factory(t) { return new (t || B2Component)(); }; +B2Component.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: B2Component, selector: "b2", ngImport: i0, template: 'B2', isInline: true }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(B2Component, [{ + type: Component, + args: [{ selector: 'b2', template: 'B2' }] + }], null, null); })(); +export class BModule { +} +BModule.ɵfac = function BModule_Factory(t) { return new (t || BModule)(); }; +BModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: BModule, declarations: [B1Component, B2Component], exports: [AModule] }); +BModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: BModule, imports: [AModule] }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BModule, [{ + type: NgModule, + args: [{ declarations: [B1Component, B2Component], exports: [AModule] }] + }], null, null); })(); +export class AppModule { +} +AppModule.ɵfac = function AppModule_Factory(t) { return new (t || AppModule)(); }; +AppModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AppModule, imports: [BModule] }); +AppModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AppModule, imports: [[BModule]] }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AppModule, [{ + type: NgModule, + args: [{ imports: [BModule] }] + }], null, null); })(); + +/**************************************************************************************************** + * PARTIAL FILE: imports_exports.d.ts + ****************************************************************************************************/ +import * as i0 from "@angular/core"; +export declare class A1Component { + static ɵfac: i0.ɵɵFactoryDef; + static ɵcmp: i0.ɵɵComponentDefWithMeta; +} +export declare class A2Component { + static ɵfac: i0.ɵɵFactoryDef; + static ɵcmp: i0.ɵɵComponentDefWithMeta; +} +export declare class AModule { + static ɵfac: i0.ɵɵFactoryDef; + static ɵmod: i0.ɵɵNgModuleDefWithMeta; + static ɵinj: i0.ɵɵInjectorDef; +} +export declare class B1Component { + static ɵfac: i0.ɵɵFactoryDef; + static ɵcmp: i0.ɵɵComponentDefWithMeta; +} +export declare class B2Component { + static ɵfac: i0.ɵɵFactoryDef; + static ɵcmp: i0.ɵɵComponentDefWithMeta; +} +export declare class BModule { + static ɵfac: i0.ɵɵFactoryDef; + static ɵmod: i0.ɵɵNgModuleDefWithMeta; + static ɵinj: i0.ɵɵInjectorDef; +} +export declare class AppModule { + static ɵfac: i0.ɵɵFactoryDef; + static ɵmod: i0.ɵɵNgModuleDefWithMeta; + static ɵinj: i0.ɵɵInjectorDef; +} + +/**************************************************************************************************** + * PARTIAL FILE: imports_exports_jit_mode.js + ****************************************************************************************************/ +import { Component, NgModule } from '@angular/core'; +import * as i0 from "@angular/core"; +export class A1Component { +} +A1Component.ɵfac = function A1Component_Factory(t) { return new (t || A1Component)(); }; +A1Component.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: A1Component, selector: "a1", ngImport: i0, template: 'A1', isInline: true }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(A1Component, [{ + type: Component, + args: [{ selector: 'a1', template: 'A1' }] + }], null, null); })(); +export class A2Component { +} +A2Component.ɵfac = function A2Component_Factory(t) { return new (t || A2Component)(); }; +A2Component.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: A2Component, selector: "a2", ngImport: i0, template: 'A2', isInline: true }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(A2Component, [{ + type: Component, + args: [{ selector: 'a2', template: 'A2' }] + }], null, null); })(); +export class AModule { +} +AModule.ɵfac = function AModule_Factory(t) { return new (t || AModule)(); }; +AModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AModule, declarations: [A1Component, A2Component], exports: [A1Component, A2Component] }); +AModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AModule }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AModule, [{ + type: NgModule, + args: [{ declarations: [A1Component, A2Component], exports: [A1Component, A2Component] }] + }], null, null); })(); +export class B1Component { +} +B1Component.ɵfac = function B1Component_Factory(t) { return new (t || B1Component)(); }; +B1Component.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: B1Component, selector: "b1", ngImport: i0, template: 'B1', isInline: true }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(B1Component, [{ + type: Component, + args: [{ selector: 'b1', template: 'B1' }] + }], null, null); })(); +export class B2Component { +} +B2Component.ɵfac = function B2Component_Factory(t) { return new (t || B2Component)(); }; +B2Component.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: B2Component, selector: "b2", ngImport: i0, template: 'B2', isInline: true }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(B2Component, [{ + type: Component, + args: [{ selector: 'b2', template: 'B2' }] + }], null, null); })(); +export class BModule { +} +BModule.ɵfac = function BModule_Factory(t) { return new (t || BModule)(); }; +BModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: BModule, declarations: [B1Component, B2Component], exports: [AModule] }); +BModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: BModule, imports: [AModule] }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BModule, [{ + type: NgModule, + args: [{ declarations: [B1Component, B2Component], exports: [AModule] }] + }], null, null); })(); +export class AppModule { +} +AppModule.ɵfac = function AppModule_Factory(t) { return new (t || AppModule)(); }; +AppModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AppModule, imports: [BModule] }); +AppModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AppModule, imports: [[BModule]] }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AppModule, [{ + type: NgModule, + args: [{ imports: [BModule] }] + }], null, null); })(); + +/**************************************************************************************************** + * PARTIAL FILE: imports_exports_jit_mode.d.ts + ****************************************************************************************************/ +import * as i0 from "@angular/core"; +export declare class A1Component { + static ɵfac: i0.ɵɵFactoryDef; + static ɵcmp: i0.ɵɵComponentDefWithMeta; +} +export declare class A2Component { + static ɵfac: i0.ɵɵFactoryDef; + static ɵcmp: i0.ɵɵComponentDefWithMeta; +} +export declare class AModule { + static ɵfac: i0.ɵɵFactoryDef; + static ɵmod: i0.ɵɵNgModuleDefWithMeta; + static ɵinj: i0.ɵɵInjectorDef; +} +export declare class B1Component { + static ɵfac: i0.ɵɵFactoryDef; + static ɵcmp: i0.ɵɵComponentDefWithMeta; +} +export declare class B2Component { + static ɵfac: i0.ɵɵFactoryDef; + static ɵcmp: i0.ɵɵComponentDefWithMeta; +} +export declare class BModule { + static ɵfac: i0.ɵɵFactoryDef; + static ɵmod: i0.ɵɵNgModuleDefWithMeta; + static ɵinj: i0.ɵɵInjectorDef; +} +export declare class AppModule { + static ɵfac: i0.ɵɵFactoryDef; + static ɵmod: i0.ɵɵNgModuleDefWithMeta; + static ɵinj: i0.ɵɵInjectorDef; +} + +/**************************************************************************************************** + * PARTIAL FILE: no_aot.js + ****************************************************************************************************/ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +import { NgModule } from '@angular/core'; +let NoAotModule = class NoAotModule { +}; +NoAotModule = __decorate([ + NgModule({ jit: true }) +], NoAotModule); +export { NoAotModule }; + +/**************************************************************************************************** + * PARTIAL FILE: no_aot.d.ts + ****************************************************************************************************/ +export declare class NoAotModule { +} + +/**************************************************************************************************** + * PARTIAL FILE: inheritance.js + ****************************************************************************************************/ +import { Injectable, NgModule } from '@angular/core'; +import * as i0 from "@angular/core"; +export class Service { +} +Service.ɵfac = function Service_Factory(t) { return new (t || Service)(); }; +Service.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: Service, factory: Service.ɵfac }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Service, [{ + type: Injectable + }], null, null); })(); +export class BaseModule { + constructor(service) { + this.service = service; + } +} +BaseModule.ɵfac = function BaseModule_Factory(t) { return new (t || BaseModule)(i0.ɵɵinject(Service)); }; +BaseModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: BaseModule }); +BaseModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: BaseModule, providers: [Service] }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseModule, [{ + type: NgModule, + args: [{ providers: [Service] }] + }], function () { return [{ type: Service }]; }, null); })(); +export class BasicModule extends BaseModule { +} +BasicModule.ɵfac = function BasicModule_Factory(t) { return ɵBasicModule_BaseFactory(t || BasicModule); }; +BasicModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: BasicModule }); +BasicModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: BasicModule }); +const ɵBasicModule_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(BasicModule); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BasicModule, [{ + type: NgModule, + args: [{}] + }], null, null); })(); + +/**************************************************************************************************** + * PARTIAL FILE: inheritance.d.ts + ****************************************************************************************************/ +import * as i0 from "@angular/core"; +export declare class Service { + static ɵfac: i0.ɵɵFactoryDef; + static ɵprov: i0.ɵɵInjectableDef; +} +export declare class BaseModule { + private service; + constructor(service: Service); + static ɵfac: i0.ɵɵFactoryDef; + static ɵmod: i0.ɵɵNgModuleDefWithMeta; + static ɵinj: i0.ɵɵInjectorDef; +} +export declare class BasicModule extends BaseModule { + static ɵfac: i0.ɵɵFactoryDef; + static ɵmod: i0.ɵɵNgModuleDefWithMeta; + static ɵinj: i0.ɵɵInjectorDef; +} + +/**************************************************************************************************** + * PARTIAL FILE: forward_refs.js + ****************************************************************************************************/ +import { NgModule } from '@angular/core'; +import * as i0 from "@angular/core"; +export function provideModule() { + return { ngModule: ForwardModule }; +} +export class TestModule { +} +TestModule.ɵfac = function TestModule_Factory(t) { return new (t || TestModule)(); }; +TestModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TestModule, imports: function () { return [ForwardModule]; } }); +TestModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TestModule, imports: [[provideModule()]] }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TestModule, [{ + type: NgModule, + args: [{ imports: [provideModule()] }] + }], null, null); })(); +export class ForwardModule { +} +ForwardModule.ɵfac = function ForwardModule_Factory(t) { return new (t || ForwardModule)(); }; +ForwardModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: ForwardModule }); +ForwardModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: ForwardModule }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ForwardModule, [{ + type: NgModule + }], null, null); })(); + +/**************************************************************************************************** + * PARTIAL FILE: forward_refs.d.ts + ****************************************************************************************************/ +import { ModuleWithProviders } from '@angular/core'; +import * as i0 from "@angular/core"; +export declare function provideModule(): ModuleWithProviders; +export declare class TestModule { + static ɵfac: i0.ɵɵFactoryDef; + static ɵmod: i0.ɵɵNgModuleDefWithMeta; + static ɵinj: i0.ɵɵInjectorDef; +} +export declare class ForwardModule { + static ɵfac: i0.ɵɵFactoryDef; + static ɵmod: i0.ɵɵNgModuleDefWithMeta; + static ɵinj: i0.ɵɵInjectorDef; +} + diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/TEST_CASES.json b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/TEST_CASES.json new file mode 100644 index 00000000000..5abbc6f7e4c --- /dev/null +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/TEST_CASES.json @@ -0,0 +1,149 @@ +{ + "$schema": "../../test_case_schema.json", + "cases": [ + { + "description": "should define a basic NgModule", + "inputFiles": [ + "basic.ts" + ], + "expectations": [ + { + "failureMessage": "Invalid NgModule/Injector definition", + "files": [ + "basic.js" + ] + } + ] + }, + { + "description": "should define an NgModule with declarations and bootstrap", + "inputFiles": [ + "declarations.ts" + ], + "expectations": [ + { + "failureMessage": "Invalid NgModule/Injector definition", + "files": [ + "declarations.js" + ] + } + ] + }, + { + "description": "should define an NgModule with declarations and bootstrap (jit mode)", + "inputFiles": [ + "declarations_jit_mode.ts" + ], + "expectations": [ + { + "failureMessage": "Invalid NgModule/Injector definition", + "files": [ + "declarations_jit_mode.js" + ] + } + ], + "compilationModeFilter": [ + "linked compile" + ], + "angularCompilerOptions": { + "linkerJitMode": true + } + }, + { + "description": "should define an NgModule and injector with providers", + "inputFiles": [ + "providers.ts" + ], + "expectations": [ + { + "failureMessage": "Invalid NgModule/Injector definition", + "files": [ + "providers.js" + ] + } + ] + }, + { + "description": "should define NgModules with imports and exports", + "inputFiles": [ + "imports_exports.ts" + ], + "expectations": [ + { + "failureMessage": "Invalid NgModule/Injector definition", + "files": [ + "imports_exports.js" + ] + } + ] + }, + { + "description": "should define NgModules with imports and exports (jit mode)", + "inputFiles": [ + "imports_exports_jit_mode.ts" + ], + "expectations": [ + { + "failureMessage": "Invalid NgModule/Injector definition", + "files": [ + "imports_exports_jit_mode.js" + ] + } + ], + "compilationModeFilter": [ + "linked compile" + ], + "angularCompilerOptions": { + "linkerJitMode": true + } + }, + { + "description": "should not process NgModules that are marked `jit`", + "inputFiles": [ + "no_aot.ts" + ], + "expectations": [ + { + "failureMessage": "Invalid NgModule/Injector definition", + "files": [ + "no_aot.js" + ] + } + ] + }, + { + "description": "should handle NgModules that extend other classes", + "inputFiles": [ + "inheritance.ts" + ], + "expectations": [ + { + "failureMessage": "Invalid NgModule/Injector definition", + "files": [ + "inheritance.js" + ] + } + ] + }, + { + "description": "should handle NgModules with forward refs", + "inputFiles": [ + "forward_refs.ts" + ], + "expectations": [ + { + "failureMessage": "Invalid NgModule/Injector definition", + "files": [ + "forward_refs.js" + ] + } + ], + "compilationModeFilter": [ + "linked compile" + ], + "angularCompilerOptions": { + "linkerJitMode": true + } + } + ] +} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/basic.js b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/basic.js new file mode 100644 index 00000000000..295684f706e --- /dev/null +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/basic.js @@ -0,0 +1,3 @@ +BasicModule.ɵfac = function BasicModule_Factory(t) { return new (t || BasicModule)(); }; +BasicModule.ɵmod = /*@__PURE__*/ $i0$.ɵɵdefineNgModule({type: BasicModule, id: 'BasicModuleId'}); +BasicModule.ɵinj = /*@__PURE__*/ $i0$.ɵɵdefineInjector({}); diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/basic.ts b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/basic.ts new file mode 100644 index 00000000000..142a6fce6f2 --- /dev/null +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/basic.ts @@ -0,0 +1,5 @@ +import {NgModule, NO_ERRORS_SCHEMA} from '@angular/core'; + +@NgModule({id: 'BasicModuleId', schemas: [NO_ERRORS_SCHEMA]}) +export class BasicModule { +} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/declarations.js b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/declarations.js new file mode 100644 index 00000000000..ddf08d6c2bf --- /dev/null +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/declarations.js @@ -0,0 +1,17 @@ +FooComponent.ɵfac… +FooComponent.ɵcmp… + +BarDirective.ɵfac… +BarDirective.ɵdir… + +QuxPipe.ɵfac… +QuxPipe.ɵpipe… + +FooModule.ɵfac = function FooModule_Factory(t) { return new (t || FooModule)(); }; +FooModule.ɵmod = /*@__PURE__*/ $i0$.ɵɵdefineNgModule({type: FooModule, bootstrap: [FooComponent]}); +FooModule.ɵinj = /*@__PURE__*/ $i0$.ɵɵdefineInjector({}); +… +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FooModule, [{ + type: NgModule, + args: [{ declarations: [FooComponent, BarDirective, QuxPipe], bootstrap: [FooComponent] }] +}], null, null); })(); diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/declarations.ts b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/declarations.ts new file mode 100644 index 00000000000..468a9885cc8 --- /dev/null +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/declarations.ts @@ -0,0 +1,19 @@ +import {Component, Directive, NgModule, Pipe, PipeTransform} from '@angular/core'; + +@Component({selector: 'foo', template: '
Hello, {{name}}!
'}) +export class FooComponent { + name = 'World'; +} + +@Directive({selector: '[bar]'}) +export class BarDirective { +} + +@Pipe({name: 'qux'}) +export class QuxPipe implements PipeTransform { + transform() {} +} + +@NgModule({declarations: [FooComponent, BarDirective, QuxPipe], bootstrap: [FooComponent]}) +export class FooModule { +} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/declarations_jit_mode.js b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/declarations_jit_mode.js new file mode 100644 index 00000000000..1c9514eae5f --- /dev/null +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/declarations_jit_mode.js @@ -0,0 +1,17 @@ +FooComponent.ɵfac… +FooComponent.ɵcmp… + +BarDirective.ɵfac… +BarDirective.ɵdir… + +QuxPipe.ɵfac… +QuxPipe.ɵpipe… + +FooModule.ɵfac = function FooModule_Factory(t) { return new (t || FooModule)(); }; +FooModule.ɵmod = /*@__PURE__*/ $i0$.ɵɵdefineNgModule({type: FooModule, bootstrap: [FooComponent], declarations: [FooComponent, BarDirective, QuxPipe]}); +FooModule.ɵinj = /*@__PURE__*/ $i0$.ɵɵdefineInjector({}); +… +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FooModule, [{ + type: NgModule, + args: [{ declarations: [FooComponent, BarDirective, QuxPipe], bootstrap: [FooComponent] }] +}], null, null); })(); diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/declarations_jit_mode.ts b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/declarations_jit_mode.ts new file mode 100644 index 00000000000..468a9885cc8 --- /dev/null +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/declarations_jit_mode.ts @@ -0,0 +1,19 @@ +import {Component, Directive, NgModule, Pipe, PipeTransform} from '@angular/core'; + +@Component({selector: 'foo', template: '
Hello, {{name}}!
'}) +export class FooComponent { + name = 'World'; +} + +@Directive({selector: '[bar]'}) +export class BarDirective { +} + +@Pipe({name: 'qux'}) +export class QuxPipe implements PipeTransform { + transform() {} +} + +@NgModule({declarations: [FooComponent, BarDirective, QuxPipe], bootstrap: [FooComponent]}) +export class FooModule { +} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/forward_refs.js b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/forward_refs.js new file mode 100644 index 00000000000..2cef816f19e --- /dev/null +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/forward_refs.js @@ -0,0 +1,13 @@ +export function provideModule() { + return { ngModule: ForwardModule }; +} +… +export class TestModule {} +TestModule.ɵfac = function TestModule_Factory(t) { return new (t || TestModule)(); }; +TestModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: TestModule, imports: function () { return [ForwardModule]; } }); +TestModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [[provideModule()]] }); +… +export class ForwardModule {} +ForwardModule.ɵfac = function ForwardModule_Factory(t) { return new (t || ForwardModule)(); }; +ForwardModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ForwardModule }); +ForwardModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/forward_refs.ts b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/forward_refs.ts new file mode 100644 index 00000000000..1a05a3d5b5c --- /dev/null +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/forward_refs.ts @@ -0,0 +1,13 @@ +import {ModuleWithProviders, NgModule} from '@angular/core'; + +export function provideModule(): ModuleWithProviders { + return {ngModule: ForwardModule}; +} + +@NgModule({imports: [provideModule()]}) +export class TestModule { +} + +@NgModule() +export class ForwardModule { +} \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/imports_exports.js b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/imports_exports.js new file mode 100644 index 00000000000..f734b6d291f --- /dev/null +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/imports_exports.js @@ -0,0 +1,31 @@ +export class AModule {} +AModule.ɵfac = function AModule_Factory(t) { return new (t || AModule)(); }; +AModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: AModule }); +AModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); +… +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AModule, [{ + type: NgModule, + args: [{ declarations: [A1Component, A2Component], exports: [A1Component, A2Component] }] +}], null, null); })(); +… + +export class BModule {} +BModule.ɵfac = function BModule_Factory(t) { return new (t || BModule)(); }; +BModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: BModule }); +BModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [AModule] }); +… +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BModule, [{ + type: NgModule, + args: [{ declarations: [B1Component, B2Component], exports: [AModule] }] + }], null, null); })(); +… + +export class AppModule {} +AppModule.ɵfac = function AppModule_Factory(t) { return new (t || AppModule)(); }; +AppModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: AppModule }); +AppModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [[BModule]] }); +… +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AppModule, [{ + type: NgModule, + args: [{ imports: [BModule] }] +}], null, null); })(); \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/imports_exports.ts b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/imports_exports.ts new file mode 100644 index 00000000000..d08870eb0d0 --- /dev/null +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/imports_exports.ts @@ -0,0 +1,29 @@ +import {Component, NgModule} from '@angular/core'; + +@Component({selector: 'a1', template: 'A1'}) +export class A1Component { +} + +@Component({selector: 'a2', template: 'A2'}) +export class A2Component { +} + +@NgModule({declarations: [A1Component, A2Component], exports: [A1Component, A2Component]}) +export class AModule { +} + +@Component({selector: 'b1', template: 'B1'}) +export class B1Component { +} + +@Component({selector: 'b2', template: 'B2'}) +export class B2Component { +} + +@NgModule({declarations: [B1Component, B2Component], exports: [AModule]}) +export class BModule { +} + +@NgModule({imports: [BModule]}) +export class AppModule { +} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/imports_exports_jit_mode.js b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/imports_exports_jit_mode.js new file mode 100644 index 00000000000..fa72b05a85c --- /dev/null +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/imports_exports_jit_mode.js @@ -0,0 +1,31 @@ +export class AModule {} +AModule.ɵfac = function AModule_Factory(t) { return new (t || AModule)(); }; +AModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: AModule, declarations: [A1Component, A2Component], exports: [A1Component, A2Component] }); +AModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); +… +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AModule, [{ + type: NgModule, + args: [{ declarations: [A1Component, A2Component], exports: [A1Component, A2Component] }] +}], null, null); })(); +… + +export class BModule {} +BModule.ɵfac = function BModule_Factory(t) { return new (t || BModule)(); }; +BModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: BModule, declarations: [B1Component, B2Component], exports: [AModule] }); +BModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [AModule] }); +… +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BModule, [{ + type: NgModule, + args: [{ declarations: [B1Component, B2Component], exports: [AModule] }] + }], null, null); })(); +… + +export class AppModule {} +AppModule.ɵfac = function AppModule_Factory(t) { return new (t || AppModule)(); }; +AppModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: AppModule, imports: [BModule] }); +AppModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [[BModule]] }); +… +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AppModule, [{ + type: NgModule, + args: [{ imports: [BModule] }] +}], null, null); })(); \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/imports_exports_jit_mode.ts b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/imports_exports_jit_mode.ts new file mode 100644 index 00000000000..d08870eb0d0 --- /dev/null +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/imports_exports_jit_mode.ts @@ -0,0 +1,29 @@ +import {Component, NgModule} from '@angular/core'; + +@Component({selector: 'a1', template: 'A1'}) +export class A1Component { +} + +@Component({selector: 'a2', template: 'A2'}) +export class A2Component { +} + +@NgModule({declarations: [A1Component, A2Component], exports: [A1Component, A2Component]}) +export class AModule { +} + +@Component({selector: 'b1', template: 'B1'}) +export class B1Component { +} + +@Component({selector: 'b2', template: 'B2'}) +export class B2Component { +} + +@NgModule({declarations: [B1Component, B2Component], exports: [AModule]}) +export class BModule { +} + +@NgModule({imports: [BModule]}) +export class AppModule { +} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/inheritance.js b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/inheritance.js new file mode 100644 index 00000000000..12409342cd1 --- /dev/null +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/inheritance.js @@ -0,0 +1,22 @@ +export class BaseModule { + constructor(service) { this.service = service; } +} +BaseModule.ɵfac = function BaseModule_Factory(t) { return new (t || BaseModule)(i0.ɵɵinject(Service)); }; +BaseModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: BaseModule }); +BaseModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [Service] }); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseModule, [{ + type: NgModule, + args: [{ providers: [Service] }] +}], function () { return [{ type: Service }]; }, null); })(); +… +export class BasicModule extends BaseModule { +} +BasicModule.ɵfac = function BasicModule_Factory(t) { return ɵBasicModule_BaseFactory(t || BasicModule); }; +BasicModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: BasicModule }); +BasicModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); +const ɵBasicModule_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(BasicModule); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BasicModule, [{ + type: NgModule, + args: [{}] +}], null, null); })(); +… \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/inheritance.ts b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/inheritance.ts new file mode 100644 index 00000000000..54390b1549e --- /dev/null +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/inheritance.ts @@ -0,0 +1,14 @@ +import {Injectable, NgModule} from '@angular/core'; + +@Injectable() +export class Service { +} + +@NgModule({providers: [Service]}) +export class BaseModule { + constructor(private service: Service) {} +} + +@NgModule({}) +export class BasicModule extends BaseModule { +} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/no_aot.js b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/no_aot.js new file mode 100644 index 00000000000..4bf827c18ac --- /dev/null +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/no_aot.js @@ -0,0 +1,4 @@ +let NoAotModule = class NoAotModule {}; +NoAotModule = __decorate([ + NgModule({ jit: true }) +], NoAotModule); \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/no_aot.ts b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/no_aot.ts new file mode 100644 index 00000000000..bce5d18375a --- /dev/null +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/no_aot.ts @@ -0,0 +1,5 @@ +import {NgModule} from '@angular/core'; + +@NgModule({jit: true}) +export class NoAotModule { +} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/providers.js b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/providers.js new file mode 100644 index 00000000000..8854c8cd80b --- /dev/null +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/providers.js @@ -0,0 +1,21 @@ +export class FooModule {} +FooModule.ɵfac = function FooModule_Factory(t) { return new (t || FooModule)(); }; +FooModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: FooModule }); +FooModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [ + Thing, + BaseService, + ChildService, + { provide: MY_TOKEN, useFactory: …child… => ({ child }), deps: [ChildService] }… + ] +}); +(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FooModule, [{ + type: NgModule, + args: [{ + providers: [ + Thing, + BaseService, + ChildService, + { provide: MY_TOKEN, useFactory: …child… => ({ child }), deps: [ChildService] }… + ] + }] +}], null, null); })(); diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/providers.ts b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/providers.ts new file mode 100644 index 00000000000..f1560729065 --- /dev/null +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/ng_modules/providers.ts @@ -0,0 +1,27 @@ +import {Injectable, InjectionToken, NgModule} from '@angular/core'; + +@Injectable() +export class Thing { +} + +@Injectable() +export class BaseService { + constructor(protected thing: Thing) {}; +} + +@Injectable() +export class ChildService extends BaseService { +} + +const MY_TOKEN = new InjectionToken('MY_TOKEN'); + +@NgModule({ + providers: [ + Thing, + BaseService, + ChildService, + {provide: MY_TOKEN, useFactory: (child: ChildService) => ({child}), deps: [ChildService]}, + ] +}) +export class FooModule { +} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/GOLDEN_PARTIAL.js index bd5eb33bafe..b431ff126ef 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/GOLDEN_PARTIAL.js @@ -33,9 +33,8 @@ TodoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", export class TodoModule { } TodoModule.ɵfac = function TodoModule_Factory(t) { return new (t || TodoModule)(); }; -TodoModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: TodoModule }); -TodoModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(TodoModule, { declarations: [TodoComponent, MyApp] }); })(); +TodoModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TodoModule, declarations: [TodoComponent, MyApp] }); +TodoModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TodoModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TodoModule, [{ type: NgModule, args: [{ diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/animations/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/animations/GOLDEN_PARTIAL.js index 99a4efed40a..203e455682c 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/animations/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/animations/GOLDEN_PARTIAL.js @@ -14,9 +14,8 @@ MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: My export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyApp] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyApp] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyApp] }] @@ -57,9 +56,8 @@ MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: My export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyApp] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyApp] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyApp] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/hello_world/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/hello_world/GOLDEN_PARTIAL.js index 9a196d5d378..e7d227745b7 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/hello_world/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/hello_world/GOLDEN_PARTIAL.js @@ -26,9 +26,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/interpolations/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/interpolations/GOLDEN_PARTIAL.js index d3111041108..042b8cc42ff 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/interpolations/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/interpolations/GOLDEN_PARTIAL.js @@ -20,9 +20,8 @@ MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: My export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyApp] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyApp] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyApp] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/attribute_bindings/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/attribute_bindings/GOLDEN_PARTIAL.js index 679861f40f0..3918059f50a 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/attribute_bindings/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/attribute_bindings/GOLDEN_PARTIAL.js @@ -172,9 +172,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyMod { } MyMod.ɵfac = function MyMod_Factory(t) { return new (t || MyMod)(); }; -MyMod.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyMod }); -MyMod.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyMod, { declarations: [MyComponent, CustomEl] }); })(); +MyMod.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyMod, declarations: [MyComponent, CustomEl] }); +MyMod.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyMod }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyMod, [{ type: NgModule, args: [{ declarations: [MyComponent, CustomEl] }] @@ -273,9 +272,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -341,9 +339,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/host_bindings/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/host_bindings/GOLDEN_PARTIAL.js index d8eecdd4b33..cfaff9f2093 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/host_bindings/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/host_bindings/GOLDEN_PARTIAL.js @@ -20,9 +20,8 @@ HostBindingDir.ɵdir = i0.ɵɵngDeclareDirective({ version: "0.0.0-PLACEHOLDER", export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [HostBindingDir] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [HostBindingDir] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [HostBindingDir] }] @@ -59,9 +58,8 @@ HostBindingDir.ɵdir = i0.ɵɵngDeclareDirective({ version: "0.0.0-PLACEHOLDER", export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [HostBindingDir] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [HostBindingDir] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [HostBindingDir] }] @@ -103,9 +101,8 @@ HostBindingComp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER" export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [HostBindingComp] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [HostBindingComp] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [HostBindingComp] }] @@ -145,9 +142,8 @@ HostAttributeDir.ɵdir = i0.ɵɵngDeclareDirective({ version: "0.0.0-PLACEHOLDER export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [HostAttributeDir] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [HostAttributeDir] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [HostAttributeDir] }] @@ -184,9 +180,8 @@ HostAttributeDir.ɵdir = i0.ɵɵngDeclareDirective({ version: "0.0.0-PLACEHOLDER export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [HostAttributeDir] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [HostAttributeDir] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [HostAttributeDir] }] @@ -243,9 +238,8 @@ HostAttributeDir.ɵdir = i0.ɵɵngDeclareDirective({ version: "0.0.0-PLACEHOLDER export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [HostAttributeComp, HostAttributeDir] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [HostAttributeComp, HostAttributeDir] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [HostAttributeComp, HostAttributeDir] }] @@ -632,9 +626,8 @@ HostBindingDir.ɵdir = i0.ɵɵngDeclareDirective({ version: "0.0.0-PLACEHOLDER", export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [HostBindingDir] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [HostBindingDir] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [HostBindingDir] }] @@ -682,9 +675,8 @@ HostBindingDir.ɵdir = i0.ɵɵngDeclareDirective({ version: "0.0.0-PLACEHOLDER", export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [HostBindingDir] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [HostBindingDir] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [HostBindingDir] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/non_bindable_behavior/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/non_bindable_behavior/GOLDEN_PARTIAL.js index c6495fb2aa5..62c19f9701d 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/non_bindable_behavior/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/non_bindable_behavior/GOLDEN_PARTIAL.js @@ -30,9 +30,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -83,9 +82,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -136,9 +134,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -185,9 +182,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/property_bindings/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/property_bindings/GOLDEN_PARTIAL.js index bd1680d745a..b56b395681e 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/property_bindings/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/property_bindings/GOLDEN_PARTIAL.js @@ -17,9 +17,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -64,9 +63,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -131,9 +129,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -187,9 +184,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -246,9 +242,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyMod { } MyMod.ɵfac = function MyMod_Factory(t) { return new (t || MyMod)(); }; -MyMod.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyMod }); -MyMod.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyMod, { declarations: [MyComponent, AsyncPipe] }); })(); +MyMod.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyMod, declarations: [MyComponent, AsyncPipe] }); +MyMod.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyMod }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyMod, [{ type: NgModule, args: [{ declarations: [MyComponent, AsyncPipe] }] @@ -333,9 +328,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyMod { } MyMod.ɵfac = function MyMod_Factory(t) { return new (t || MyMod)(); }; -MyMod.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyMod }); -MyMod.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyMod, { declarations: [ButtonDir, MyComponent] }); })(); +MyMod.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyMod, declarations: [ButtonDir, MyComponent] }); +MyMod.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyMod }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyMod, [{ type: NgModule, args: [{ declarations: [ButtonDir, MyComponent] }] @@ -389,9 +383,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyMod { } MyMod.ɵfac = function MyMod_Factory(t) { return new (t || MyMod)(); }; -MyMod.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyMod }); -MyMod.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyMod, { declarations: [ButtonDir, MyComponent] }); })(); +MyMod.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyMod, declarations: [ButtonDir, MyComponent] }); +MyMod.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyMod }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyMod, [{ type: NgModule, args: [{ declarations: [ButtonDir, MyComponent] }] @@ -540,9 +533,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyMod { } MyMod.ɵfac = function MyMod_Factory(t) { return new (t || MyMod)(); }; -MyMod.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyMod }); -MyMod.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyMod, { declarations: [MyComponent, CustomEl, SpanDir] }); })(); +MyMod.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyMod, declarations: [MyComponent, CustomEl, SpanDir] }); +MyMod.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyMod }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyMod, [{ type: NgModule, args: [{ declarations: [MyComponent, CustomEl, SpanDir] }] @@ -613,9 +605,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyMod { } MyMod.ɵfac = function MyMod_Factory(t) { return new (t || MyMod)(); }; -MyMod.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyMod }); -MyMod.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyMod, { declarations: [MyComponent, SpanDir] }); })(); +MyMod.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyMod, declarations: [MyComponent, SpanDir] }); +MyMod.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyMod }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyMod, [{ type: NgModule, args: [{ declarations: [MyComponent, SpanDir] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/text_bindings/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/text_bindings/GOLDEN_PARTIAL.js index 490fd3871b6..a8082c0da6f 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/text_bindings/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/text_bindings/GOLDEN_PARTIAL.js @@ -22,9 +22,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/GOLDEN_PARTIAL.js index 5ab42b962d9..ff207b1e9a6 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/GOLDEN_PARTIAL.js @@ -37,9 +37,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [MyService] }); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, providers: [MyService] }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent], providers: [MyService] }] @@ -333,9 +332,8 @@ MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: My export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [Service] }); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyPipe, MyOtherPipe, MyApp] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyPipe, MyOtherPipe, MyApp] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, providers: [Service] }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyPipe, MyOtherPipe, MyApp], providers: [Service] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_directives/matching/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_directives/matching/GOLDEN_PARTIAL.js index 6017bea515e..af95f00a351 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_directives/matching/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_directives/matching/GOLDEN_PARTIAL.js @@ -22,9 +22,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [I18nDirective, MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [I18nDirective, MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [I18nDirective, MyComponent] }] @@ -88,9 +87,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [I18nDirective, I18nFooDirective, FooDirective, MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [I18nDirective, I18nFooDirective, FooDirective, MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [I18nDirective, I18nFooDirective, FooDirective, MyComponent] }] @@ -148,9 +146,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [SomeDirective, MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [SomeDirective, MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [SomeDirective, MyComponent] }] @@ -206,9 +203,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [DirectiveA, MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [DirectiveA, MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [DirectiveA, MyComponent] }] @@ -263,9 +259,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [DirectiveA, MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [DirectiveA, MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [DirectiveA, MyComponent] }] @@ -318,9 +313,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [SomeDirective, MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [SomeDirective, MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [SomeDirective, MyComponent] }] @@ -371,9 +365,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [SomeDirective, MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [SomeDirective, MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [SomeDirective, MyComponent] }] @@ -428,9 +421,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [SomeDirective, MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [SomeDirective, MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [SomeDirective, MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/GOLDEN_PARTIAL.js index 8efd3e1a7b4..78dfaa0def3 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/GOLDEN_PARTIAL.js @@ -35,9 +35,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -80,9 +79,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -128,9 +126,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -177,9 +174,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -235,9 +231,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [UppercasePipe, MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [UppercasePipe, MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [UppercasePipe, MyComponent] }] @@ -286,9 +281,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -341,9 +335,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -388,9 +381,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -436,9 +428,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -521,9 +512,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [UppercasePipe, MyComponent, DivDir] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [UppercasePipe, MyComponent, DivDir] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [UppercasePipe, MyComponent, DivDir] }] @@ -593,9 +583,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [UppercasePipe, MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [UppercasePipe, MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [UppercasePipe, MyComponent] }] @@ -660,9 +649,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [UppercasePipe, MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [UppercasePipe, MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [UppercasePipe, MyComponent] }] @@ -711,9 +699,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -757,9 +744,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -803,9 +789,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -852,9 +837,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/es5_support/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/es5_support/GOLDEN_PARTIAL.js index 79c48fc0ac1..badfd1ed1df 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/es5_support/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/es5_support/GOLDEN_PARTIAL.js @@ -22,12 +22,11 @@ var MyModule = /** @class */ (function () { function MyModule() { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; - MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); - MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); + MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); + MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); return MyModule; }()); export { MyModule }; -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/icu_logic/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/icu_logic/GOLDEN_PARTIAL.js index ba11fae64b1..68c4b9cfadb 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/icu_logic/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/icu_logic/GOLDEN_PARTIAL.js @@ -24,9 +24,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -73,9 +72,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -122,9 +120,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -183,9 +180,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -234,9 +230,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -292,9 +287,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -344,9 +338,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -403,9 +396,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -469,9 +461,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -531,9 +522,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -596,9 +586,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -656,9 +645,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -717,9 +705,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -783,9 +770,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -835,9 +821,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -890,9 +875,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/line_ending_normalization/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/line_ending_normalization/GOLDEN_PARTIAL.js index e75c634f305..a13e9b68866 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/line_ending_normalization/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/line_ending_normalization/GOLDEN_PARTIAL.js @@ -39,9 +39,8 @@ Some Message export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -103,9 +102,8 @@ Some Message export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -147,9 +145,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -191,9 +188,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -255,9 +251,8 @@ Some Message export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -319,9 +314,8 @@ Some Message export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -363,9 +357,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -407,9 +400,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/localize_legacy_message_ids/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/localize_legacy_message_ids/GOLDEN_PARTIAL.js index b9c34949928..fe49df1c623 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/localize_legacy_message_ids/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/localize_legacy_message_ids/GOLDEN_PARTIAL.js @@ -21,9 +21,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -66,9 +65,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/namespaces/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/namespaces/GOLDEN_PARTIAL.js index 1c6cbf7a1e8..70dfeea3663 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/namespaces/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/namespaces/GOLDEN_PARTIAL.js @@ -33,9 +33,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -90,9 +89,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/GOLDEN_PARTIAL.js index 9997722d8a8..64fe43ce463 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/GOLDEN_PARTIAL.js @@ -29,9 +29,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -74,9 +73,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -119,9 +117,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -163,9 +160,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -217,9 +213,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -272,9 +267,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -323,9 +317,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -386,9 +379,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent, AsyncPipe] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent, AsyncPipe] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent, AsyncPipe] }] @@ -457,9 +449,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent, UppercasePipe] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent, UppercasePipe] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent, UppercasePipe] }] @@ -552,9 +543,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent, UppercasePipe] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent, UppercasePipe] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent, UppercasePipe] }] @@ -636,9 +626,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [UppercasePipe, MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [UppercasePipe, MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [UppercasePipe, MyComponent] }] @@ -711,9 +700,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -760,9 +748,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -845,9 +832,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -890,9 +876,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -936,9 +921,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/ng-container_ng-template/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/ng-container_ng-template/GOLDEN_PARTIAL.js index 63bf11e8783..0386755c11e 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/ng-container_ng-template/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/ng-container_ng-template/GOLDEN_PARTIAL.js @@ -33,9 +33,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent, UppercasePipe] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent, UppercasePipe] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent, UppercasePipe] }] @@ -84,9 +83,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -148,9 +146,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent, UppercasePipe] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent, UppercasePipe] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent, UppercasePipe] }] @@ -205,9 +202,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -271,9 +267,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -321,9 +316,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -377,9 +371,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -424,9 +417,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -473,9 +465,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -522,9 +513,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -569,9 +559,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/self-closing_i18n_instructions/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/self-closing_i18n_instructions/GOLDEN_PARTIAL.js index e1926641be6..b7bdf26c66a 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/self-closing_i18n_instructions/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/self-closing_i18n_instructions/GOLDEN_PARTIAL.js @@ -21,9 +21,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -69,9 +68,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -117,9 +115,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -164,9 +161,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/whitespace_preserving_mode/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/whitespace_preserving_mode/GOLDEN_PARTIAL.js index 103636fe905..dab7b21996f 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/whitespace_preserving_mode/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/whitespace_preserving_mode/GOLDEN_PARTIAL.js @@ -28,9 +28,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_input_outputs/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_input_outputs/GOLDEN_PARTIAL.js index ae1c62490ae..962fb13bf3c 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_input_outputs/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_input_outputs/GOLDEN_PARTIAL.js @@ -24,9 +24,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -76,9 +75,8 @@ MyDirective.ɵdir = i0.ɵɵngDeclareDirective({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyDirective] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyDirective] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyDirective] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_listener/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_listener/GOLDEN_PARTIAL.js index 913277e1826..e3813aacd03 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_listener/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_listener/GOLDEN_PARTIAL.js @@ -15,9 +15,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -63,9 +62,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent, MyApp] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent, MyApp] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent, MyApp] }] @@ -121,9 +119,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -171,9 +168,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -215,9 +211,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -287,9 +282,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent, SomeComp] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent, SomeComp] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent, SomeComp] }] @@ -339,9 +333,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -522,9 +515,8 @@ Comp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type: Com export class MyMod { } MyMod.ɵfac = function MyMod_Factory(t) { return new (t || MyMod)(); }; -MyMod.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyMod }); -MyMod.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyMod, { declarations: [Comp, DivDir] }); })(); +MyMod.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyMod, declarations: [Comp, DivDir] }); +MyMod.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyMod }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyMod, [{ type: NgModule, args: [{ declarations: [Comp, DivDir] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_providers/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_providers/GOLDEN_PARTIAL.js index 57829249583..0c6572e4605 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_providers/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_providers/GOLDEN_PARTIAL.js @@ -26,9 +26,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -75,9 +74,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -120,9 +118,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -158,9 +155,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/binding_slots/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/binding_slots/GOLDEN_PARTIAL.js index 4bca68463da..72996edf09c 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/binding_slots/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/binding_slots/GOLDEN_PARTIAL.js @@ -40,9 +40,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -167,9 +166,8 @@ MyAppComp.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", type export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyAppComp, MyDir] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyAppComp, MyDir] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyAppComp, MyDir] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/class_bindings/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/class_bindings/GOLDEN_PARTIAL.js index 490478534ad..6733c7342aa 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/class_bindings/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/class_bindings/GOLDEN_PARTIAL.js @@ -17,9 +17,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -76,9 +75,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -131,9 +129,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -169,9 +166,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/GOLDEN_PARTIAL.js index 3caf6acbf5c..b2aaa797bbe 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/GOLDEN_PARTIAL.js @@ -14,9 +14,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -52,9 +51,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -102,9 +100,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -169,9 +166,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -226,9 +222,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent, MyAnimDir] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent, MyAnimDir] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent, MyAnimDir] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/GOLDEN_PARTIAL.js index e601b8855f5..65dac570e39 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/GOLDEN_PARTIAL.js @@ -20,9 +20,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -63,9 +62,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -106,9 +104,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/host_bindings/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/host_bindings/GOLDEN_PARTIAL.js index 006a2e4dc97..3231454ad7c 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/host_bindings/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/host_bindings/GOLDEN_PARTIAL.js @@ -36,9 +36,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -106,9 +105,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -177,9 +175,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -255,9 +252,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -336,9 +332,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -436,9 +431,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent, WidthDirective, HeightDirective, ClassDirective] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent, WidthDirective, HeightDirective, ClassDirective] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent, WidthDirective, HeightDirective, ClassDirective] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/GOLDEN_PARTIAL.js index 776acf9fc1c..e2ffb0c73bd 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/GOLDEN_PARTIAL.js @@ -18,9 +18,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -89,9 +88,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent, StylePipe, ClassPipe] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent, StylePipe, ClassPipe] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent, StylePipe, ClassPipe] }] @@ -177,9 +175,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent, PipePipe] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent, PipePipe] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent, PipePipe] }] @@ -245,9 +242,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/style_bindings/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/style_bindings/GOLDEN_PARTIAL.js index 2eb39a869e1..ed9f14a0b8b 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/style_bindings/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/style_bindings/GOLDEN_PARTIAL.js @@ -17,9 +17,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -109,9 +108,8 @@ MyComponentWithoutInterpolation.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0. export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponentWithInterpolation, MyComponentWithMuchosInterpolation, MyComponentWithoutInterpolation] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponentWithInterpolation, MyComponentWithMuchosInterpolation, MyComponentWithoutInterpolation] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ @@ -180,9 +178,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -230,9 +227,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -269,9 +265,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -307,9 +302,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_template/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_template/GOLDEN_PARTIAL.js index 207aedfd1d2..f4c362a7b92 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_template/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_template/GOLDEN_PARTIAL.js @@ -42,9 +42,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -94,9 +93,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -144,9 +142,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -194,9 +191,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -245,9 +241,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -300,9 +295,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -347,9 +341,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -388,9 +381,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -429,9 +421,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -575,9 +566,8 @@ AComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", typ export class AModule { } AModule.ɵfac = function AModule_Factory(t) { return new (t || AModule)(); }; -AModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: AModule }); -AModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AModule, { declarations: [AComponent] }); })(); +AModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AModule, declarations: [AComponent] }); +AModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AModule, [{ type: NgModule, args: [{ declarations: [AComponent] }] @@ -632,9 +622,8 @@ BComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", typ export class BModule { } BModule.ɵfac = function BModule_Factory(t) { return new (t || BModule)(); }; -BModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: BModule }); -BModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(BModule, { declarations: [BComponent] }); })(); +BModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: BModule, declarations: [BComponent] }); +BModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: BModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BModule, [{ type: NgModule, args: [{ declarations: [BComponent] }] @@ -711,9 +700,8 @@ BComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", typ export class AModule { } AModule.ɵfac = function AModule_Factory(t) { return new (t || AModule)(); }; -AModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: AModule }); -AModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AModule, { declarations: [AComponent, BComponent] }); })(); +AModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AModule, declarations: [AComponent, BComponent] }); +AModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AModule, [{ type: NgModule, args: [{ declarations: [AComponent, BComponent] }] @@ -777,9 +765,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -819,9 +806,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] @@ -862,9 +848,8 @@ MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ version: "0.0.0-PLACEHOLDER", ty export class MyModule { } MyModule.ɵfac = function MyModule_Factory(t) { return new (t || MyModule)(); }; -MyModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MyModule }); -MyModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MyModule, { declarations: [MyComponent] }); })(); +MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); +MyModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyModule, [{ type: NgModule, args: [{ declarations: [MyComponent] }] diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/GOLDEN_PARTIAL.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/GOLDEN_PARTIAL.js index e697dd78ad4..7f3c4507c2a 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/GOLDEN_PARTIAL.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/GOLDEN_PARTIAL.js @@ -354,9 +354,8 @@ PercentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ version: "0.0.0-PLACEHOLDER", ngImpo export class AppModule { } AppModule.ɵfac = function AppModule_Factory(t) { return new (t || AppModule)(); }; -AppModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: AppModule }); -AppModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AppModule, { declarations: [TestCmp, PercentPipe] }); })(); +AppModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AppModule, declarations: [TestCmp, PercentPipe] }); +AppModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AppModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AppModule, [{ type: NgModule, args: [{ declarations: [TestCmp, PercentPipe] }] @@ -365,7 +364,7 @@ AppModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); /**************************************************************************************************** * PARTIAL FILE: interpolation_with_pipe.js.map ****************************************************************************************************/ -{"version":3,"file":"interpolation_with_pipe.js","sourceRoot":"","sources":["../interpolation_with_pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAgB,MAAM,eAAe,CAAC;;AAMvE,MAAM,OAAO,OAAO;;8DAAP,OAAO;6EAAP,OAAO,gDAFR,qCAAqC,yEAMpC,WAAW;uFAJX,OAAO;cAJnB,SAAS;eAAC;gBACT,QAAQ,EAAE,UAAU;gBACpB,QAAQ,EAAE,qCAAqC;aAChD;;AAKD,MAAM,OAAO,WAAW;IACtB,SAAS,KAAI,CAAC;;sEADH,WAAW;2FAAX,WAAW;uFAAX,WAAW;cADvB,IAAI;eAAC,EAAC,IAAI,EAAE,SAAS,EAAC;;AAMvB,MAAM,OAAO,SAAS;;kEAAT,SAAS;2DAAT,SAAS;;wFAAT,SAAS,mBATT,OAAO,EAIP,WAAW;uFAKX,SAAS;cADrB,QAAQ;eAAC,EAAC,YAAY,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC,EAAC"} +{"version":3,"file":"interpolation_with_pipe.js","sourceRoot":"","sources":["../interpolation_with_pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAgB,MAAM,eAAe,CAAC;;AAMvE,MAAM,OAAO,OAAO;;8DAAP,OAAO;6EAAP,OAAO,gDAFR,qCAAqC,yEAMpC,WAAW;uFAJX,OAAO;cAJnB,SAAS;eAAC;gBACT,QAAQ,EAAE,UAAU;gBACpB,QAAQ,EAAE,qCAAqC;aAChD;;AAKD,MAAM,OAAO,WAAW;IACtB,SAAS,KAAI,CAAC;;sEADH,WAAW;2FAAX,WAAW;uFAAX,WAAW;cADvB,IAAI;eAAC,EAAC,IAAI,EAAE,SAAS,EAAC;;AAMvB,MAAM,OAAO,SAAS;;kEAAT,SAAS;4FAAT,SAAS,iBATT,OAAO,EAIP,WAAW;4FAKX,SAAS;uFAAT,SAAS;cADrB,QAAQ;eAAC,EAAC,YAAY,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC,EAAC"} /**************************************************************************************************** * PARTIAL FILE: interpolation_with_pipe.d.ts ****************************************************************************************************/ @@ -414,9 +413,8 @@ PercentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ version: "0.0.0-PLACEHOLDER", ngImpo export class AppModule { } AppModule.ɵfac = function AppModule_Factory(t) { return new (t || AppModule)(); }; -AppModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: AppModule }); -AppModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AppModule, { declarations: [TestCmp, PercentPipe] }); })(); +AppModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AppModule, declarations: [TestCmp, PercentPipe] }); +AppModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AppModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AppModule, [{ type: NgModule, args: [{ declarations: [TestCmp, PercentPipe] }] @@ -425,7 +423,7 @@ AppModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); /**************************************************************************************************** * PARTIAL FILE: interpolation_with_pipe.js.map ****************************************************************************************************/ -{"version":3,"file":"interpolation_with_pipe.js","sourceRoot":"","sources":["../interpolation_with_pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAgB,MAAM,eAAe,CAAC;;AAMvE,MAAM,OAAO,OAAO;;8DAAP,OAAO;6EAAP,OAAO,gDAFR,qCAAqC,yEAMpC,WAAW;uFAJX,OAAO;cAJnB,SAAS;eAAC;gBACT,QAAQ,EAAE,UAAU;gBACpB,QAAQ,EAAE,qCAAqC;aAChD;;AAKD,MAAM,OAAO,WAAW;IACtB,SAAS,KAAI,CAAC;;sEADH,WAAW;2FAAX,WAAW;uFAAX,WAAW;cADvB,IAAI;eAAC,EAAC,IAAI,EAAE,SAAS,EAAC;;AAMvB,MAAM,OAAO,SAAS;;kEAAT,SAAS;2DAAT,SAAS;;wFAAT,SAAS,mBATT,OAAO,EAIP,WAAW;uFAKX,SAAS;cADrB,QAAQ;eAAC,EAAC,YAAY,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC,EAAC"} +{"version":3,"file":"interpolation_with_pipe.js","sourceRoot":"","sources":["../interpolation_with_pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAgB,MAAM,eAAe,CAAC;;AAMvE,MAAM,OAAO,OAAO;;8DAAP,OAAO;6EAAP,OAAO,gDAFR,qCAAqC,yEAMpC,WAAW;uFAJX,OAAO;cAJnB,SAAS;eAAC;gBACT,QAAQ,EAAE,UAAU;gBACpB,QAAQ,EAAE,qCAAqC;aAChD;;AAKD,MAAM,OAAO,WAAW;IACtB,SAAS,KAAI,CAAC;;sEADH,WAAW;2FAAX,WAAW;uFAAX,WAAW;cADvB,IAAI;eAAC,EAAC,IAAI,EAAE,SAAS,EAAC;;AAMvB,MAAM,OAAO,SAAS;;kEAAT,SAAS;4FAAT,SAAS,iBATT,OAAO,EAIP,WAAW;4FAKX,SAAS;uFAAT,SAAS;cADrB,QAAQ;eAAC,EAAC,YAAY,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC,EAAC"} /**************************************************************************************************** * PARTIAL FILE: interpolation_with_pipe.d.ts ****************************************************************************************************/ @@ -888,9 +886,8 @@ NgModelDirective.ɵdir = i0.ɵɵngDeclareDirective({ version: "0.0.0-PLACEHOLDER export class AppModule { } AppModule.ɵfac = function AppModule_Factory(t) { return new (t || AppModule)(); }; -AppModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: AppModule }); -AppModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AppModule, { declarations: [TestCmp, NgModelDirective] }); })(); +AppModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AppModule, declarations: [TestCmp, NgModelDirective] }); +AppModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AppModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AppModule, [{ type: NgModule, args: [{ declarations: [TestCmp, NgModelDirective] }] @@ -899,7 +896,7 @@ AppModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); /**************************************************************************************************** * PARTIAL FILE: two_way_binding_simple.js.map ****************************************************************************************************/ -{"version":3,"file":"two_way_binding_simple.js","sourceRoot":"","sources":["../two_way_binding_simple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;;AAM1F,MAAM,OAAO,OAAO;IAJpB;QAKE,SAAI,GAAW,EAAE,CAAC;KACnB;;8DAFY,OAAO;6EAAP,OAAO,gDAFR,kCAAkC,0EAOjC,gBAAgB;uFALhB,OAAO;cAJnB,SAAS;eAAC;gBACT,QAAQ,EAAE,UAAU;gBACpB,QAAQ,EAAE,kCAAkC;aAC7C;;AAMD,MAAM,OAAO,gBAAgB;IAD7B;QAEW,YAAO,GAAW,EAAE,CAAC;QACpB,mBAAc,GAAyB,IAAI,YAAY,EAAE,CAAC;KACrE;;gFAHY,gBAAgB;sFAAhB,gBAAgB;uFAAhB,gBAAgB;cAD5B,SAAS;eAAC,EAAC,QAAQ,EAAE,WAAW,EAAC;gBAEvB,OAAO;kBAAf,KAAK;YACI,cAAc;kBAAvB,MAAM;;AAIT,MAAM,OAAO,SAAS;;kEAAT,SAAS;2DAAT,SAAS;;wFAAT,SAAS,mBAXT,OAAO,EAKP,gBAAgB;uFAMhB,SAAS;cADrB,QAAQ;eAAC,EAAC,YAAY,EAAE,CAAC,OAAO,EAAE,gBAAgB,CAAC,EAAC"} +{"version":3,"file":"two_way_binding_simple.js","sourceRoot":"","sources":["../two_way_binding_simple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;;AAM1F,MAAM,OAAO,OAAO;IAJpB;QAKE,SAAI,GAAW,EAAE,CAAC;KACnB;;8DAFY,OAAO;6EAAP,OAAO,gDAFR,kCAAkC,0EAOjC,gBAAgB;uFALhB,OAAO;cAJnB,SAAS;eAAC;gBACT,QAAQ,EAAE,UAAU;gBACpB,QAAQ,EAAE,kCAAkC;aAC7C;;AAMD,MAAM,OAAO,gBAAgB;IAD7B;QAEW,YAAO,GAAW,EAAE,CAAC;QACpB,mBAAc,GAAyB,IAAI,YAAY,EAAE,CAAC;KACrE;;gFAHY,gBAAgB;sFAAhB,gBAAgB;uFAAhB,gBAAgB;cAD5B,SAAS;eAAC,EAAC,QAAQ,EAAE,WAAW,EAAC;gBAEvB,OAAO;kBAAf,KAAK;YACI,cAAc;kBAAvB,MAAM;;AAIT,MAAM,OAAO,SAAS;;kEAAT,SAAS;4FAAT,SAAS,iBAXT,OAAO,EAKP,gBAAgB;4FAMhB,SAAS;uFAAT,SAAS;cADrB,QAAQ;eAAC,EAAC,YAAY,EAAE,CAAC,OAAO,EAAE,gBAAgB,CAAC,EAAC"} /**************************************************************************************************** * PARTIAL FILE: two_way_binding_simple.d.ts ****************************************************************************************************/ @@ -960,9 +957,8 @@ NgModelDirective.ɵdir = i0.ɵɵngDeclareDirective({ version: "0.0.0-PLACEHOLDER export class AppModule { } AppModule.ɵfac = function AppModule_Factory(t) { return new (t || AppModule)(); }; -AppModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: AppModule }); -AppModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AppModule, { declarations: [TestCmp, NgModelDirective] }); })(); +AppModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AppModule, declarations: [TestCmp, NgModelDirective] }); +AppModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AppModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AppModule, [{ type: NgModule, args: [{ declarations: [TestCmp, NgModelDirective] }] @@ -971,7 +967,7 @@ AppModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); /**************************************************************************************************** * PARTIAL FILE: two_way_binding_simple.js.map ****************************************************************************************************/ -{"version":3,"file":"two_way_binding_simple.js","sourceRoot":"","sources":["../two_way_binding_simple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;;AAM1F,MAAM,OAAO,OAAO;IAJpB;QAKE,SAAI,GAAW,EAAE,CAAC;KACnB;;8DAFY,OAAO;6EAAP,OAAO,gDAFR,kCAAkC,0EAOjC,gBAAgB;uFALhB,OAAO;cAJnB,SAAS;eAAC;gBACT,QAAQ,EAAE,UAAU;gBACpB,QAAQ,EAAE,kCAAkC;aAC7C;;AAMD,MAAM,OAAO,gBAAgB;IAD7B;QAEW,YAAO,GAAW,EAAE,CAAC;QACpB,mBAAc,GAAyB,IAAI,YAAY,EAAE,CAAC;KACrE;;gFAHY,gBAAgB;sFAAhB,gBAAgB;uFAAhB,gBAAgB;cAD5B,SAAS;eAAC,EAAC,QAAQ,EAAE,WAAW,EAAC;gBAEvB,OAAO;kBAAf,KAAK;YACI,cAAc;kBAAvB,MAAM;;AAIT,MAAM,OAAO,SAAS;;kEAAT,SAAS;2DAAT,SAAS;;wFAAT,SAAS,mBAXT,OAAO,EAKP,gBAAgB;uFAMhB,SAAS;cADrB,QAAQ;eAAC,EAAC,YAAY,EAAE,CAAC,OAAO,EAAE,gBAAgB,CAAC,EAAC"} +{"version":3,"file":"two_way_binding_simple.js","sourceRoot":"","sources":["../two_way_binding_simple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;;AAM1F,MAAM,OAAO,OAAO;IAJpB;QAKE,SAAI,GAAW,EAAE,CAAC;KACnB;;8DAFY,OAAO;6EAAP,OAAO,gDAFR,kCAAkC,0EAOjC,gBAAgB;uFALhB,OAAO;cAJnB,SAAS;eAAC;gBACT,QAAQ,EAAE,UAAU;gBACpB,QAAQ,EAAE,kCAAkC;aAC7C;;AAMD,MAAM,OAAO,gBAAgB;IAD7B;QAEW,YAAO,GAAW,EAAE,CAAC;QACpB,mBAAc,GAAyB,IAAI,YAAY,EAAE,CAAC;KACrE;;gFAHY,gBAAgB;sFAAhB,gBAAgB;uFAAhB,gBAAgB;cAD5B,SAAS;eAAC,EAAC,QAAQ,EAAE,WAAW,EAAC;gBAEvB,OAAO;kBAAf,KAAK;YACI,cAAc;kBAAvB,MAAM;;AAIT,MAAM,OAAO,SAAS;;kEAAT,SAAS;4FAAT,SAAS,iBAXT,OAAO,EAKP,gBAAgB;4FAMhB,SAAS;uFAAT,SAAS;cADrB,QAAQ;eAAC,EAAC,YAAY,EAAE,CAAC,OAAO,EAAE,gBAAgB,CAAC,EAAC"} /**************************************************************************************************** * PARTIAL FILE: two_way_binding_simple.d.ts ****************************************************************************************************/ @@ -1032,9 +1028,8 @@ NgModelDirective.ɵdir = i0.ɵɵngDeclareDirective({ version: "0.0.0-PLACEHOLDER export class AppModule { } AppModule.ɵfac = function AppModule_Factory(t) { return new (t || AppModule)(); }; -AppModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: AppModule }); -AppModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AppModule, { declarations: [TestCmp, NgModelDirective] }); })(); +AppModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AppModule, declarations: [TestCmp, NgModelDirective] }); +AppModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AppModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AppModule, [{ type: NgModule, args: [{ declarations: [TestCmp, NgModelDirective] }] @@ -1043,7 +1038,7 @@ AppModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); /**************************************************************************************************** * PARTIAL FILE: two_way_binding_longhand.js.map ****************************************************************************************************/ -{"version":3,"file":"two_way_binding_longhand.js","sourceRoot":"","sources":["../two_way_binding_longhand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;;AAM1F,MAAM,OAAO,OAAO;IAJpB;QAKE,SAAI,GAAW,EAAE,CAAC;KACnB;;8DAFY,OAAO;6EAAP,OAAO,gDAFR,qCAAqC,0EAOpC,gBAAgB;uFALhB,OAAO;cAJnB,SAAS;eAAC;gBACT,QAAQ,EAAE,UAAU;gBACpB,QAAQ,EAAE,qCAAqC;aAChD;;AAMD,MAAM,OAAO,gBAAgB;IAD7B;QAEW,YAAO,GAAW,EAAE,CAAC;QACpB,mBAAc,GAAyB,IAAI,YAAY,EAAE,CAAC;KACrE;;gFAHY,gBAAgB;sFAAhB,gBAAgB;uFAAhB,gBAAgB;cAD5B,SAAS;eAAC,EAAC,QAAQ,EAAE,WAAW,EAAC;gBAEvB,OAAO;kBAAf,KAAK;YACI,cAAc;kBAAvB,MAAM;;AAIT,MAAM,OAAO,SAAS;;kEAAT,SAAS;2DAAT,SAAS;;wFAAT,SAAS,mBAXT,OAAO,EAKP,gBAAgB;uFAMhB,SAAS;cADrB,QAAQ;eAAC,EAAC,YAAY,EAAE,CAAC,OAAO,EAAE,gBAAgB,CAAC,EAAC"} +{"version":3,"file":"two_way_binding_longhand.js","sourceRoot":"","sources":["../two_way_binding_longhand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;;AAM1F,MAAM,OAAO,OAAO;IAJpB;QAKE,SAAI,GAAW,EAAE,CAAC;KACnB;;8DAFY,OAAO;6EAAP,OAAO,gDAFR,qCAAqC,0EAOpC,gBAAgB;uFALhB,OAAO;cAJnB,SAAS;eAAC;gBACT,QAAQ,EAAE,UAAU;gBACpB,QAAQ,EAAE,qCAAqC;aAChD;;AAMD,MAAM,OAAO,gBAAgB;IAD7B;QAEW,YAAO,GAAW,EAAE,CAAC;QACpB,mBAAc,GAAyB,IAAI,YAAY,EAAE,CAAC;KACrE;;gFAHY,gBAAgB;sFAAhB,gBAAgB;uFAAhB,gBAAgB;cAD5B,SAAS;eAAC,EAAC,QAAQ,EAAE,WAAW,EAAC;gBAEvB,OAAO;kBAAf,KAAK;YACI,cAAc;kBAAvB,MAAM;;AAIT,MAAM,OAAO,SAAS;;kEAAT,SAAS;4FAAT,SAAS,iBAXT,OAAO,EAKP,gBAAgB;4FAMhB,SAAS;uFAAT,SAAS;cADrB,QAAQ;eAAC,EAAC,YAAY,EAAE,CAAC,OAAO,EAAE,gBAAgB,CAAC,EAAC"} /**************************************************************************************************** * PARTIAL FILE: two_way_binding_longhand.d.ts ****************************************************************************************************/ @@ -1104,9 +1099,8 @@ NgModelDirective.ɵdir = i0.ɵɵngDeclareDirective({ version: "0.0.0-PLACEHOLDER export class AppModule { } AppModule.ɵfac = function AppModule_Factory(t) { return new (t || AppModule)(); }; -AppModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: AppModule }); -AppModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); -(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AppModule, { declarations: [TestCmp, NgModelDirective] }); })(); +AppModule.ɵmod = i0.ɵɵngDeclareNgModule({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AppModule, declarations: [TestCmp, NgModelDirective] }); +AppModule.ɵinj = i0.ɵɵngDeclareInjector({ version: "0.0.0-PLACEHOLDER", ngImport: i0, type: AppModule }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AppModule, [{ type: NgModule, args: [{ declarations: [TestCmp, NgModelDirective] }] @@ -1115,7 +1109,7 @@ AppModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({}); /**************************************************************************************************** * PARTIAL FILE: two_way_binding_longhand.js.map ****************************************************************************************************/ -{"version":3,"file":"two_way_binding_longhand.js","sourceRoot":"","sources":["../two_way_binding_longhand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;;AAM1F,MAAM,OAAO,OAAO;IAJpB;QAKE,SAAI,GAAW,EAAE,CAAC;KACnB;;8DAFY,OAAO;6EAAP,OAAO,gDAFR,qCAAqC,0EAOpC,gBAAgB;uFALhB,OAAO;cAJnB,SAAS;eAAC;gBACT,QAAQ,EAAE,UAAU;gBACpB,QAAQ,EAAE,qCAAqC;aAChD;;AAMD,MAAM,OAAO,gBAAgB;IAD7B;QAEW,YAAO,GAAW,EAAE,CAAC;QACpB,mBAAc,GAAyB,IAAI,YAAY,EAAE,CAAC;KACrE;;gFAHY,gBAAgB;sFAAhB,gBAAgB;uFAAhB,gBAAgB;cAD5B,SAAS;eAAC,EAAC,QAAQ,EAAE,WAAW,EAAC;gBAEvB,OAAO;kBAAf,KAAK;YACI,cAAc;kBAAvB,MAAM;;AAIT,MAAM,OAAO,SAAS;;kEAAT,SAAS;2DAAT,SAAS;;wFAAT,SAAS,mBAXT,OAAO,EAKP,gBAAgB;uFAMhB,SAAS;cADrB,QAAQ;eAAC,EAAC,YAAY,EAAE,CAAC,OAAO,EAAE,gBAAgB,CAAC,EAAC"} +{"version":3,"file":"two_way_binding_longhand.js","sourceRoot":"","sources":["../two_way_binding_longhand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;;AAM1F,MAAM,OAAO,OAAO;IAJpB;QAKE,SAAI,GAAW,EAAE,CAAC;KACnB;;8DAFY,OAAO;6EAAP,OAAO,gDAFR,qCAAqC,0EAOpC,gBAAgB;uFALhB,OAAO;cAJnB,SAAS;eAAC;gBACT,QAAQ,EAAE,UAAU;gBACpB,QAAQ,EAAE,qCAAqC;aAChD;;AAMD,MAAM,OAAO,gBAAgB;IAD7B;QAEW,YAAO,GAAW,EAAE,CAAC;QACpB,mBAAc,GAAyB,IAAI,YAAY,EAAE,CAAC;KACrE;;gFAHY,gBAAgB;sFAAhB,gBAAgB;uFAAhB,gBAAgB;cAD5B,SAAS;eAAC,EAAC,QAAQ,EAAE,WAAW,EAAC;gBAEvB,OAAO;kBAAf,KAAK;YACI,cAAc;kBAAvB,MAAM;;AAIT,MAAM,OAAO,SAAS;;kEAAT,SAAS;4FAAT,SAAS,iBAXT,OAAO,EAKP,gBAAgB;4FAMhB,SAAS;uFAAT,SAAS;cADrB,QAAQ;eAAC,EAAC,YAAY,EAAE,CAAC,OAAO,EAAE,gBAAgB,CAAC,EAAC"} /**************************************************************************************************** * PARTIAL FILE: two_way_binding_longhand.d.ts ****************************************************************************************************/ diff --git a/packages/compiler/src/compiler.ts b/packages/compiler/src/compiler.ts index d32f9c29ef0..706444c9975 100644 --- a/packages/compiler/src/compiler.ts +++ b/packages/compiler/src/compiler.ts @@ -97,14 +97,17 @@ export {BoundAttribute as TmplAstBoundAttribute, BoundEvent as TmplAstBoundEvent export * from './render3/view/t2_api'; export * from './render3/view/t2_binder'; export {Identifiers as R3Identifiers} from './render3/r3_identifiers'; -export {R3DependencyMetadata, R3ResolvedDependencyType, compileFactoryFunction, R3FactoryMetadata, R3FactoryTarget} from './render3/r3_factory'; -export {compileInjector, compileNgModule, R3InjectorMetadata, R3NgModuleMetadata} from './render3/r3_module_compiler'; +export {compileFactoryFunction, R3DependencyMetadata, R3FactoryMetadata, R3FactoryTarget, R3ResolvedDependencyType} from './render3/r3_factory'; +export {compileNgModule, R3NgModuleMetadata} from './render3/r3_module_compiler'; +export {compileInjector, R3InjectorMetadata} from './render3/r3_injector_compiler'; export {compilePipeFromMetadata, R3PipeMetadata} from './render3/r3_pipe_compiler'; export {makeBindingParser, ParsedTemplate, parseTemplate, ParseTemplateOptions} from './render3/view/template'; export {R3CompiledExpression, R3Reference, devOnlyGuardedExpression, getSafePropertyAccessString} from './render3/util'; export {compileComponentFromMetadata, compileDirectiveFromMetadata, parseHostBindings, ParsedHostBindings, verifyHostBindings} from './render3/view/compiler'; export {compileDeclareComponentFromMetadata} from './render3/partial/component'; export {compileDeclareDirectiveFromMetadata} from './render3/partial/directive'; +export {compileDeclareInjectorFromMetadata} from './render3/partial/injector'; +export {compileDeclareNgModuleFromMetadata} from './render3/partial/ng_module'; export {compileDeclarePipeFromMetadata} from './render3/partial/pipe'; export {publishFacade} from './jit_compiler_facade'; // This file only reexports content of the `src` folder. Keep it that way. diff --git a/packages/compiler/src/compiler_facade_interface.ts b/packages/compiler/src/compiler_facade_interface.ts index 8101797e05f..41c4bd7ff17 100644 --- a/packages/compiler/src/compiler_facade_interface.ts +++ b/packages/compiler/src/compiler_facade_interface.ts @@ -35,8 +35,14 @@ export interface CompilerFacade { angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3InjectableMetadataFacade): any; compileInjector( angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3InjectorMetadataFacade): any; + compileInjectorDeclaration( + angularCoreEnv: CoreEnvironment, sourceMapUrl: string, + declaration: R3DeclareInjectorFacade): any; compileNgModule( angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3NgModuleMetadataFacade): any; + compileNgModuleDeclaration( + angularCoreEnv: CoreEnvironment, sourceMapUrl: string, + declaration: R3DeclareNgModuleFacade): any; compileDirective( angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3DirectiveMetadataFacade): any; compileDirectiveDeclaration( @@ -256,6 +262,23 @@ export interface R3DeclareQueryMetadataFacade { emitDistinctChangesOnly?: boolean; } +export interface R3DeclareInjectorFacade { + type: Function; + imports?: OpaqueValue[]; + providers?: OpaqueValue[]; + deps: R3DependencyMetadataFacade[]|null; +} + +export interface R3DeclareNgModuleFacade { + type: Function; + bootstrap?: OpaqueValue[]|(() => OpaqueValue[]); + declarations?: OpaqueValue[]|(() => OpaqueValue[]); + imports?: OpaqueValue[]|(() => OpaqueValue[]); + exports?: OpaqueValue[]|(() => OpaqueValue[]); + schemas?: OpaqueValue[]; + id?: OpaqueValue; +} + export interface R3DeclarePipeFacade { type: Function; name: string; diff --git a/packages/compiler/src/jit_compiler_facade.ts b/packages/compiler/src/jit_compiler_facade.ts index ee97a86f113..5b608ec4185 100644 --- a/packages/compiler/src/jit_compiler_facade.ts +++ b/packages/compiler/src/jit_compiler_facade.ts @@ -7,7 +7,7 @@ */ -import {CompilerFacade, CoreEnvironment, ExportedCompilerFacade, OpaqueValue, R3ComponentMetadataFacade, R3DeclareComponentFacade, R3DeclareDirectiveFacade, R3DeclarePipeFacade, R3DeclareQueryMetadataFacade, R3DependencyMetadataFacade, R3DirectiveMetadataFacade, R3FactoryDefMetadataFacade, R3InjectableMetadataFacade, R3InjectorMetadataFacade, R3NgModuleMetadataFacade, R3PipeMetadataFacade, R3QueryMetadataFacade, StringMap, StringMapWithRename} from './compiler_facade_interface'; +import {CompilerFacade, CoreEnvironment, ExportedCompilerFacade, OpaqueValue, R3ComponentMetadataFacade, R3DeclareComponentFacade, R3DeclareDirectiveFacade, R3DeclareInjectorFacade, R3DeclareNgModuleFacade, R3DeclarePipeFacade, R3DeclareQueryMetadataFacade, R3DependencyMetadataFacade, R3DirectiveMetadataFacade, R3FactoryDefMetadataFacade, R3InjectableMetadataFacade, R3InjectorMetadataFacade, R3NgModuleMetadataFacade, R3PipeMetadataFacade, R3QueryMetadataFacade, StringMap, StringMapWithRename} from './compiler_facade_interface'; import {ConstantPool} from './constant_pool'; import {ChangeDetectionStrategy, HostBinding, HostListener, Input, Output, Type, ViewEncapsulation} from './core'; import {Identifiers} from './identifiers'; @@ -17,10 +17,11 @@ import {DeclareVarStmt, Expression, LiteralExpr, Statement, StmtModifier, Wrappe import {JitEvaluator} from './output/output_jit'; import {ParseError, ParseSourceSpan, r3JitTypeSourceSpan} from './parse_util'; import {compileFactoryFunction, R3DependencyMetadata, R3FactoryTarget, R3ResolvedDependencyType} from './render3/r3_factory'; +import {compileInjector, R3InjectorMetadata} from './render3/r3_injector_compiler'; import {R3JitReflector} from './render3/r3_jit'; -import {compileInjector, compileNgModule, R3InjectorMetadata, R3NgModuleMetadata} from './render3/r3_module_compiler'; +import {compileNgModule, compileNgModuleDeclarationExpression, R3NgModuleMetadata} from './render3/r3_module_compiler'; import {compilePipeFromMetadata, R3PipeMetadata} from './render3/r3_pipe_compiler'; -import {getSafePropertyAccessString, wrapReference} from './render3/util'; +import {getSafePropertyAccessString, R3Reference, wrapReference} from './render3/util'; import {DeclarationListEmitMode, R3ComponentMetadata, R3DirectiveMetadata, R3HostMetadata, R3QueryMetadata, R3UsedDirectiveMetadata} from './render3/view/api'; import {compileComponentFromMetadata, compileDirectiveFromMetadata, ParsedHostBindings, parseHostBindings, verifyHostBindings} from './render3/view/compiler'; import {makeBindingParser, parseTemplate} from './render3/view/template'; @@ -91,6 +92,14 @@ export class CompilerFacadeImpl implements CompilerFacade { return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []); } + compileInjectorDeclaration( + angularCoreEnv: CoreEnvironment, sourceMapUrl: string, + declaration: R3DeclareInjectorFacade): any { + const meta = convertDeclareInjectorFacadeToMetadata(declaration); + const res = compileInjector(meta); + return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []); + } + compileNgModule( angularCoreEnv: CoreEnvironment, sourceMapUrl: string, facade: R3NgModuleMetadataFacade): any { @@ -111,6 +120,13 @@ export class CompilerFacadeImpl implements CompilerFacade { return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []); } + compileNgModuleDeclaration( + angularCoreEnv: CoreEnvironment, sourceMapUrl: string, + declaration: R3DeclareNgModuleFacade): any { + const expression = compileNgModuleDeclarationExpression(declaration); + return this.jitExpression(expression, angularCoreEnv, sourceMapUrl, []); + } + compileDirective( angularCoreEnv: CoreEnvironment, sourceMapUrl: string, facade: R3DirectiveMetadataFacade): any { @@ -527,6 +543,19 @@ function convertDeclarePipeFacadeToMetadata(declaration: R3DeclarePipeFacade): R }; } +function convertDeclareInjectorFacadeToMetadata(declaration: R3DeclareInjectorFacade): + R3InjectorMetadata { + return { + name: declaration.type.name, + type: wrapReference(declaration.type), + internalType: new WrappedNodeExpr(declaration.type), + providers: declaration.providers !== undefined ? new WrappedNodeExpr(declaration.providers) : + null, + imports: declaration.imports !== undefined ? + declaration.imports.map(i => new WrappedNodeExpr(i)) : + [], + }; +} export function publishFacade(global: any) { const ng: ExportedCompilerFacade = global.ng || (global.ng = {}); diff --git a/packages/compiler/src/render3/partial/api.ts b/packages/compiler/src/render3/partial/api.ts index b289e7fde76..fabc62dd775 100644 --- a/packages/compiler/src/render3/partial/api.ts +++ b/packages/compiler/src/render3/partial/api.ts @@ -28,10 +28,7 @@ export interface R3PartialDeclaration { } /** - * Describes the shape of the object that the `ɵɵngDeclareDirective() function accepts. - * - * This interface serves primarily as documentation, as conformance to this interface is not - * enforced during linking. + * Describes the shape of the object that the `ɵɵngDeclareDirective()` function accepts. */ export interface R3DeclareDirectiveMetadata extends R3PartialDeclaration { /** @@ -115,9 +112,6 @@ export interface R3DeclareDirectiveMetadata extends R3PartialDeclaration { /** * Describes the shape of the object that the `ɵɵngDeclareComponent()` function accepts. - * - * This interface serves primarily as documentation, as conformance to this interface is not - * enforced during linking. */ export interface R3DeclareComponentMetadata extends R3DeclareDirectiveMetadata { /** @@ -261,6 +255,53 @@ export interface R3DeclareQueryMetadata { static?: boolean; } +/** + * Describes the shape of the objects that the `ɵɵngDeclareNgModule()` accepts. + */ +export interface R3DeclareNgModuleMetadata extends R3PartialDeclaration { + /** + * An array of expressions representing the bootstrap components specified by the module. + */ + bootstrap?: o.Expression[]; + + /** + * An array of expressions representing the directives and pipes declared by the module. + */ + declarations?: o.Expression[]; + + /** + * An array of expressions representing the imports of the module. + */ + imports?: o.Expression[]; + + /** + * An array of expressions representing the exports of the module. + */ + exports?: o.Expression[]; + + /** + * The set of schemas that declare elements to be allowed in the NgModule. + */ + schemas?: o.Expression[]; + + /** Unique ID or expression representing the unique ID of an NgModule. */ + id?: o.Expression; +} + +/** + * Describes the shape of the objects that the `ɵɵngDeclareInjector()` accepts. + */ +export interface R3DeclareInjectorMetadata extends R3PartialDeclaration { + /** + * The list of providers provided by the injector. + */ + providers?: o.Expression; + /** + * The list of imports into the injector. + */ + imports?: o.Expression[]; +} + /** * Describes the shape of the object that the `ɵɵngDeclarePipe()` function accepts. * diff --git a/packages/compiler/src/render3/partial/injector.ts b/packages/compiler/src/render3/partial/injector.ts new file mode 100644 index 00000000000..5322d2b82a6 --- /dev/null +++ b/packages/compiler/src/render3/partial/injector.ts @@ -0,0 +1,39 @@ +/** + * @license + * Copyright Google LLC All Rights Reserved. + * + * 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 * as o from '../../output/output_ast'; +import {Identifiers as R3} from '../r3_identifiers'; +import {createInjectorType, R3InjectorMetadata} from '../r3_injector_compiler'; +import {R3CompiledExpression} from '../util'; +import {DefinitionMap} from '../view/util'; +import {R3DeclareInjectorMetadata} from './api'; + + +export function compileDeclareInjectorFromMetadata(meta: R3InjectorMetadata): R3CompiledExpression { + const definitionMap = createInjectorDefinitionMap(meta); + + const expression = o.importExpr(R3.declareInjector).callFn([definitionMap.toLiteralMap()]); + const type = createInjectorType(meta); + + return {expression, type, statements: []}; +} + +function createInjectorDefinitionMap(meta: R3InjectorMetadata): + DefinitionMap { + const definitionMap = new DefinitionMap(); + + definitionMap.set('version', o.literal('0.0.0-PLACEHOLDER')); + definitionMap.set('ngImport', o.importExpr(R3.core)); + + definitionMap.set('type', meta.internalType); + definitionMap.set('providers', meta.providers); + if (meta.imports.length > 0) { + definitionMap.set('imports', o.literalArr(meta.imports)); + } + + return definitionMap; +} diff --git a/packages/compiler/src/render3/partial/ng_module.ts b/packages/compiler/src/render3/partial/ng_module.ts new file mode 100644 index 00000000000..0aa3cbf367a --- /dev/null +++ b/packages/compiler/src/render3/partial/ng_module.ts @@ -0,0 +1,65 @@ +/** + * @license + * Copyright Google LLC All Rights Reserved. + * + * 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 * as o from '../../output/output_ast'; +import {Identifiers as R3} from '../r3_identifiers'; +import {createNgModuleType, R3NgModuleMetadata} from '../r3_module_compiler'; +import {R3CompiledExpression, refsToArray} from '../util'; +import {DefinitionMap} from '../view/util'; + +import {R3DeclareNgModuleMetadata} from './api'; + + +export function compileDeclareNgModuleFromMetadata(meta: R3NgModuleMetadata): R3CompiledExpression { + const definitionMap = createNgModuleDefinitionMap(meta); + + const expression = o.importExpr(R3.declareNgModule).callFn([definitionMap.toLiteralMap()]); + const type = createNgModuleType(meta); + + return {expression, type, statements: []}; +} + +function createNgModuleDefinitionMap(meta: R3NgModuleMetadata): + DefinitionMap { + const definitionMap = new DefinitionMap(); + + definitionMap.set('version', o.literal('0.0.0-PLACEHOLDER')); + definitionMap.set('ngImport', o.importExpr(R3.core)); + definitionMap.set('type', meta.internalType); + + // We only generate the keys in the metadata if the arrays contain values. + + // We must wrap the arrays inside a function if any of the values are a forward reference to a + // not-yet-declared class. This is to support JIT execution of the `ɵɵngDeclareNgModule()` call. + // In the linker these wrappers are stripped and then reapplied for the `ɵdefineNgModule()` call. + + if (meta.bootstrap.length > 0) { + definitionMap.set('bootstrap', refsToArray(meta.bootstrap, meta.containsForwardDecls)); + } + + if (meta.declarations.length > 0) { + definitionMap.set('declarations', refsToArray(meta.declarations, meta.containsForwardDecls)); + } + + if (meta.imports.length > 0) { + definitionMap.set('imports', refsToArray(meta.imports, meta.containsForwardDecls)); + } + + if (meta.exports.length > 0) { + definitionMap.set('exports', refsToArray(meta.exports, meta.containsForwardDecls)); + } + + if (meta.schemas !== null && meta.schemas.length > 0) { + definitionMap.set('schemas', o.literalArr(meta.schemas.map(ref => ref.value))); + } + + if (meta.id !== null) { + definitionMap.set('id', meta.id); + } + + return definitionMap; +} diff --git a/packages/compiler/src/render3/r3_identifiers.ts b/packages/compiler/src/render3/r3_identifiers.ts index 5362f17979d..90e3efdd832 100644 --- a/packages/compiler/src/render3/r3_identifiers.ts +++ b/packages/compiler/src/render3/r3_identifiers.ts @@ -273,10 +273,8 @@ export class Identifiers { moduleName: CORE, }; - static defineInjector: o.ExternalReference = { - name: 'ɵɵdefineInjector', - moduleName: CORE, - }; + static defineInjector: o.ExternalReference = {name: 'ɵɵdefineInjector', moduleName: CORE}; + static declareInjector: o.ExternalReference = {name: 'ɵɵngDeclareInjector', moduleName: CORE}; static NgModuleDefWithMeta: o.ExternalReference = { name: 'ɵɵNgModuleDefWithMeta', @@ -289,6 +287,7 @@ export class Identifiers { }; static defineNgModule: o.ExternalReference = {name: 'ɵɵdefineNgModule', moduleName: CORE}; + static declareNgModule: o.ExternalReference = {name: 'ɵɵngDeclareNgModule', moduleName: CORE}; static setNgModuleScope: o.ExternalReference = {name: 'ɵɵsetNgModuleScope', moduleName: CORE}; static PipeDefWithMeta: o.ExternalReference = {name: 'ɵɵPipeDefWithMeta', moduleName: CORE}; diff --git a/packages/compiler/src/render3/r3_injector_compiler.ts b/packages/compiler/src/render3/r3_injector_compiler.ts new file mode 100644 index 00000000000..73c77994521 --- /dev/null +++ b/packages/compiler/src/render3/r3_injector_compiler.ts @@ -0,0 +1,41 @@ +/** + * @license + * Copyright Google LLC All Rights Reserved. + * + * 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 * as o from '../output/output_ast'; +import {Identifiers as R3} from './r3_identifiers'; +import {R3CompiledExpression, R3Reference} from './util'; +import {DefinitionMap} from './view/util'; + +export interface R3InjectorMetadata { + name: string; + type: R3Reference; + internalType: o.Expression; + providers: o.Expression|null; + imports: o.Expression[]; +} + +export function compileInjector(meta: R3InjectorMetadata): R3CompiledExpression { + const definitionMap = new DefinitionMap<{providers: o.Expression; imports: o.Expression;}>(); + + if (meta.providers !== null) { + definitionMap.set('providers', meta.providers); + } + + if (meta.imports.length > 0) { + definitionMap.set('imports', o.literalArr(meta.imports)); + } + + const expression = + o.importExpr(R3.defineInjector).callFn([definitionMap.toLiteralMap()], undefined, true); + const type = createInjectorType(meta); + return {expression, type, statements: []}; +} + +export function createInjectorType(meta: R3InjectorMetadata): o.Type { + return new o.ExpressionType(o.importExpr(R3.InjectorDef, [new o.ExpressionType(meta.type.type)])); +} diff --git a/packages/compiler/src/render3/r3_module_compiler.ts b/packages/compiler/src/render3/r3_module_compiler.ts index fc08bc2076a..c19016c451e 100644 --- a/packages/compiler/src/render3/r3_module_compiler.ts +++ b/packages/compiler/src/render3/r3_module_compiler.ts @@ -6,10 +6,11 @@ * found in the LICENSE file at https://angular.io/license */ +import {R3DeclareNgModuleFacade} from '../compiler_facade_interface'; import * as o from '../output/output_ast'; import {Identifiers as R3} from './r3_identifiers'; -import {jitOnlyGuardedExpression, R3CompiledExpression, R3Reference} from './util'; +import {jitOnlyGuardedExpression, R3CompiledExpression, R3Reference, refsToArray} from './util'; import {DefinitionMap} from './view/util'; /** @@ -123,7 +124,6 @@ interface R3NgModuleDefMap { export function compileNgModule(meta: R3NgModuleMetadata): R3CompiledExpression { const { internalType, - type: moduleType, bootstrap, declarations, imports, @@ -138,23 +138,22 @@ export function compileNgModule(meta: R3NgModuleMetadata): R3CompiledExpression const definitionMap = new DefinitionMap(); definitionMap.set('type', internalType); - // Only generate the keys in the metadata if the arrays have values. - if (bootstrap.length) { + if (bootstrap.length > 0) { definitionMap.set('bootstrap', refsToArray(bootstrap, containsForwardDecls)); } - // If requested to emit scope information inline, pass the declarations, imports and exports to - // the `ɵɵdefineNgModule` call. The JIT compilation uses this. + // If requested to emit scope information inline, pass the `declarations`, `imports` and `exports` + // to the `ɵɵdefineNgModule()` call. The JIT compilation uses this. if (emitInline) { - if (declarations.length) { + if (declarations.length > 0) { definitionMap.set('declarations', refsToArray(declarations, containsForwardDecls)); } - if (imports.length) { + if (imports.length > 0) { definitionMap.set('imports', refsToArray(imports, containsForwardDecls)); } - if (exports.length) { + if (exports.length > 0) { definitionMap.set('exports', refsToArray(exports, containsForwardDecls)); } } @@ -168,23 +167,55 @@ export function compileNgModule(meta: R3NgModuleMetadata): R3CompiledExpression } } - if (schemas && schemas.length) { + if (schemas !== null && schemas.length > 0) { definitionMap.set('schemas', o.literalArr(schemas.map(ref => ref.value))); } - if (id) { + if (id !== null) { definitionMap.set('id', id); } const expression = o.importExpr(R3.defineNgModule).callFn([definitionMap.toLiteralMap()], undefined, true); - const type = new o.ExpressionType(o.importExpr(R3.NgModuleDefWithMeta, [ + const type = createNgModuleType(meta); + + return {expression, type, statements}; +} + +/** + * This function is used in JIT mode to generate the call to `ɵɵdefineNgModule()` from a call to + * `ɵɵngDeclareNgModule()`. + */ +export function compileNgModuleDeclarationExpression(meta: R3DeclareNgModuleFacade): o.Expression { + const definitionMap = new DefinitionMap(); + definitionMap.set('type', new o.WrappedNodeExpr(meta.type)); + if (meta.bootstrap !== undefined) { + definitionMap.set('bootstrap', new o.WrappedNodeExpr(meta.bootstrap)); + } + if (meta.declarations !== undefined) { + definitionMap.set('declarations', new o.WrappedNodeExpr(meta.declarations)); + } + if (meta.imports !== undefined) { + definitionMap.set('imports', new o.WrappedNodeExpr(meta.imports)); + } + if (meta.exports !== undefined) { + definitionMap.set('exports', new o.WrappedNodeExpr(meta.exports)); + } + if (meta.schemas !== undefined) { + definitionMap.set('schemas', new o.WrappedNodeExpr(meta.schemas)); + } + if (meta.id !== undefined) { + definitionMap.set('id', new o.WrappedNodeExpr(meta.id)); + } + return o.importExpr(R3.defineNgModule).callFn([definitionMap.toLiteralMap()]); +} + +export function createNgModuleType( + {type: moduleType, declarations, imports, exports}: R3NgModuleMetadata): o.ExpressionType { + return new o.ExpressionType(o.importExpr(R3.NgModuleDefWithMeta, [ new o.ExpressionType(moduleType.type), tupleTypeOf(declarations), tupleTypeOf(imports), tupleTypeOf(exports) ])); - - - return {expression, type, statements}; } /** @@ -199,15 +230,15 @@ function generateSetNgModuleScopeCall(meta: R3NgModuleMetadata): o.Statement|nul const scopeMap = new DefinitionMap< {declarations: o.Expression, imports: o.Expression, exports: o.Expression}>(); - if (declarations.length) { + if (declarations.length > 0) { scopeMap.set('declarations', refsToArray(declarations, containsForwardDecls)); } - if (imports.length) { + if (imports.length > 0) { scopeMap.set('imports', refsToArray(imports, containsForwardDecls)); } - if (exports.length) { + if (exports.length > 0) { scopeMap.set('exports', refsToArray(exports, containsForwardDecls)); } @@ -236,38 +267,7 @@ function generateSetNgModuleScopeCall(meta: R3NgModuleMetadata): o.Statement|nul return iifeCall.toStmt(); } -export interface R3InjectorMetadata { - name: string; - type: R3Reference; - internalType: o.Expression; - providers: o.Expression|null; - imports: o.Expression[]; -} - -export function compileInjector(meta: R3InjectorMetadata): R3CompiledExpression { - const definitionMap = new DefinitionMap<{providers: o.Expression, imports: o.Expression}>(); - - if (meta.providers !== null) { - definitionMap.set('providers', meta.providers); - } - - if (meta.imports.length > 0) { - definitionMap.set('imports', o.literalArr(meta.imports)); - } - - const expression = - o.importExpr(R3.defineInjector).callFn([definitionMap.toLiteralMap()], undefined, true); - const type = - new o.ExpressionType(o.importExpr(R3.InjectorDef, [new o.ExpressionType(meta.type.type)])); - return {expression, type, statements: []}; -} - function tupleTypeOf(exp: R3Reference[]): o.Type { const types = exp.map(ref => o.typeofExpr(ref.type)); return exp.length > 0 ? o.expressionType(o.literalArr(types)) : o.NONE_TYPE; } - -function refsToArray(refs: R3Reference[], shouldForwardDeclare: boolean): o.Expression { - const values = o.literalArr(refs.map(ref => ref.value)); - return shouldForwardDeclare ? o.fn([], [new o.ReturnStatement(values)]) : values; -} diff --git a/packages/compiler/src/render3/util.ts b/packages/compiler/src/render3/util.ts index ab8aaf33ad9..f558bd13964 100644 --- a/packages/compiler/src/render3/util.ts +++ b/packages/compiler/src/render3/util.ts @@ -74,3 +74,8 @@ export function wrapReference(value: any): R3Reference { const wrapped = new o.WrappedNodeExpr(value); return {value: wrapped, type: wrapped}; } + +export function refsToArray(refs: R3Reference[], shouldForwardDeclare: boolean): o.Expression { + const values = o.literalArr(refs.map(ref => ref.value)); + return shouldForwardDeclare ? o.fn([], [new o.ReturnStatement(values)]) : values; +} diff --git a/packages/core/src/compiler/compiler_facade_interface.ts b/packages/core/src/compiler/compiler_facade_interface.ts index 8101797e05f..9489382bd4d 100644 --- a/packages/core/src/compiler/compiler_facade_interface.ts +++ b/packages/core/src/compiler/compiler_facade_interface.ts @@ -35,8 +35,14 @@ export interface CompilerFacade { angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3InjectableMetadataFacade): any; compileInjector( angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3InjectorMetadataFacade): any; + compileInjectorDeclaration( + angularCoreEnv: CoreEnvironment, sourceMapUrl: string, + declaration: R3DeclareInjectorFacade): any; compileNgModule( angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3NgModuleMetadataFacade): any; + compileNgModuleDeclaration( + angularCoreEnv: CoreEnvironment, sourceMapUrl: string, + declaration: R3DeclareNgModuleFacade): any; compileDirective( angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3DirectiveMetadataFacade): any; compileDirectiveDeclaration( @@ -256,6 +262,22 @@ export interface R3DeclareQueryMetadataFacade { emitDistinctChangesOnly?: boolean; } +export interface R3DeclareInjectorFacade { + type: Function; + imports?: OpaqueValue[]; + providers?: OpaqueValue[]; +} + +export interface R3DeclareNgModuleFacade { + type: Function; + bootstrap?: OpaqueValue[]|(() => OpaqueValue[]); + declarations?: OpaqueValue[]|(() => OpaqueValue[]); + imports?: OpaqueValue[]|(() => OpaqueValue[]); + exports?: OpaqueValue[]|(() => OpaqueValue[]); + schemas?: OpaqueValue[]; + id?: string; +} + export interface R3DeclarePipeFacade { type: Function; name: string; diff --git a/packages/core/src/core_render3_private_export.ts b/packages/core/src/core_render3_private_export.ts index dd6525fd343..1836e5a550b 100644 --- a/packages/core/src/core_render3_private_export.ts +++ b/packages/core/src/core_render3_private_export.ts @@ -272,6 +272,8 @@ export { export { ɵɵngDeclareComponent, ɵɵngDeclareDirective, + ɵɵngDeclareInjector, + ɵɵngDeclareNgModule, ɵɵngDeclarePipe, } from './render3/jit/partial'; export { diff --git a/packages/core/src/render3/jit/partial.ts b/packages/core/src/render3/jit/partial.ts index 70e3dc2ff02..f0d9b9f1882 100644 --- a/packages/core/src/render3/jit/partial.ts +++ b/packages/core/src/render3/jit/partial.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {getCompilerFacade, R3DeclareComponentFacade, R3DeclareDirectiveFacade, R3DeclarePipeFacade} from '../../compiler/compiler_facade'; +import {getCompilerFacade, R3DeclareComponentFacade, R3DeclareDirectiveFacade, R3DeclareInjectorFacade, R3DeclareNgModuleFacade, R3DeclarePipeFacade} from '../../compiler/compiler_facade'; import {angularCoreEnv} from './environment'; /** @@ -31,6 +31,28 @@ export function ɵɵngDeclareComponent(decl: R3DeclareComponentFacade): unknown angularCoreEnv, `ng:///${decl.type.name}/ɵcmp.js`, decl); } +/** + * Compiles a partial injector declaration object into a full injector definition object. + * + * @codeGenApi + */ +export function ɵɵngDeclareInjector(decl: R3DeclareInjectorFacade): unknown { + const compiler = getCompilerFacade(); + return compiler.compileInjectorDeclaration( + angularCoreEnv, `ng:///${decl.type.name}/ɵinj.js`, decl); +} + +/** + * Compiles a partial NgModule declaration object into a full NgModule definition object. + * + * @codeGenApi + */ +export function ɵɵngDeclareNgModule(decl: R3DeclareNgModuleFacade): unknown { + const compiler = getCompilerFacade(); + return compiler.compileNgModuleDeclaration( + angularCoreEnv, `ng:///${decl.type.name}/ɵmod.js`, decl); +} + /** * Compiles a partial pipe declaration object into a full pipe definition object. * diff --git a/packages/core/test/render3/jit/declare_injector_spec.ts b/packages/core/test/render3/jit/declare_injector_spec.ts new file mode 100644 index 00000000000..f7bdbad87af --- /dev/null +++ b/packages/core/test/render3/jit/declare_injector_spec.ts @@ -0,0 +1,42 @@ +/** + * @license + * Copyright Google LLC All Rights Reserved. + * + * 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 {InjectionToken, ɵɵInjectorDef, ɵɵngDeclareInjector} from '@angular/core'; + +describe('Injector declaration jit compilation', () => { + it('should compile a minimal Injector declaration', () => { + const def = ɵɵngDeclareInjector({type: TestClass}) as ɵɵInjectorDef; + + expect(def.providers).toEqual([]); + expect(def.imports).toEqual([]); + }); + + it('should compile an Injector declaration with providers', () => { + class OtherClass {} + const TestToken = new InjectionToken('TestToken'); + const testTokenValue = {}; + const def = ɵɵngDeclareInjector({ + type: TestClass, + providers: [OtherClass, {provide: TestToken, useValue: testTokenValue}] + }) as ɵɵInjectorDef; + + expect(def.providers).toEqual([OtherClass, {provide: TestToken, useValue: testTokenValue}]); + expect(def.imports).toEqual([]); + }); + + it('should compile an Injector declaration with imports', () => { + const OtherInjector: any = {}; + const def = ɵɵngDeclareInjector({type: TestClass, imports: [OtherInjector]}) as + ɵɵInjectorDef; + + expect(def.providers).toEqual([]); + expect(def.imports).toEqual([OtherInjector]); + }); +}); + +class TestClass {} diff --git a/packages/core/test/render3/jit/declare_ng_module_spec.ts b/packages/core/test/render3/jit/declare_ng_module_spec.ts new file mode 100644 index 00000000000..8463a747e02 --- /dev/null +++ b/packages/core/test/render3/jit/declare_ng_module_spec.ts @@ -0,0 +1,119 @@ +/** + * @license + * Copyright Google LLC All Rights Reserved. + * + * 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 {NO_ERRORS_SCHEMA, SchemaMetadata, Type, ɵNgModuleDef, ɵɵngDeclareNgModule} from '@angular/core'; + +describe('NgModule declaration jit compilation', () => { + it('should compile a minimal NgModule declaration', () => { + const def = ɵɵngDeclareNgModule({type: TestClass}) as ɵNgModuleDef; + expectNgModuleDef(def, {}); + }); + + it('should compile an NgModule declaration with bootstrap classes', () => { + const def = ɵɵngDeclareNgModule({type: TestClass, bootstrap: [TestComponent]}) as + ɵNgModuleDef; + expectNgModuleDef(def, {bootstrap: [TestComponent]}); + }); + + it('should compile an NgModule declaration with forward referenced bootstrap classes', () => { + const def = ɵɵngDeclareNgModule({type: TestClass, bootstrap: () => [ForwardRef]}) as + ɵNgModuleDef; + class ForwardRef {} + expectNgModuleDef(def, {bootstrap: [ForwardRef]}); + }); + + it('should compile an NgModule declaration with declarations classes', () => { + const def = ɵɵngDeclareNgModule({type: TestClass, declarations: [TestComponent]}) as + ɵNgModuleDef; + expectNgModuleDef(def, {declarations: [TestComponent]}); + }); + + it('should compile an NgModule declaration with forward referenced declarations classes', () => { + const def = ɵɵngDeclareNgModule({type: TestClass, declarations: () => [TestComponent]}) as + ɵNgModuleDef; + expectNgModuleDef(def, {declarations: [TestComponent]}); + }); + + it('should compile an NgModule declaration with imports classes', () => { + const def = + ɵɵngDeclareNgModule({type: TestClass, imports: [TestModule]}) as ɵNgModuleDef; + expectNgModuleDef(def, {imports: [TestModule]}); + }); + + it('should compile an NgModule declaration with forward referenced imports classes', () => { + const def = ɵɵngDeclareNgModule({type: TestClass, imports: () => [TestModule]}) as + ɵNgModuleDef; + expectNgModuleDef(def, {imports: [TestModule]}); + }); + + it('should compile an NgModule declaration with exports classes', () => { + const def = ɵɵngDeclareNgModule({type: TestClass, exports: [TestComponent, TestModule]}) as + ɵNgModuleDef; + expectNgModuleDef(def, {exports: [TestComponent, TestModule]}); + }); + + it('should compile an NgModule declaration with forward referenced exports classes', () => { + const def = + ɵɵngDeclareNgModule({type: TestClass, exports: () => [TestComponent, TestModule]}) as + ɵNgModuleDef; + expectNgModuleDef(def, {exports: [TestComponent, TestModule]}); + }); + + it('should compile an NgModule declaration with schemas', () => { + const def = ɵɵngDeclareNgModule({type: TestClass, schemas: [NO_ERRORS_SCHEMA]}) as + ɵNgModuleDef; + expectNgModuleDef(def, {schemas: [NO_ERRORS_SCHEMA]}); + }); + + it('should compile an NgModule declaration with an id expression', () => { + const id = 'ModuleID'; + const def = ɵɵngDeclareNgModule({type: TestClass, id}) as ɵNgModuleDef; + expectNgModuleDef(def, {id: 'ModuleID'}); + }); +}); + +class TestClass {} +class TestComponent {} +class TestModule {} + +type NgModuleDefExpectations = jasmine.Expected<{ + schemas: SchemaMetadata[] | null; id: string | null; bootstrap: Type[]; + declarations: Type[]; + imports: Type[]; + exports: Type[]; +}>; + +/** + * Asserts that the provided NgModule definition is according to the provided expectation. + * Definition fields for which no expectation is present are verified to be initialized to their + * default value. + */ +function expectNgModuleDef( + actual: ɵNgModuleDef, expected: Partial): void { + const expectation: NgModuleDefExpectations = { + bootstrap: [], + declarations: [], + imports: [], + exports: [], + schemas: null, + id: null, + ...expected, + }; + + expect(actual.type).toBe(TestClass); + expect(unwrap(actual.bootstrap)).toEqual(expectation.bootstrap); + expect(unwrap(actual.declarations)).toEqual(expectation.declarations); + expect(unwrap(actual.imports)).toEqual(expectation.imports); + expect(unwrap(actual.exports)).toEqual(expectation.exports); + expect(actual.schemas).toEqual(expectation.schemas); + expect(actual.id).toEqual(expectation.id); +} + +function unwrap(values: Type[]|(() => Type[])): Type[] { + return typeof values === 'function' ? values() : values; +} \ No newline at end of file diff --git a/packages/core/test/render3/jit_environment_spec.ts b/packages/core/test/render3/jit_environment_spec.ts index b19eef9c939..8d32cf56021 100644 --- a/packages/core/test/render3/jit_environment_spec.ts +++ b/packages/core/test/render3/jit_environment_spec.ts @@ -28,6 +28,8 @@ const INTERFACE_EXCEPTIONS = new Set([ const PARTIAL_ONLY = new Set([ 'ɵɵngDeclareDirective', 'ɵɵngDeclareComponent', + 'ɵɵngDeclareInjector', + 'ɵɵngDeclareNgModule', 'ɵɵngDeclarePipe', 'ChangeDetectionStrategy', 'ViewEncapsulation',