@angular/core 12.1.0 → 12.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/core-testing.umd.js +15 -4
- package/bundles/core-testing.umd.js.map +1 -1
- package/bundles/core.umd.js +91 -41
- package/bundles/core.umd.js.map +1 -1
- package/core.d.ts +14 -12
- package/core.metadata.json +1 -1
- package/esm2015/src/application_init.js +5 -5
- package/esm2015/src/application_ref.js +6 -2
- package/esm2015/src/change_detection/differs/iterable_differs.js +1 -1
- package/esm2015/src/compiler/compiler_facade.js +31 -8
- package/esm2015/src/compiler/compiler_facade_interface.js +1 -1
- package/esm2015/src/di/jit/injectable.js +4 -3
- package/esm2015/src/di/r3_injector.js +5 -2
- package/esm2015/src/error_handler.js +4 -8
- package/esm2015/src/errors.js +2 -2
- package/esm2015/src/event_emitter.js +1 -1
- package/esm2015/src/linker/component_factory_resolver.js +1 -1
- package/esm2015/src/linker/template_ref.js +1 -1
- package/esm2015/src/linker/view_container_ref.js +1 -1
- package/esm2015/src/metadata/di.js +1 -1
- package/esm2015/src/render3/component_ref.js +1 -1
- package/esm2015/src/render3/jit/directive.js +6 -5
- package/esm2015/src/render3/jit/module.js +7 -4
- package/esm2015/src/render3/jit/partial.js +27 -9
- package/esm2015/src/render3/jit/pipe.js +5 -3
- package/esm2015/src/render3/ng_module_ref.js +1 -1
- package/esm2015/src/render3/view_ref.js +1 -1
- package/esm2015/src/sanitization/bypass.js +1 -1
- package/esm2015/src/version.js +1 -1
- package/esm2015/src/view/entrypoint.js +1 -1
- package/esm2015/src/view/refs.js +1 -1
- package/esm2015/testing/src/ng_zone_mock.js +1 -1
- package/esm2015/testing/src/r3_test_bed_compiler.js +4 -1
- package/esm2015/testing/src/resolvers.js +1 -1
- package/esm2015/testing/src/test_bed.js +12 -4
- package/fesm2015/core.js +91 -41
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +15 -4
- package/fesm2015/testing.js.map +1 -1
- package/package.json +1 -1
- package/schematics/migrations/missing-injectable/providers_evaluator.js +1 -1
- package/schematics/migrations/static-queries/strategies/usage_strategy/template_usage_visitor.js +1 -1
- package/schematics/migrations/template-var-assignment/angular/html_variable_assignment_visitor.js +1 -1
- package/schematics/migrations.json +1 -1
- package/src/r3_symbols.d.ts +2 -3
- package/testing/testing.d.ts +2 -1
- package/testing/testing.metadata.json +1 -1
- package/testing.d.ts +1 -1
- package/schematics/migrations/abstract-control-parent/abstract-control-parent.externs.js +0 -0
- package/schematics/migrations/abstract-control-parent/index.mjs +0 -47
- package/schematics/migrations/abstract-control-parent/util.mjs +0 -50
- package/schematics/migrations/activated-route-snapshot-fragment/activated-route-snapshot-fragment.externs.js +0 -0
- package/schematics/migrations/activated-route-snapshot-fragment/index.mjs +0 -48
- package/schematics/migrations/activated-route-snapshot-fragment/util.mjs +0 -33
- package/schematics/migrations/can-activate-with-redirect-to/can-activate-with-redirect-to.externs.js +0 -0
- package/schematics/migrations/can-activate-with-redirect-to/index.mjs +0 -44
- package/schematics/migrations/can-activate-with-redirect-to/util.mjs +0 -55
- package/schematics/migrations/deep-shadow-piercing-selector/deep-shadow-piercing-selector.externs.js +0 -0
- package/schematics/migrations/deep-shadow-piercing-selector/index.mjs +0 -36
- package/schematics/migrations/dynamic-queries/dynamic-queries.externs.js +0 -0
- package/schematics/migrations/dynamic-queries/index.mjs +0 -51
- package/schematics/migrations/dynamic-queries/util.mjs +0 -65
- package/schematics/migrations/initial-navigation/collector.mjs +0 -105
- package/schematics/migrations/initial-navigation/index.mjs +0 -61
- package/schematics/migrations/initial-navigation/initial-navigation.externs.js +0 -0
- package/schematics/migrations/initial-navigation/transform.mjs +0 -54
- package/schematics/migrations/initial-navigation/update_recorder.mjs +0 -9
- package/schematics/migrations/initial-navigation/util.mjs +0 -28
- package/schematics/migrations/missing-injectable/definition_collector.mjs +0 -75
- package/schematics/migrations/missing-injectable/index.mjs +0 -100
- package/schematics/migrations/missing-injectable/missing-injectable.externs.js +0 -0
- package/schematics/migrations/missing-injectable/providers_evaluator.mjs +0 -50
- package/schematics/migrations/missing-injectable/transform.mjs +0 -187
- package/schematics/migrations/missing-injectable/update_recorder.mjs +0 -9
- package/schematics/migrations/module-with-providers/collector.mjs +0 -59
- package/schematics/migrations/module-with-providers/index.mjs +0 -71
- package/schematics/migrations/module-with-providers/module-with-providers.externs.js +0 -0
- package/schematics/migrations/module-with-providers/transform.mjs +0 -134
- package/schematics/migrations/module-with-providers/util.mjs +0 -25
- package/schematics/migrations/move-document/document_import_visitor.mjs +0 -60
- package/schematics/migrations/move-document/index.mjs +0 -71
- package/schematics/migrations/move-document/move-document.externs.js +0 -0
- package/schematics/migrations/move-document/move-import.mjs +0 -45
- package/schematics/migrations/native-view-encapsulation/index.mjs +0 -41
- package/schematics/migrations/native-view-encapsulation/native-view-encapsulation.externs.js +0 -0
- package/schematics/migrations/native-view-encapsulation/util.mjs +0 -34
- package/schematics/migrations/navigation-extras-omissions/index.mjs +0 -47
- package/schematics/migrations/navigation-extras-omissions/navigation-extras-omissions.externs.js +0 -0
- package/schematics/migrations/navigation-extras-omissions/util.mjs +0 -111
- package/schematics/migrations/relative-link-resolution/collector.mjs +0 -81
- package/schematics/migrations/relative-link-resolution/index.mjs +0 -62
- package/schematics/migrations/relative-link-resolution/relative-link-resolution.externs.js +0 -0
- package/schematics/migrations/relative-link-resolution/transform.mjs +0 -51
- package/schematics/migrations/relative-link-resolution/update_recorder.mjs +0 -9
- package/schematics/migrations/relative-link-resolution/util.mjs +0 -28
- package/schematics/migrations/renderer-to-renderer2/helpers.mjs +0 -224
- package/schematics/migrations/renderer-to-renderer2/index.mjs +0 -113
- package/schematics/migrations/renderer-to-renderer2/migration.mjs +0 -211
- package/schematics/migrations/renderer-to-renderer2/renderer-to-renderer2.externs.js +0 -0
- package/schematics/migrations/renderer-to-renderer2/util.mjs +0 -69
- package/schematics/migrations/router-preserve-query-params/index.mjs +0 -50
- package/schematics/migrations/router-preserve-query-params/router-preserve-query-params.externs.js +0 -0
- package/schematics/migrations/router-preserve-query-params/util.mjs +0 -88
- package/schematics/migrations/static-queries/angular/directive_inputs.mjs +0 -70
- package/schematics/migrations/static-queries/angular/ng_query_visitor.mjs +0 -113
- package/schematics/migrations/static-queries/angular/query-definition.mjs +0 -20
- package/schematics/migrations/static-queries/angular/super_class.mjs +0 -21
- package/schematics/migrations/static-queries/index.mjs +0 -206
- package/schematics/migrations/static-queries/static-queries.externs.js +0 -0
- package/schematics/migrations/static-queries/strategies/template_strategy/template_strategy.mjs +0 -200
- package/schematics/migrations/static-queries/strategies/test_strategy/test_strategy.mjs +0 -24
- package/schematics/migrations/static-queries/strategies/timing-strategy.mjs +0 -9
- package/schematics/migrations/static-queries/strategies/usage_strategy/declaration_usage_visitor.mjs +0 -355
- package/schematics/migrations/static-queries/strategies/usage_strategy/super_class_context.mjs +0 -38
- package/schematics/migrations/static-queries/strategies/usage_strategy/template_usage_visitor.mjs +0 -80
- package/schematics/migrations/static-queries/strategies/usage_strategy/usage_strategy.mjs +0 -154
- package/schematics/migrations/static-queries/transform.mjs +0 -88
- package/schematics/migrations/template-var-assignment/analyze_template.mjs +0 -25
- package/schematics/migrations/template-var-assignment/angular/html_variable_assignment_visitor.mjs +0 -65
- package/schematics/migrations/template-var-assignment/index.mjs +0 -68
- package/schematics/migrations/template-var-assignment/template-var-assignment.externs.js +0 -0
- package/schematics/migrations/undecorated-classes-with-decorated-fields/index.mjs +0 -92
- package/schematics/migrations/undecorated-classes-with-decorated-fields/transform.mjs +0 -286
- package/schematics/migrations/undecorated-classes-with-decorated-fields/undecorated-classes-with-decorated-fields.externs.js +0 -0
- package/schematics/migrations/undecorated-classes-with-decorated-fields/update_recorder.mjs +0 -9
- package/schematics/migrations/undecorated-classes-with-di/create_ngc_program.mjs +0 -43
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/convert_directive_metadata.mjs +0 -82
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/decorator_rewriter.mjs +0 -102
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/import_rewrite_visitor.mjs +0 -111
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/path_format.mjs +0 -17
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/source_file_exports.mjs +0 -51
- package/schematics/migrations/undecorated-classes-with-di/index.mjs +0 -162
- package/schematics/migrations/undecorated-classes-with-di/ng_declaration_collector.mjs +0 -124
- package/schematics/migrations/undecorated-classes-with-di/transform.mjs +0 -356
- package/schematics/migrations/undecorated-classes-with-di/undecorated-classes-with-di.externs.js +0 -0
- package/schematics/migrations/undecorated-classes-with-di/update_recorder.mjs +0 -9
- package/schematics/migrations/wait-for-async/index.mjs +0 -76
- package/schematics/migrations/wait-for-async/util.mjs +0 -23
- package/schematics/migrations/wait-for-async/wait-for-async.externs.js +0 -0
- package/schematics/migrations/xhr-factory/index.mjs +0 -91
- package/schematics/migrations/xhr-factory/xhr-factory.externs.js +0 -0
- package/schematics/utils/import_manager.mjs +0 -197
- package/schematics/utils/line_mappings.mjs +0 -60
- package/schematics/utils/ng_component_template.mjs +0 -96
- package/schematics/utils/ng_decorators.mjs +0 -23
- package/schematics/utils/parse_html.mjs +0 -24
- package/schematics/utils/project_tsconfig_paths.mjs +0 -74
- package/schematics/utils/schematics_prompt.mjs +0 -30
- package/schematics/utils/typescript/class_declaration.mjs +0 -33
- package/schematics/utils/typescript/compiler_host.mjs +0 -66
- package/schematics/utils/typescript/decorators.mjs +0 -20
- package/schematics/utils/typescript/find_base_classes.mjs +0 -30
- package/schematics/utils/typescript/functions.mjs +0 -28
- package/schematics/utils/typescript/imports.mjs +0 -91
- package/schematics/utils/typescript/nodes.mjs +0 -57
- package/schematics/utils/typescript/parse_tsconfig.mjs +0 -26
- package/schematics/utils/typescript/property_name.mjs +0 -23
- package/schematics/utils/typescript/symbol.mjs +0 -72
- package/schematics/utils/utils.externs.js +0 -0
package/bundles/core.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v12.1.
|
|
2
|
+
* @license Angular v12.1.4
|
|
3
3
|
* (c) 2010-2021 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -4340,15 +4340,38 @@
|
|
|
4340
4340
|
* Use of this source code is governed by an MIT-style license that can be
|
|
4341
4341
|
* found in the LICENSE file at https://angular.io/license
|
|
4342
4342
|
*/
|
|
4343
|
-
function getCompilerFacade() {
|
|
4343
|
+
function getCompilerFacade(request) {
|
|
4344
4344
|
var globalNg = _global['ng'];
|
|
4345
|
-
if (
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4345
|
+
if (globalNg && globalNg.ɵcompilerFacade) {
|
|
4346
|
+
return globalNg.ɵcompilerFacade;
|
|
4347
|
+
}
|
|
4348
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
4349
|
+
// Log the type as an error so that a developer can easily navigate to the type from the
|
|
4350
|
+
// console.
|
|
4351
|
+
console.error("JIT compilation failed for " + request.kind, request.type);
|
|
4352
|
+
var message = "The " + request.kind + " '" + request
|
|
4353
|
+
.type.name + "' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available.\n\n";
|
|
4354
|
+
if (request.usage === 1 /* PartialDeclaration */) {
|
|
4355
|
+
message += "The " + request.kind + " is part of a library that has been partially compiled.\n";
|
|
4356
|
+
message +=
|
|
4357
|
+
"However, the Angular Linker has not processed the library such that JIT compilation is used as fallback.\n";
|
|
4358
|
+
message += '\n';
|
|
4359
|
+
message +=
|
|
4360
|
+
"Ideally, the library is processed using the Angular Linker to become fully AOT compiled.\n";
|
|
4361
|
+
}
|
|
4362
|
+
else {
|
|
4363
|
+
message +=
|
|
4364
|
+
"JIT compilation is discouraged for production use-cases! Consider using AOT mode instead.\n";
|
|
4365
|
+
}
|
|
4366
|
+
message +=
|
|
4367
|
+
"Alternatively, the JIT compiler should be loaded by bootstrapping using '@angular/platform-browser-dynamic' or '@angular/platform-server',\n";
|
|
4368
|
+
message +=
|
|
4369
|
+
"or manually provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.";
|
|
4370
|
+
throw new Error(message);
|
|
4371
|
+
}
|
|
4372
|
+
else {
|
|
4373
|
+
throw new Error('JIT compiler unavailable');
|
|
4350
4374
|
}
|
|
4351
|
-
return globalNg.ɵcompilerFacade;
|
|
4352
4375
|
}
|
|
4353
4376
|
|
|
4354
4377
|
/**
|
|
@@ -6791,7 +6814,7 @@
|
|
|
6791
6814
|
return error[ERROR_ORIGINAL_ERROR];
|
|
6792
6815
|
}
|
|
6793
6816
|
function getErrorLogger(error) {
|
|
6794
|
-
return error[ERROR_LOGGER] || defaultErrorLogger;
|
|
6817
|
+
return error && error[ERROR_LOGGER] || defaultErrorLogger;
|
|
6795
6818
|
}
|
|
6796
6819
|
function defaultErrorLogger(console) {
|
|
6797
6820
|
var values = [];
|
|
@@ -6856,19 +6879,15 @@
|
|
|
6856
6879
|
};
|
|
6857
6880
|
/** @internal */
|
|
6858
6881
|
ErrorHandler.prototype._findContext = function (error) {
|
|
6859
|
-
|
|
6860
|
-
return getDebugContext(error) ? getDebugContext(error) :
|
|
6861
|
-
this._findContext(getOriginalError(error));
|
|
6862
|
-
}
|
|
6863
|
-
return null;
|
|
6882
|
+
return error ? (getDebugContext(error) || this._findContext(getOriginalError(error))) : null;
|
|
6864
6883
|
};
|
|
6865
6884
|
/** @internal */
|
|
6866
6885
|
ErrorHandler.prototype._findOriginalError = function (error) {
|
|
6867
|
-
var e = getOriginalError(error);
|
|
6886
|
+
var e = error && getOriginalError(error);
|
|
6868
6887
|
while (e && getOriginalError(e)) {
|
|
6869
6888
|
e = getOriginalError(e);
|
|
6870
6889
|
}
|
|
6871
|
-
return e;
|
|
6890
|
+
return e || null;
|
|
6872
6891
|
};
|
|
6873
6892
|
return ErrorHandler;
|
|
6874
6893
|
}());
|
|
@@ -11729,6 +11748,7 @@
|
|
|
11729
11748
|
this.assertNotDestroyed();
|
|
11730
11749
|
// Set the injection context.
|
|
11731
11750
|
var previousInjector = setCurrentInjector(this);
|
|
11751
|
+
var previousInjectImplementation = setInjectImplementation(undefined);
|
|
11732
11752
|
try {
|
|
11733
11753
|
// Check for the SkipSelf flag.
|
|
11734
11754
|
if (!(flags & exports.InjectFlags.SkipSelf)) {
|
|
@@ -11781,7 +11801,8 @@
|
|
|
11781
11801
|
}
|
|
11782
11802
|
}
|
|
11783
11803
|
finally {
|
|
11784
|
-
// Lastly,
|
|
11804
|
+
// Lastly, restore the previous injection context.
|
|
11805
|
+
setInjectImplementation(previousInjectImplementation);
|
|
11785
11806
|
setCurrentInjector(previousInjector);
|
|
11786
11807
|
}
|
|
11787
11808
|
};
|
|
@@ -14206,7 +14227,8 @@
|
|
|
14206
14227
|
Object.defineProperty(type, NG_PROV_DEF, {
|
|
14207
14228
|
get: function () {
|
|
14208
14229
|
if (ngInjectableDef === null) {
|
|
14209
|
-
|
|
14230
|
+
var compiler = getCompilerFacade({ usage: 0 /* Decorator */, kind: 'injectable', type: type });
|
|
14231
|
+
ngInjectableDef = compiler.compileInjectable(angularCoreDiEnv, "ng:///" + type.name + "/\u0275prov.js", getInjectableMetadata(type, meta));
|
|
14210
14232
|
}
|
|
14211
14233
|
return ngInjectableDef;
|
|
14212
14234
|
},
|
|
@@ -14217,7 +14239,7 @@
|
|
|
14217
14239
|
Object.defineProperty(type, NG_FACTORY_DEF, {
|
|
14218
14240
|
get: function () {
|
|
14219
14241
|
if (ngFactoryDef === null) {
|
|
14220
|
-
var compiler = getCompilerFacade();
|
|
14242
|
+
var compiler = getCompilerFacade({ usage: 0 /* Decorator */, kind: 'injectable', type: type });
|
|
14221
14243
|
ngFactoryDef = compiler.compileFactory(angularCoreDiEnv, "ng:///" + type.name + "/\u0275fac.js", {
|
|
14222
14244
|
name: type.name,
|
|
14223
14245
|
type: type,
|
|
@@ -22044,7 +22066,7 @@
|
|
|
22044
22066
|
/**
|
|
22045
22067
|
* @publicApi
|
|
22046
22068
|
*/
|
|
22047
|
-
var VERSION = new Version('12.1.
|
|
22069
|
+
var VERSION = new Version('12.1.4');
|
|
22048
22070
|
|
|
22049
22071
|
/**
|
|
22050
22072
|
* @license
|
|
@@ -27643,7 +27665,8 @@
|
|
|
27643
27665
|
// go into an infinite loop before we've reached the point where we throw all the errors.
|
|
27644
27666
|
throw new Error("'" + stringifyForError(moduleType) + "' module can't import itself");
|
|
27645
27667
|
}
|
|
27646
|
-
|
|
27668
|
+
var compiler = getCompilerFacade({ usage: 0 /* Decorator */, kind: 'NgModule', type: moduleType });
|
|
27669
|
+
ngModuleDef = compiler.compileNgModule(angularCoreEnv, "ng:///" + moduleType.name + "/\u0275mod.js", {
|
|
27647
27670
|
type: moduleType,
|
|
27648
27671
|
bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY).map(resolveForwardRef),
|
|
27649
27672
|
declarations: declarations.map(resolveForwardRef),
|
|
@@ -27671,7 +27694,7 @@
|
|
|
27671
27694
|
Object.defineProperty(moduleType, NG_FACTORY_DEF, {
|
|
27672
27695
|
get: function () {
|
|
27673
27696
|
if (ngFactoryDef === null) {
|
|
27674
|
-
var compiler = getCompilerFacade();
|
|
27697
|
+
var compiler = getCompilerFacade({ usage: 0 /* Decorator */, kind: 'NgModule', type: moduleType });
|
|
27675
27698
|
ngFactoryDef = compiler.compileFactory(angularCoreEnv, "ng:///" + moduleType.name + "/\u0275fac.js", {
|
|
27676
27699
|
name: moduleType.name,
|
|
27677
27700
|
type: moduleType,
|
|
@@ -27700,7 +27723,9 @@
|
|
|
27700
27723
|
(ngModule.exports || EMPTY_ARRAY).map(resolveForwardRef),
|
|
27701
27724
|
],
|
|
27702
27725
|
};
|
|
27703
|
-
|
|
27726
|
+
var compiler = getCompilerFacade({ usage: 0 /* Decorator */, kind: 'NgModule', type: moduleType });
|
|
27727
|
+
ngInjectorDef =
|
|
27728
|
+
compiler.compileInjector(angularCoreEnv, "ng:///" + moduleType.name + "/\u0275inj.js", meta);
|
|
27704
27729
|
}
|
|
27705
27730
|
return ngInjectorDef;
|
|
27706
27731
|
},
|
|
@@ -28063,7 +28088,7 @@
|
|
|
28063
28088
|
Object.defineProperty(type, NG_COMP_DEF, {
|
|
28064
28089
|
get: function () {
|
|
28065
28090
|
if (ngComponentDef === null) {
|
|
28066
|
-
var compiler = getCompilerFacade();
|
|
28091
|
+
var compiler = getCompilerFacade({ usage: 0 /* Decorator */, kind: 'component', type: type });
|
|
28067
28092
|
if (componentNeedsResolution(metadata)) {
|
|
28068
28093
|
var error = ["Component '" + type.name + "' is not resolved:"];
|
|
28069
28094
|
if (metadata.templateUrl) {
|
|
@@ -28154,8 +28179,9 @@
|
|
|
28154
28179
|
// that use `@Directive()` with no selector. In that case, pass empty object to the
|
|
28155
28180
|
// `directiveMetadata` function instead of null.
|
|
28156
28181
|
var meta = getDirectiveMetadata$1(type, directive || {});
|
|
28182
|
+
var compiler = getCompilerFacade({ usage: 0 /* Decorator */, kind: 'directive', type: type });
|
|
28157
28183
|
ngDirectiveDef =
|
|
28158
|
-
|
|
28184
|
+
compiler.compileDirective(angularCoreEnv, meta.sourceMapUrl, meta.metadata);
|
|
28159
28185
|
}
|
|
28160
28186
|
return ngDirectiveDef;
|
|
28161
28187
|
},
|
|
@@ -28166,7 +28192,7 @@
|
|
|
28166
28192
|
function getDirectiveMetadata$1(type, metadata) {
|
|
28167
28193
|
var name = type && type.name;
|
|
28168
28194
|
var sourceMapUrl = "ng:///" + name + "/\u0275dir.js";
|
|
28169
|
-
var compiler = getCompilerFacade();
|
|
28195
|
+
var compiler = getCompilerFacade({ usage: 0 /* Decorator */, kind: 'directive', type: type });
|
|
28170
28196
|
var facade = directiveMetadata(type, metadata);
|
|
28171
28197
|
facade.typeSourceSpan = compiler.createParseSourceSpan('Directive', name, sourceMapUrl);
|
|
28172
28198
|
if (facade.usesInheritance) {
|
|
@@ -28180,7 +28206,7 @@
|
|
|
28180
28206
|
get: function () {
|
|
28181
28207
|
if (ngFactoryDef === null) {
|
|
28182
28208
|
var meta = getDirectiveMetadata$1(type, metadata);
|
|
28183
|
-
var compiler = getCompilerFacade();
|
|
28209
|
+
var compiler = getCompilerFacade({ usage: 0 /* Decorator */, kind: 'directive', type: type });
|
|
28184
28210
|
ngFactoryDef = compiler.compileFactory(angularCoreEnv, "ng:///" + type.name + "/\u0275fac.js", {
|
|
28185
28211
|
name: meta.metadata.name,
|
|
28186
28212
|
type: meta.metadata.type,
|
|
@@ -28334,7 +28360,7 @@
|
|
|
28334
28360
|
get: function () {
|
|
28335
28361
|
if (ngFactoryDef === null) {
|
|
28336
28362
|
var metadata = getPipeMetadata(type, meta);
|
|
28337
|
-
var compiler = getCompilerFacade();
|
|
28363
|
+
var compiler = getCompilerFacade({ usage: 0 /* Decorator */, kind: 'pipe', type: metadata.type });
|
|
28338
28364
|
ngFactoryDef = compiler.compileFactory(angularCoreEnv, "ng:///" + metadata.name + "/\u0275fac.js", {
|
|
28339
28365
|
name: metadata.name,
|
|
28340
28366
|
type: metadata.type,
|
|
@@ -28352,7 +28378,9 @@
|
|
|
28352
28378
|
get: function () {
|
|
28353
28379
|
if (ngPipeDef === null) {
|
|
28354
28380
|
var metadata = getPipeMetadata(type, meta);
|
|
28355
|
-
|
|
28381
|
+
var compiler = getCompilerFacade({ usage: 0 /* Decorator */, kind: 'pipe', type: metadata.type });
|
|
28382
|
+
ngPipeDef =
|
|
28383
|
+
compiler.compilePipe(angularCoreEnv, "ng:///" + metadata.name + "/\u0275pipe.js", metadata);
|
|
28356
28384
|
}
|
|
28357
28385
|
return ngPipeDef;
|
|
28358
28386
|
},
|
|
@@ -28583,11 +28611,11 @@
|
|
|
28583
28611
|
* through DI.
|
|
28584
28612
|
*
|
|
28585
28613
|
* ```
|
|
28586
|
-
* function
|
|
28587
|
-
* return httpClient.get("https://someUrl.com/api/user")
|
|
28614
|
+
* function initializeAppFactory(httpClient: HttpClient): () => Observable<any> {
|
|
28615
|
+
* return () => httpClient.get("https://someUrl.com/api/user")
|
|
28588
28616
|
* .pipe(
|
|
28589
28617
|
* tap(user => { ... })
|
|
28590
|
-
* )
|
|
28618
|
+
* );
|
|
28591
28619
|
* }
|
|
28592
28620
|
*
|
|
28593
28621
|
* @NgModule({
|
|
@@ -28596,7 +28624,7 @@
|
|
|
28596
28624
|
* bootstrap: [AppComponent],
|
|
28597
28625
|
* providers: [{
|
|
28598
28626
|
* provide: APP_INITIALIZER,
|
|
28599
|
-
* useFactory:
|
|
28627
|
+
* useFactory: initializeAppFactory,
|
|
28600
28628
|
* deps: [HttpClient],
|
|
28601
28629
|
* multi: true
|
|
28602
28630
|
* }]
|
|
@@ -29788,7 +29816,11 @@
|
|
|
29788
29816
|
if (compilerProviders.length === 0) {
|
|
29789
29817
|
return Promise.resolve(moduleFactory);
|
|
29790
29818
|
}
|
|
29791
|
-
var compiler = getCompilerFacade(
|
|
29819
|
+
var compiler = getCompilerFacade({
|
|
29820
|
+
usage: 0 /* Decorator */,
|
|
29821
|
+
kind: 'NgModule',
|
|
29822
|
+
type: moduleType,
|
|
29823
|
+
});
|
|
29792
29824
|
var compilerInjector = Injector.create({ providers: compilerProviders });
|
|
29793
29825
|
var resourceLoader = compilerInjector.get(compiler.ResourceLoader);
|
|
29794
29826
|
// The resource loader can also return a string while the "resolveComponentResources"
|
|
@@ -33907,7 +33939,7 @@
|
|
|
33907
33939
|
* @codeGenApi
|
|
33908
33940
|
*/
|
|
33909
33941
|
function ɵɵngDeclareDirective(decl) {
|
|
33910
|
-
var compiler = getCompilerFacade();
|
|
33942
|
+
var compiler = getCompilerFacade({ usage: 1 /* PartialDeclaration */, kind: 'directive', type: decl.type });
|
|
33911
33943
|
return compiler.compileDirectiveDeclaration(angularCoreEnv, "ng:///" + decl.type.name + "/\u0275fac.js", decl);
|
|
33912
33944
|
}
|
|
33913
33945
|
/**
|
|
@@ -33925,7 +33957,7 @@
|
|
|
33925
33957
|
* @codeGenApi
|
|
33926
33958
|
*/
|
|
33927
33959
|
function ɵɵngDeclareComponent(decl) {
|
|
33928
|
-
var compiler = getCompilerFacade();
|
|
33960
|
+
var compiler = getCompilerFacade({ usage: 1 /* PartialDeclaration */, kind: 'component', type: decl.type });
|
|
33929
33961
|
return compiler.compileComponentDeclaration(angularCoreEnv, "ng:///" + decl.type.name + "/\u0275cmp.js", decl);
|
|
33930
33962
|
}
|
|
33931
33963
|
/**
|
|
@@ -33934,16 +33966,34 @@
|
|
|
33934
33966
|
* @codeGenApi
|
|
33935
33967
|
*/
|
|
33936
33968
|
function ɵɵngDeclareFactory(decl) {
|
|
33937
|
-
var compiler = getCompilerFacade(
|
|
33969
|
+
var compiler = getCompilerFacade({
|
|
33970
|
+
usage: 1 /* PartialDeclaration */,
|
|
33971
|
+
kind: getFactoryKind(decl.target),
|
|
33972
|
+
type: decl.type
|
|
33973
|
+
});
|
|
33938
33974
|
return compiler.compileFactoryDeclaration(angularCoreEnv, "ng:///" + decl.type.name + "/\u0275fac.js", decl);
|
|
33939
33975
|
}
|
|
33976
|
+
function getFactoryKind(target) {
|
|
33977
|
+
switch (target) {
|
|
33978
|
+
case exports.ɵɵFactoryTarget.Directive:
|
|
33979
|
+
return 'directive';
|
|
33980
|
+
case exports.ɵɵFactoryTarget.Component:
|
|
33981
|
+
return 'component';
|
|
33982
|
+
case exports.ɵɵFactoryTarget.Injectable:
|
|
33983
|
+
return 'injectable';
|
|
33984
|
+
case exports.ɵɵFactoryTarget.Pipe:
|
|
33985
|
+
return 'pipe';
|
|
33986
|
+
case exports.ɵɵFactoryTarget.NgModule:
|
|
33987
|
+
return 'NgModule';
|
|
33988
|
+
}
|
|
33989
|
+
}
|
|
33940
33990
|
/**
|
|
33941
33991
|
* Compiles a partial injectable declaration object into a full injectable definition object.
|
|
33942
33992
|
*
|
|
33943
33993
|
* @codeGenApi
|
|
33944
33994
|
*/
|
|
33945
33995
|
function ɵɵngDeclareInjectable(decl) {
|
|
33946
|
-
var compiler = getCompilerFacade();
|
|
33996
|
+
var compiler = getCompilerFacade({ usage: 1 /* PartialDeclaration */, kind: 'injectable', type: decl.type });
|
|
33947
33997
|
return compiler.compileInjectableDeclaration(angularCoreEnv, "ng:///" + decl.type.name + "/\u0275prov.js", decl);
|
|
33948
33998
|
}
|
|
33949
33999
|
/**
|
|
@@ -33952,7 +34002,7 @@
|
|
|
33952
34002
|
* @codeGenApi
|
|
33953
34003
|
*/
|
|
33954
34004
|
function ɵɵngDeclareInjector(decl) {
|
|
33955
|
-
var compiler = getCompilerFacade();
|
|
34005
|
+
var compiler = getCompilerFacade({ usage: 1 /* PartialDeclaration */, kind: 'NgModule', type: decl.type });
|
|
33956
34006
|
return compiler.compileInjectorDeclaration(angularCoreEnv, "ng:///" + decl.type.name + "/\u0275inj.js", decl);
|
|
33957
34007
|
}
|
|
33958
34008
|
/**
|
|
@@ -33961,7 +34011,7 @@
|
|
|
33961
34011
|
* @codeGenApi
|
|
33962
34012
|
*/
|
|
33963
34013
|
function ɵɵngDeclareNgModule(decl) {
|
|
33964
|
-
var compiler = getCompilerFacade();
|
|
34014
|
+
var compiler = getCompilerFacade({ usage: 1 /* PartialDeclaration */, kind: 'NgModule', type: decl.type });
|
|
33965
34015
|
return compiler.compileNgModuleDeclaration(angularCoreEnv, "ng:///" + decl.type.name + "/\u0275mod.js", decl);
|
|
33966
34016
|
}
|
|
33967
34017
|
/**
|
|
@@ -33970,7 +34020,7 @@
|
|
|
33970
34020
|
* @codeGenApi
|
|
33971
34021
|
*/
|
|
33972
34022
|
function ɵɵngDeclarePipe(decl) {
|
|
33973
|
-
var compiler = getCompilerFacade();
|
|
34023
|
+
var compiler = getCompilerFacade({ usage: 1 /* PartialDeclaration */, kind: 'pipe', type: decl.type });
|
|
33974
34024
|
return compiler.compilePipeDeclaration(angularCoreEnv, "ng:///" + decl.type.name + "/\u0275pipe.js", decl);
|
|
33975
34025
|
}
|
|
33976
34026
|
|