@angular/core 15.0.2 → 15.0.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/esm2020/src/application_init.mjs +2 -1
- package/esm2020/src/application_ref.mjs +9 -2
- package/esm2020/src/di/create_injector.mjs +1 -1
- package/esm2020/src/di/r3_injector.mjs +2 -2
- package/esm2020/src/errors.mjs +1 -1
- package/esm2020/src/render3/assert.mjs +1 -6
- package/esm2020/src/render3/instructions/shared.mjs +9 -8
- package/esm2020/src/render3/namespaces.mjs +1 -8
- package/esm2020/src/render3/node_manipulation.mjs +3 -7
- package/esm2020/src/render3/node_selector_matcher.mjs +1 -4
- package/esm2020/src/render3/query.mjs +1 -6
- package/esm2020/src/render3/state.mjs +1 -4
- package/esm2020/src/render3/util/view_utils.mjs +1 -15
- package/esm2020/src/util/array_utils.mjs +3 -71
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/logger.mjs +3 -3
- package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
- package/esm2020/testing/src/test_bed.mjs +1 -1
- package/fesm2015/core.mjs +27 -162
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +18 -161
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +27 -162
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +18 -161
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +2 -2
- package/package.json +1 -1
- package/schematics/migrations.json +3 -18
- package/testing/index.d.ts +4 -1
- package/schematics/migrations/entry-components/index.d.ts +0 -11
- package/schematics/migrations/entry-components/index.js +0 -71
- package/schematics/migrations/entry-components/util.d.ts +0 -16
- package/schematics/migrations/entry-components/util.js +0 -57
- package/schematics/migrations/path-match-type/index.d.ts +0 -11
- package/schematics/migrations/path-match-type/index.js +0 -95
- package/schematics/migrations/path-match-type/transform.d.ts +0 -19
- package/schematics/migrations/path-match-type/transform.js +0 -48
- package/schematics/migrations/path-match-type/update_recorder.d.ts +0 -18
- package/schematics/migrations/path-match-type/update_recorder.js +0 -20
- package/schematics/migrations/path-match-type/util.d.ts +0 -11
- package/schematics/migrations/path-match-type/util.js +0 -106
- package/schematics/migrations/typed-forms/index.d.ts +0 -10
- package/schematics/migrations/typed-forms/index.js +0 -68
- package/schematics/migrations/typed-forms/util.d.ts +0 -19
- package/schematics/migrations/typed-forms/util.js +0 -134
package/fesm2020/core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.0.
|
|
2
|
+
* @license Angular v15.0.4
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -1446,7 +1446,7 @@ const EMBEDDED_VIEW_INJECTOR = 21;
|
|
|
1446
1446
|
const HEADER_OFFSET = 22;
|
|
1447
1447
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
1448
1448
|
// failure based on types.
|
|
1449
|
-
const unusedValueExportToPlacateAjd$
|
|
1449
|
+
const unusedValueExportToPlacateAjd$4 = 1;
|
|
1450
1450
|
|
|
1451
1451
|
/**
|
|
1452
1452
|
* @license
|
|
@@ -1491,7 +1491,7 @@ const MOVED_VIEWS = 9;
|
|
|
1491
1491
|
const CONTAINER_HEADER_OFFSET = 10;
|
|
1492
1492
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
1493
1493
|
// failure based on types.
|
|
1494
|
-
const unusedValueExportToPlacateAjd$
|
|
1494
|
+
const unusedValueExportToPlacateAjd$3 = 1;
|
|
1495
1495
|
|
|
1496
1496
|
/**
|
|
1497
1497
|
* @license
|
|
@@ -1576,11 +1576,6 @@ function assertHasParent(tNode) {
|
|
|
1576
1576
|
assertDefined(tNode, 'currentTNode should exist!');
|
|
1577
1577
|
assertDefined(tNode.parent, 'currentTNode should have a parent');
|
|
1578
1578
|
}
|
|
1579
|
-
function assertDataNext(lView, index, arr) {
|
|
1580
|
-
if (arr == null)
|
|
1581
|
-
arr = lView;
|
|
1582
|
-
assertEqual(arr.length, index, `index ${index} expected to be at the end of arr (length ${arr.length})`);
|
|
1583
|
-
}
|
|
1584
1579
|
function assertLContainer(value) {
|
|
1585
1580
|
assertDefined(value, 'LContainer must be defined');
|
|
1586
1581
|
assertEqual(isLContainer(value), true, 'Expecting LContainer');
|
|
@@ -1829,14 +1824,7 @@ const profiler = function (event, instance, hookOrListener) {
|
|
|
1829
1824
|
* found in the LICENSE file at https://angular.io/license
|
|
1830
1825
|
*/
|
|
1831
1826
|
const SVG_NAMESPACE = 'svg';
|
|
1832
|
-
const SVG_NAMESPACE_URI = 'http://www.w3.org/2000/svg';
|
|
1833
1827
|
const MATH_ML_NAMESPACE = 'math';
|
|
1834
|
-
const MATH_ML_NAMESPACE_URI = 'http://www.w3.org/1998/MathML/';
|
|
1835
|
-
function getNamespaceUri(namespace) {
|
|
1836
|
-
const name = namespace.toLowerCase();
|
|
1837
|
-
return name === SVG_NAMESPACE ? SVG_NAMESPACE_URI :
|
|
1838
|
-
(name === MATH_ML_NAMESPACE ? MATH_ML_NAMESPACE_URI : null);
|
|
1839
|
-
}
|
|
1840
1828
|
|
|
1841
1829
|
/**
|
|
1842
1830
|
* @license
|
|
@@ -1885,20 +1873,6 @@ function unwrapLView(value) {
|
|
|
1885
1873
|
}
|
|
1886
1874
|
return null;
|
|
1887
1875
|
}
|
|
1888
|
-
/**
|
|
1889
|
-
* Returns `LContainer` or `null` if not found.
|
|
1890
|
-
* @param value wrapped value of `RNode`, `LView`, `LContainer`
|
|
1891
|
-
*/
|
|
1892
|
-
function unwrapLContainer(value) {
|
|
1893
|
-
while (Array.isArray(value)) {
|
|
1894
|
-
// This check is same as `isLContainer()` but we don't call at as we don't want to call
|
|
1895
|
-
// `Array.isArray()` twice and give JITer more work for inlining.
|
|
1896
|
-
if (value[TYPE] === true)
|
|
1897
|
-
return value;
|
|
1898
|
-
value = value[HOST];
|
|
1899
|
-
}
|
|
1900
|
-
return null;
|
|
1901
|
-
}
|
|
1902
1876
|
/**
|
|
1903
1877
|
* Retrieves an element value from the provided `viewData`, by unwrapping
|
|
1904
1878
|
* from any containers, component views, or style contexts.
|
|
@@ -2158,9 +2132,6 @@ function isCurrentTNodeParent() {
|
|
|
2158
2132
|
function setCurrentTNodeAsNotParent() {
|
|
2159
2133
|
instructionState.lFrame.isParent = false;
|
|
2160
2134
|
}
|
|
2161
|
-
function setCurrentTNodeAsParent() {
|
|
2162
|
-
instructionState.lFrame.isParent = true;
|
|
2163
|
-
}
|
|
2164
2135
|
function getContextLView() {
|
|
2165
2136
|
const contextLView = instructionState.lFrame.contextLView;
|
|
2166
2137
|
ngDevMode && assertDefined(contextLView, 'contextLView must be defined.');
|
|
@@ -2883,7 +2854,7 @@ function isFactory(obj) {
|
|
|
2883
2854
|
}
|
|
2884
2855
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
2885
2856
|
// failure based on types.
|
|
2886
|
-
const unusedValueExportToPlacateAjd$
|
|
2857
|
+
const unusedValueExportToPlacateAjd$2 = 1;
|
|
2887
2858
|
|
|
2888
2859
|
/**
|
|
2889
2860
|
* Converts `TNodeType` into human readable text.
|
|
@@ -2902,7 +2873,7 @@ function toTNodeTypeAsString(tNodeType) {
|
|
|
2902
2873
|
}
|
|
2903
2874
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
2904
2875
|
// failure based on types.
|
|
2905
|
-
const unusedValueExportToPlacateAjd$
|
|
2876
|
+
const unusedValueExportToPlacateAjd$1 = 1;
|
|
2906
2877
|
/**
|
|
2907
2878
|
* Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.
|
|
2908
2879
|
*
|
|
@@ -4399,17 +4370,6 @@ function isType(v) {
|
|
|
4399
4370
|
* Use of this source code is governed by an MIT-style license that can be
|
|
4400
4371
|
* found in the LICENSE file at https://angular.io/license
|
|
4401
4372
|
*/
|
|
4402
|
-
/**
|
|
4403
|
-
* Equivalent to ES6 spread, add each item to an array.
|
|
4404
|
-
*
|
|
4405
|
-
* @param items The items to add
|
|
4406
|
-
* @param arr The array to which you want to add the items
|
|
4407
|
-
*/
|
|
4408
|
-
function addAllToArray(items, arr) {
|
|
4409
|
-
for (let i = 0; i < items.length; i++) {
|
|
4410
|
-
arr.push(items[i]);
|
|
4411
|
-
}
|
|
4412
|
-
}
|
|
4413
4373
|
/**
|
|
4414
4374
|
* Determines if the contents of two arrays is identical
|
|
4415
4375
|
*
|
|
@@ -4437,25 +4397,8 @@ function arrayEquals(a, b, identityAccessor) {
|
|
|
4437
4397
|
/**
|
|
4438
4398
|
* Flattens an array.
|
|
4439
4399
|
*/
|
|
4440
|
-
function flatten(list
|
|
4441
|
-
|
|
4442
|
-
dst = list;
|
|
4443
|
-
for (let i = 0; i < list.length; i++) {
|
|
4444
|
-
let item = list[i];
|
|
4445
|
-
if (Array.isArray(item)) {
|
|
4446
|
-
// we need to inline it.
|
|
4447
|
-
if (dst === list) {
|
|
4448
|
-
// Our assumption that the list was already flat was wrong and
|
|
4449
|
-
// we need to clone flat since we need to write to it.
|
|
4450
|
-
dst = list.slice(0, i);
|
|
4451
|
-
}
|
|
4452
|
-
flatten(item, dst);
|
|
4453
|
-
}
|
|
4454
|
-
else if (dst !== list) {
|
|
4455
|
-
dst.push(item);
|
|
4456
|
-
}
|
|
4457
|
-
}
|
|
4458
|
-
return dst;
|
|
4400
|
+
function flatten(list) {
|
|
4401
|
+
return list.flat(Number.POSITIVE_INFINITY);
|
|
4459
4402
|
}
|
|
4460
4403
|
function deepForEach(input, fn) {
|
|
4461
4404
|
input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));
|
|
@@ -4565,46 +4508,6 @@ function arrayInsert2(array, index, value1, value2) {
|
|
|
4565
4508
|
array[index + 1] = value2;
|
|
4566
4509
|
}
|
|
4567
4510
|
}
|
|
4568
|
-
/**
|
|
4569
|
-
* Insert a `value` into an `array` so that the array remains sorted.
|
|
4570
|
-
*
|
|
4571
|
-
* NOTE:
|
|
4572
|
-
* - Duplicates are not allowed, and are ignored.
|
|
4573
|
-
* - This uses binary search algorithm for fast inserts.
|
|
4574
|
-
*
|
|
4575
|
-
* @param array A sorted array to insert into.
|
|
4576
|
-
* @param value The value to insert.
|
|
4577
|
-
* @returns index of the inserted value.
|
|
4578
|
-
*/
|
|
4579
|
-
function arrayInsertSorted(array, value) {
|
|
4580
|
-
let index = arrayIndexOfSorted(array, value);
|
|
4581
|
-
if (index < 0) {
|
|
4582
|
-
// if we did not find it insert it.
|
|
4583
|
-
index = ~index;
|
|
4584
|
-
arrayInsert(array, index, value);
|
|
4585
|
-
}
|
|
4586
|
-
return index;
|
|
4587
|
-
}
|
|
4588
|
-
/**
|
|
4589
|
-
* Remove `value` from a sorted `array`.
|
|
4590
|
-
*
|
|
4591
|
-
* NOTE:
|
|
4592
|
-
* - This uses binary search algorithm for fast removals.
|
|
4593
|
-
*
|
|
4594
|
-
* @param array A sorted array to remove from.
|
|
4595
|
-
* @param value The value to remove.
|
|
4596
|
-
* @returns index of the removed value.
|
|
4597
|
-
* - positive index if value found and removed.
|
|
4598
|
-
* - negative index if value not found. (`~index` to get the value where it should have been
|
|
4599
|
-
* inserted)
|
|
4600
|
-
*/
|
|
4601
|
-
function arrayRemoveSorted(array, value) {
|
|
4602
|
-
const index = arrayIndexOfSorted(array, value);
|
|
4603
|
-
if (index >= 0) {
|
|
4604
|
-
arraySplice(array, index, 1);
|
|
4605
|
-
}
|
|
4606
|
-
return index;
|
|
4607
|
-
}
|
|
4608
4511
|
/**
|
|
4609
4512
|
* Get an index of an `value` in a sorted `array`.
|
|
4610
4513
|
*
|
|
@@ -6056,28 +5959,6 @@ function ensureIcuContainerVisitorLoaded(loader) {
|
|
|
6056
5959
|
}
|
|
6057
5960
|
}
|
|
6058
5961
|
|
|
6059
|
-
/**
|
|
6060
|
-
* @license
|
|
6061
|
-
* Copyright Google LLC All Rights Reserved.
|
|
6062
|
-
*
|
|
6063
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6064
|
-
* found in the LICENSE file at https://angular.io/license
|
|
6065
|
-
*/
|
|
6066
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
6067
|
-
// failure based on types.
|
|
6068
|
-
const unusedValueExportToPlacateAjd$4 = 1;
|
|
6069
|
-
|
|
6070
|
-
/**
|
|
6071
|
-
* @license
|
|
6072
|
-
* Copyright Google LLC All Rights Reserved.
|
|
6073
|
-
*
|
|
6074
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6075
|
-
* found in the LICENSE file at https://angular.io/license
|
|
6076
|
-
*/
|
|
6077
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
6078
|
-
// failure based on types.
|
|
6079
|
-
const unusedValueExportToPlacateAjd$3 = 1;
|
|
6080
|
-
|
|
6081
5962
|
/**
|
|
6082
5963
|
* @license
|
|
6083
5964
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -6149,7 +6030,6 @@ function getNearestLContainer(viewOrContainer) {
|
|
|
6149
6030
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6150
6031
|
* found in the LICENSE file at https://angular.io/license
|
|
6151
6032
|
*/
|
|
6152
|
-
const unusedValueToPlacateAjd$2 = unusedValueExportToPlacateAjd$7 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$3 + unusedValueExportToPlacateAjd$8;
|
|
6153
6033
|
/**
|
|
6154
6034
|
* NOTE: for performance reasons, the possible actions are inlined within the function instead of
|
|
6155
6035
|
* being passed as an argument.
|
|
@@ -8695,7 +8575,7 @@ class R3Injector extends EnvironmentInjector {
|
|
|
8695
8575
|
try {
|
|
8696
8576
|
const initializers = this.get(ENVIRONMENT_INITIALIZER.multi, EMPTY_ARRAY, InjectFlags.Self);
|
|
8697
8577
|
if (ngDevMode && !Array.isArray(initializers)) {
|
|
8698
|
-
throw new RuntimeError(209 /* RuntimeErrorCode.INVALID_MULTI_PROVIDER */, 'Unexpected type of the `ENVIRONMENT_INITIALIZER` token value ' +
|
|
8578
|
+
throw new RuntimeError(-209 /* RuntimeErrorCode.INVALID_MULTI_PROVIDER */, 'Unexpected type of the `ENVIRONMENT_INITIALIZER` token value ' +
|
|
8699
8579
|
`(expected an array, but got ${typeof initializers}). ` +
|
|
8700
8580
|
'Please check that the `ENVIRONMENT_INITIALIZER` token is configured as a ' +
|
|
8701
8581
|
'`multi: true` provider.');
|
|
@@ -9125,7 +9005,7 @@ class Version {
|
|
|
9125
9005
|
/**
|
|
9126
9006
|
* @publicApi
|
|
9127
9007
|
*/
|
|
9128
|
-
const VERSION = new Version('15.0.
|
|
9008
|
+
const VERSION = new Version('15.0.4');
|
|
9129
9009
|
|
|
9130
9010
|
/**
|
|
9131
9011
|
* @license
|
|
@@ -9446,7 +9326,6 @@ function classIndexOf(className, classToSearch, startingIndex) {
|
|
|
9446
9326
|
* Use of this source code is governed by an MIT-style license that can be
|
|
9447
9327
|
* found in the LICENSE file at https://angular.io/license
|
|
9448
9328
|
*/
|
|
9449
|
-
const unusedValueToPlacateAjd$1 = unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$4;
|
|
9450
9329
|
const NG_TEMPLATE_SELECTOR = 'ng-template';
|
|
9451
9330
|
/**
|
|
9452
9331
|
* Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive)
|
|
@@ -11905,6 +11784,12 @@ function lastSelectedElementIdx(hostBindingOpCodes) {
|
|
|
11905
11784
|
function instantiateAllDirectives(tView, lView, tNode, native) {
|
|
11906
11785
|
const start = tNode.directiveStart;
|
|
11907
11786
|
const end = tNode.directiveEnd;
|
|
11787
|
+
// The component view needs to be created before creating the node injector
|
|
11788
|
+
// since it is used to inject some special symbols like `ChangeDetectorRef`.
|
|
11789
|
+
if (isComponentHost(tNode)) {
|
|
11790
|
+
ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */);
|
|
11791
|
+
addComponentLogic(lView, tNode, tView.data[start + tNode.componentOffset]);
|
|
11792
|
+
}
|
|
11908
11793
|
if (!tView.firstCreatePass) {
|
|
11909
11794
|
getOrCreateNodeInjectorForNode(tNode, lView);
|
|
11910
11795
|
}
|
|
@@ -11912,19 +11797,14 @@ function instantiateAllDirectives(tView, lView, tNode, native) {
|
|
|
11912
11797
|
const initialInputs = tNode.initialInputs;
|
|
11913
11798
|
for (let i = start; i < end; i++) {
|
|
11914
11799
|
const def = tView.data[i];
|
|
11915
|
-
const isComponent = isComponentDef(def);
|
|
11916
|
-
if (isComponent) {
|
|
11917
|
-
ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */);
|
|
11918
|
-
addComponentLogic(lView, tNode, def);
|
|
11919
|
-
}
|
|
11920
11800
|
const directive = getNodeInjectable(lView, tView, i, tNode);
|
|
11921
11801
|
attachPatchData(directive, lView);
|
|
11922
11802
|
if (initialInputs !== null) {
|
|
11923
11803
|
setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs);
|
|
11924
11804
|
}
|
|
11925
|
-
if (
|
|
11805
|
+
if (isComponentDef(def)) {
|
|
11926
11806
|
const componentView = getComponentLViewByIndex(tNode.index, lView);
|
|
11927
|
-
componentView[CONTEXT] =
|
|
11807
|
+
componentView[CONTEXT] = getNodeInjectable(lView, tView, i, tNode);
|
|
11928
11808
|
}
|
|
11929
11809
|
}
|
|
11930
11810
|
}
|
|
@@ -18827,7 +18707,7 @@ var I18nCreateOpCode;
|
|
|
18827
18707
|
})(I18nCreateOpCode || (I18nCreateOpCode = {}));
|
|
18828
18708
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
18829
18709
|
// failure based on types.
|
|
18830
|
-
const unusedValueExportToPlacateAjd
|
|
18710
|
+
const unusedValueExportToPlacateAjd = 1;
|
|
18831
18711
|
|
|
18832
18712
|
/**
|
|
18833
18713
|
* @license
|
|
@@ -22824,29 +22704,6 @@ function createContainerRef(hostTNode, hostLView) {
|
|
|
22824
22704
|
* Use of this source code is governed by an MIT-style license that can be
|
|
22825
22705
|
* found in the LICENSE file at https://angular.io/license
|
|
22826
22706
|
*/
|
|
22827
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
22828
|
-
// failure based on types.
|
|
22829
|
-
const unusedValueExportToPlacateAjd$1 = 1;
|
|
22830
|
-
|
|
22831
|
-
/**
|
|
22832
|
-
* @license
|
|
22833
|
-
* Copyright Google LLC All Rights Reserved.
|
|
22834
|
-
*
|
|
22835
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
22836
|
-
* found in the LICENSE file at https://angular.io/license
|
|
22837
|
-
*/
|
|
22838
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
22839
|
-
// failure based on types.
|
|
22840
|
-
const unusedValueExportToPlacateAjd = 1;
|
|
22841
|
-
|
|
22842
|
-
/**
|
|
22843
|
-
* @license
|
|
22844
|
-
* Copyright Google LLC All Rights Reserved.
|
|
22845
|
-
*
|
|
22846
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
22847
|
-
* found in the LICENSE file at https://angular.io/license
|
|
22848
|
-
*/
|
|
22849
|
-
const unusedValueToPlacateAjd = unusedValueExportToPlacateAjd$1 + unusedValueExportToPlacateAjd$6 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd;
|
|
22850
22707
|
class LQuery_ {
|
|
22851
22708
|
constructor(queryList) {
|
|
22852
22709
|
this.queryList = queryList;
|
|
@@ -24832,6 +24689,7 @@ class ApplicationInitStatus {
|
|
|
24832
24689
|
this.reject = noop;
|
|
24833
24690
|
this.initialized = false;
|
|
24834
24691
|
this.done = false;
|
|
24692
|
+
// TODO: Throw RuntimeErrorCode.INVALID_MULTI_PROVIDER if appInits is not an array
|
|
24835
24693
|
this.donePromise = new Promise((res, rej) => {
|
|
24836
24694
|
this.resolve = res;
|
|
24837
24695
|
this.reject = rej;
|
|
@@ -26903,7 +26761,14 @@ class ApplicationRef {
|
|
|
26903
26761
|
this.tick();
|
|
26904
26762
|
this.components.push(componentRef);
|
|
26905
26763
|
// Get the listeners lazily to prevent DI cycles.
|
|
26906
|
-
const listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, [])
|
|
26764
|
+
const listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, []);
|
|
26765
|
+
if (ngDevMode && !Array.isArray(listeners)) {
|
|
26766
|
+
throw new RuntimeError(-209 /* RuntimeErrorCode.INVALID_MULTI_PROVIDER */, 'Unexpected type of the `APP_BOOTSTRAP_LISTENER` token value ' +
|
|
26767
|
+
`(expected an array, but got ${typeof listeners}). ` +
|
|
26768
|
+
'Please check that the `APP_BOOTSTRAP_LISTENER` token is configured as a ' +
|
|
26769
|
+
'`multi: true` provider.');
|
|
26770
|
+
}
|
|
26771
|
+
listeners.push(...this._bootstrapListeners);
|
|
26907
26772
|
listeners.forEach((listener) => listener(componentRef));
|
|
26908
26773
|
}
|
|
26909
26774
|
/** @internal */
|