@angular/core 10.2.0 → 10.2.1

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.
@@ -8,6 +8,7 @@
8
8
  import { InjectFlags } from '../di/interface/injector';
9
9
  import { ElementRef as ViewEngine_ElementRef } from '../linker/element_ref';
10
10
  import { TemplateRef as ViewEngine_TemplateRef } from '../linker/template_ref';
11
+ import { throwProviderNotFoundError } from './errors';
11
12
  import { createTemplateRef, injectChangeDetectorRef } from './view_engine_compatibility';
12
13
  /**
13
14
  * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the
@@ -26,10 +27,10 @@ export function ɵɵtemplateRefExtractor(tNode, currentView) {
26
27
  export function ɵɵinjectPipeChangeDetectorRef(flags = InjectFlags.Default) {
27
28
  const value = injectChangeDetectorRef(true);
28
29
  if (value == null && !(flags & InjectFlags.Optional)) {
29
- throw new Error(`No provider for ChangeDetectorRef!`);
30
+ throwProviderNotFoundError('ChangeDetectorRef');
30
31
  }
31
32
  else {
32
33
  return value;
33
34
  }
34
35
  }
35
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlld19lbmdpbmVfY29tcGF0aWJpbGl0eV9wcmVib3VuZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvcmUvc3JjL3JlbmRlcjMvdmlld19lbmdpbmVfY29tcGF0aWJpbGl0eV9wcmVib3VuZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFJSCxPQUFPLEVBQUMsV0FBVyxFQUFDLE1BQU0sMEJBQTBCLENBQUM7QUFDckQsT0FBTyxFQUFDLFVBQVUsSUFBSSxxQkFBcUIsRUFBQyxNQUFNLHVCQUF1QixDQUFDO0FBQzFFLE9BQU8sRUFBQyxXQUFXLElBQUksc0JBQXNCLEVBQUM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LlxuICpcbiAqIEBjb2RlR2VuQXBpXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiDJtcm1aW5qZWN0UGlwZUNoYW5nZURldGVjdG9yUmVmKGZsYWdzID0gSW5qZWN0RmxhZ3MuRGVmYXVsdCk6IENoYW5nZURldGVjdG9yUmVmfG51bGwge1xuICBjb25zdCB2YWx1ZSA9IGluamVjdENoYW5nZURldGVjdG9yUmVmKHRydWUpO1xuICBpZiAodmFsdWUgPT0gbnVsbCAmJiAhKGZsYWdzICYgSW5qZWN0RmxhZ3MuT3B0aW9uYWwpKSB7XG4gICAgdGhyb3dQcm92aWRlck5vdEZvdW5kRXJyb3IoJ0NoYW5nZURldGVjdG9yUmVmJyk7XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIHZhbHVlO1xuICB9XG59XG4iXX0=
@@ -21,5 +21,5 @@ export class Version {
21
21
  /**
22
22
  * @publicApi
23
23
  */
24
- export const VERSION = new Version('10.2.0');
24
+ export const VERSION = new Version('10.2.1');
25
25
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvcmUvc3JjL3ZlcnNpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUg7Ozs7R0FJRztBQUNILE1BQU0sT0FBTyxPQUFPO0lBS2xCLFlBQW1CLElBQVk7UUFBWixTQUFJLEdBQUosSUFBSSxDQUFRO1FBQzdCLElBQUksQ0FBQyxLQUFLLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUNoQyxJQUFJLENBQUMsS0FBSyxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLENB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oMikuam9pbignLicpO1xuICB9XG59XG5cbi8qKlxuICogQHB1YmxpY0FwaVxuICovXG5leHBvcnQgY29uc3QgVkVSU0lPTiA9IG5ldyBWZXJzaW9uKCcwLjAuMC1QTEFDRUhPTERFUicpO1xuIl19
package/fesm2015/core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v10.2.0
2
+ * @license Angular v10.2.1
3
3
  * (c) 2010-2020 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -2095,6 +2095,182 @@ function assertNodeInjector(lView, injectorIndex) {
2095
2095
  assertNumber(lView[injectorIndex + 8 /* PARENT */], 'injectorIndex should point to parent injector');
2096
2096
  }
2097
2097
 
2098
+ /**
2099
+ * @license
2100
+ * Copyright Google LLC All Rights Reserved.
2101
+ *
2102
+ * Use of this source code is governed by an MIT-style license that can be
2103
+ * found in the LICENSE file at https://angular.io/license
2104
+ */
2105
+ /**
2106
+ * Used for stringify render output in Ivy.
2107
+ * Important! This function is very performance-sensitive and we should
2108
+ * be extra careful not to introduce megamorphic reads in it.
2109
+ */
2110
+ function renderStringify(value) {
2111
+ if (typeof value === 'string')
2112
+ return value;
2113
+ if (value == null)
2114
+ return '';
2115
+ return '' + value;
2116
+ }
2117
+ /**
2118
+ * Used to stringify a value so that it can be displayed in an error message.
2119
+ * Important! This function contains a megamorphic read and should only be
2120
+ * used for error messages.
2121
+ */
2122
+ function stringifyForError(value) {
2123
+ if (typeof value === 'function')
2124
+ return value.name || value.toString();
2125
+ if (typeof value === 'object' && value != null && typeof value.type === 'function') {
2126
+ return value.type.name || value.type.toString();
2127
+ }
2128
+ return renderStringify(value);
2129
+ }
2130
+ const ɵ0$2 = () => (typeof requestAnimationFrame !== 'undefined' &&
2131
+ requestAnimationFrame || // browser only
2132
+ setTimeout // everything else
2133
+ )
2134
+ .bind(_global);
2135
+ const defaultScheduler = (ɵ0$2)();
2136
+ /**
2137
+ *
2138
+ * @codeGenApi
2139
+ */
2140
+ function ɵɵresolveWindow(element) {
2141
+ return { name: 'window', target: element.ownerDocument.defaultView };
2142
+ }
2143
+ /**
2144
+ *
2145
+ * @codeGenApi
2146
+ */
2147
+ function ɵɵresolveDocument(element) {
2148
+ return { name: 'document', target: element.ownerDocument };
2149
+ }
2150
+ /**
2151
+ *
2152
+ * @codeGenApi
2153
+ */
2154
+ function ɵɵresolveBody(element) {
2155
+ return { name: 'body', target: element.ownerDocument.body };
2156
+ }
2157
+ /**
2158
+ * The special delimiter we use to separate property names, prefixes, and suffixes
2159
+ * in property binding metadata. See storeBindingMetadata().
2160
+ *
2161
+ * We intentionally use the Unicode "REPLACEMENT CHARACTER" (U+FFFD) as a delimiter
2162
+ * because it is a very uncommon character that is unlikely to be part of a user's
2163
+ * property names or interpolation strings. If it is in fact used in a property
2164
+ * binding, DebugElement.properties will not return the correct value for that
2165
+ * binding. However, there should be no runtime effect for real applications.
2166
+ *
2167
+ * This character is typically rendered as a question mark inside of a diamond.
2168
+ * See https://en.wikipedia.org/wiki/Specials_(Unicode_block)
2169
+ *
2170
+ */
2171
+ const INTERPOLATION_DELIMITER = `�`;
2172
+ /**
2173
+ * Unwrap a value which might be behind a closure (for forward declaration reasons).
2174
+ */
2175
+ function maybeUnwrapFn(value) {
2176
+ if (value instanceof Function) {
2177
+ return value();
2178
+ }
2179
+ else {
2180
+ return value;
2181
+ }
2182
+ }
2183
+
2184
+ /** Called when directives inject each other (creating a circular dependency) */
2185
+ function throwCyclicDependencyError(token, path) {
2186
+ const depPath = path ? `. Dependency path: ${path.join(' > ')} > ${token}` : '';
2187
+ throw new Error(`Circular dependency in DI detected for ${token}${depPath}`);
2188
+ }
2189
+ /** Called when there are multiple component selectors that match a given node */
2190
+ function throwMultipleComponentError(tNode) {
2191
+ throw new Error(`Multiple components match node with tagname ${tNode.tagName}`);
2192
+ }
2193
+ function throwMixedMultiProviderError() {
2194
+ throw new Error(`Cannot mix multi providers and regular providers`);
2195
+ }
2196
+ function throwInvalidProviderError(ngModuleType, providers, provider) {
2197
+ let ngModuleDetail = '';
2198
+ if (ngModuleType && providers) {
2199
+ const providerDetail = providers.map(v => v == provider ? '?' + provider + '?' : '...');
2200
+ ngModuleDetail =
2201
+ ` - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`;
2202
+ }
2203
+ throw new Error(`Invalid provider for the NgModule '${stringify(ngModuleType)}'` + ngModuleDetail);
2204
+ }
2205
+ /** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */
2206
+ function throwErrorIfNoChangesMode(creationMode, oldValue, currValue, propName) {
2207
+ const field = propName ? ` for '${propName}'` : '';
2208
+ let msg = `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value${field}: '${oldValue}'. Current value: '${currValue}'.`;
2209
+ if (creationMode) {
2210
+ msg +=
2211
+ ` It seems like the view has been created after its parent and its children have been dirty checked.` +
2212
+ ` Has it been created in a change detection hook?`;
2213
+ }
2214
+ // TODO: include debug context, see `viewDebugError` function in
2215
+ // `packages/core/src/view/errors.ts` for reference.
2216
+ throw new Error(msg);
2217
+ }
2218
+ function constructDetailsForInterpolation(lView, rootIndex, expressionIndex, meta, changedValue) {
2219
+ const [propName, prefix, ...chunks] = meta.split(INTERPOLATION_DELIMITER);
2220
+ let oldValue = prefix, newValue = prefix;
2221
+ for (let i = 0; i < chunks.length; i++) {
2222
+ const slotIdx = rootIndex + i;
2223
+ oldValue += `${lView[slotIdx]}${chunks[i]}`;
2224
+ newValue += `${slotIdx === expressionIndex ? changedValue : lView[slotIdx]}${chunks[i]}`;
2225
+ }
2226
+ return { propName, oldValue, newValue };
2227
+ }
2228
+ /**
2229
+ * Constructs an object that contains details for the ExpressionChangedAfterItHasBeenCheckedError:
2230
+ * - property name (for property bindings or interpolations)
2231
+ * - old and new values, enriched using information from metadata
2232
+ *
2233
+ * More information on the metadata storage format can be found in `storePropertyBindingMetadata`
2234
+ * function description.
2235
+ */
2236
+ function getExpressionChangedErrorDetails(lView, bindingIndex, oldValue, newValue) {
2237
+ const tData = lView[TVIEW].data;
2238
+ const metadata = tData[bindingIndex];
2239
+ if (typeof metadata === 'string') {
2240
+ // metadata for property interpolation
2241
+ if (metadata.indexOf(INTERPOLATION_DELIMITER) > -1) {
2242
+ return constructDetailsForInterpolation(lView, bindingIndex, bindingIndex, metadata, newValue);
2243
+ }
2244
+ // metadata for property binding
2245
+ return { propName: metadata, oldValue, newValue };
2246
+ }
2247
+ // metadata is not available for this expression, check if this expression is a part of the
2248
+ // property interpolation by going from the current binding index left and look for a string that
2249
+ // contains INTERPOLATION_DELIMITER, the layout in tView.data for this case will look like this:
2250
+ // [..., 'id�Prefix � and � suffix', null, null, null, ...]
2251
+ if (metadata === null) {
2252
+ let idx = bindingIndex - 1;
2253
+ while (typeof tData[idx] !== 'string' && tData[idx + 1] === null) {
2254
+ idx--;
2255
+ }
2256
+ const meta = tData[idx];
2257
+ if (typeof meta === 'string') {
2258
+ const matches = meta.match(new RegExp(INTERPOLATION_DELIMITER, 'g'));
2259
+ // first interpolation delimiter separates property name from interpolation parts (in case of
2260
+ // property interpolations), so we subtract one from total number of found delimiters
2261
+ if (matches && (matches.length - 1) > bindingIndex - idx) {
2262
+ return constructDetailsForInterpolation(lView, idx, bindingIndex, meta, newValue);
2263
+ }
2264
+ }
2265
+ }
2266
+ return { propName: undefined, oldValue, newValue };
2267
+ }
2268
+ /** Throws an error when a token is not found in DI. */
2269
+ function throwProviderNotFoundError(token, injectorName) {
2270
+ const injectorDetails = injectorName ? ` in ${injectorName}` : '';
2271
+ throw new Error(`No provider for ${stringifyForError(token)} found${injectorDetails}`);
2272
+ }
2273
+
2098
2274
  /**
2099
2275
  * @license
2100
2276
  * Copyright Google LLC All Rights Reserved.
@@ -2309,11 +2485,11 @@ var RendererStyleFlags3;
2309
2485
  function isProceduralRenderer(renderer) {
2310
2486
  return !!(renderer.listen);
2311
2487
  }
2312
- const ɵ0$2 = (hostElement, rendererType) => {
2488
+ const ɵ0$3 = (hostElement, rendererType) => {
2313
2489
  return getDocument();
2314
2490
  };
2315
2491
  const domRendererFactory3 = {
2316
- createRenderer: ɵ0$2
2492
+ createRenderer: ɵ0$3
2317
2493
  };
2318
2494
  // Note: This hack is necessary so we don't erroneously get a circular dependency
2319
2495
  // failure based on types.
@@ -3581,92 +3757,6 @@ function getParentInjectorView(location, startView) {
3581
3757
  return parentView;
3582
3758
  }
3583
3759
 
3584
- /**
3585
- * @license
3586
- * Copyright Google LLC All Rights Reserved.
3587
- *
3588
- * Use of this source code is governed by an MIT-style license that can be
3589
- * found in the LICENSE file at https://angular.io/license
3590
- */
3591
- /**
3592
- * Used for stringify render output in Ivy.
3593
- * Important! This function is very performance-sensitive and we should
3594
- * be extra careful not to introduce megamorphic reads in it.
3595
- */
3596
- function renderStringify(value) {
3597
- if (typeof value === 'string')
3598
- return value;
3599
- if (value == null)
3600
- return '';
3601
- return '' + value;
3602
- }
3603
- /**
3604
- * Used to stringify a value so that it can be displayed in an error message.
3605
- * Important! This function contains a megamorphic read and should only be
3606
- * used for error messages.
3607
- */
3608
- function stringifyForError(value) {
3609
- if (typeof value === 'function')
3610
- return value.name || value.toString();
3611
- if (typeof value === 'object' && value != null && typeof value.type === 'function') {
3612
- return value.type.name || value.type.toString();
3613
- }
3614
- return renderStringify(value);
3615
- }
3616
- const ɵ0$3 = () => (typeof requestAnimationFrame !== 'undefined' &&
3617
- requestAnimationFrame || // browser only
3618
- setTimeout // everything else
3619
- )
3620
- .bind(_global);
3621
- const defaultScheduler = (ɵ0$3)();
3622
- /**
3623
- *
3624
- * @codeGenApi
3625
- */
3626
- function ɵɵresolveWindow(element) {
3627
- return { name: 'window', target: element.ownerDocument.defaultView };
3628
- }
3629
- /**
3630
- *
3631
- * @codeGenApi
3632
- */
3633
- function ɵɵresolveDocument(element) {
3634
- return { name: 'document', target: element.ownerDocument };
3635
- }
3636
- /**
3637
- *
3638
- * @codeGenApi
3639
- */
3640
- function ɵɵresolveBody(element) {
3641
- return { name: 'body', target: element.ownerDocument.body };
3642
- }
3643
- /**
3644
- * The special delimiter we use to separate property names, prefixes, and suffixes
3645
- * in property binding metadata. See storeBindingMetadata().
3646
- *
3647
- * We intentionally use the Unicode "REPLACEMENT CHARACTER" (U+FFFD) as a delimiter
3648
- * because it is a very uncommon character that is unlikely to be part of a user's
3649
- * property names or interpolation strings. If it is in fact used in a property
3650
- * binding, DebugElement.properties will not return the correct value for that
3651
- * binding. However, there should be no runtime effect for real applications.
3652
- *
3653
- * This character is typically rendered as a question mark inside of a diamond.
3654
- * See https://en.wikipedia.org/wiki/Specials_(Unicode_block)
3655
- *
3656
- */
3657
- const INTERPOLATION_DELIMITER = `�`;
3658
- /**
3659
- * Unwrap a value which might be behind a closure (for forward declaration reasons).
3660
- */
3661
- function maybeUnwrapFn(value) {
3662
- if (value instanceof Function) {
3663
- return value();
3664
- }
3665
- else {
3666
- return value;
3667
- }
3668
- }
3669
-
3670
3760
  /**
3671
3761
  * @license
3672
3762
  * Copyright Google LLC All Rights Reserved.
@@ -3991,7 +4081,7 @@ function getOrCreateInjectable(tNode, lView, token, flags = InjectFlags.Default,
3991
4081
  try {
3992
4082
  const value = bloomHash();
3993
4083
  if (value == null && !(flags & InjectFlags.Optional)) {
3994
- throw new Error(`No provider for ${stringifyForError(token)}!`);
4084
+ throwProviderNotFoundError(token);
3995
4085
  }
3996
4086
  else {
3997
4087
  return value;
@@ -4090,7 +4180,7 @@ function getOrCreateInjectable(tNode, lView, token, flags = InjectFlags.Default,
4090
4180
  return notFoundValue;
4091
4181
  }
4092
4182
  else {
4093
- throw new Error(`NodeInjector: NOT_FOUND [${stringifyForError(token)}]`);
4183
+ throwProviderNotFoundError(token, 'NodeInjector');
4094
4184
  }
4095
4185
  }
4096
4186
  const NOT_FOUND = {};
@@ -4174,7 +4264,7 @@ function getNodeInjectable(lView, tView, index, tNode) {
4174
4264
  if (isFactory(value)) {
4175
4265
  const factory = value;
4176
4266
  if (factory.resolving) {
4177
- throw new Error(`Circular dep for ${stringifyForError(tData[index])}`);
4267
+ throwCyclicDependencyError(stringifyForError(tData[index]));
4178
4268
  }
4179
4269
  const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);
4180
4270
  factory.resolving = true;
@@ -5591,90 +5681,6 @@ function discoverLocalRefs(lView, nodeIndex) {
5591
5681
  return null;
5592
5682
  }
5593
5683
 
5594
- /** Called when directives inject each other (creating a circular dependency) */
5595
- function throwCyclicDependencyError(token) {
5596
- throw new Error(`Cannot instantiate cyclic dependency! ${token}`);
5597
- }
5598
- /** Called when there are multiple component selectors that match a given node */
5599
- function throwMultipleComponentError(tNode) {
5600
- throw new Error(`Multiple components match node with tagname ${tNode.tagName}`);
5601
- }
5602
- function throwMixedMultiProviderError() {
5603
- throw new Error(`Cannot mix multi providers and regular providers`);
5604
- }
5605
- function throwInvalidProviderError(ngModuleType, providers, provider) {
5606
- let ngModuleDetail = '';
5607
- if (ngModuleType && providers) {
5608
- const providerDetail = providers.map(v => v == provider ? '?' + provider + '?' : '...');
5609
- ngModuleDetail =
5610
- ` - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`;
5611
- }
5612
- throw new Error(`Invalid provider for the NgModule '${stringify(ngModuleType)}'` + ngModuleDetail);
5613
- }
5614
- /** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */
5615
- function throwErrorIfNoChangesMode(creationMode, oldValue, currValue, propName) {
5616
- const field = propName ? ` for '${propName}'` : '';
5617
- let msg = `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value${field}: '${oldValue}'. Current value: '${currValue}'.`;
5618
- if (creationMode) {
5619
- msg +=
5620
- ` It seems like the view has been created after its parent and its children have been dirty checked.` +
5621
- ` Has it been created in a change detection hook?`;
5622
- }
5623
- // TODO: include debug context, see `viewDebugError` function in
5624
- // `packages/core/src/view/errors.ts` for reference.
5625
- throw new Error(msg);
5626
- }
5627
- function constructDetailsForInterpolation(lView, rootIndex, expressionIndex, meta, changedValue) {
5628
- const [propName, prefix, ...chunks] = meta.split(INTERPOLATION_DELIMITER);
5629
- let oldValue = prefix, newValue = prefix;
5630
- for (let i = 0; i < chunks.length; i++) {
5631
- const slotIdx = rootIndex + i;
5632
- oldValue += `${lView[slotIdx]}${chunks[i]}`;
5633
- newValue += `${slotIdx === expressionIndex ? changedValue : lView[slotIdx]}${chunks[i]}`;
5634
- }
5635
- return { propName, oldValue, newValue };
5636
- }
5637
- /**
5638
- * Constructs an object that contains details for the ExpressionChangedAfterItHasBeenCheckedError:
5639
- * - property name (for property bindings or interpolations)
5640
- * - old and new values, enriched using information from metadata
5641
- *
5642
- * More information on the metadata storage format can be found in `storePropertyBindingMetadata`
5643
- * function description.
5644
- */
5645
- function getExpressionChangedErrorDetails(lView, bindingIndex, oldValue, newValue) {
5646
- const tData = lView[TVIEW].data;
5647
- const metadata = tData[bindingIndex];
5648
- if (typeof metadata === 'string') {
5649
- // metadata for property interpolation
5650
- if (metadata.indexOf(INTERPOLATION_DELIMITER) > -1) {
5651
- return constructDetailsForInterpolation(lView, bindingIndex, bindingIndex, metadata, newValue);
5652
- }
5653
- // metadata for property binding
5654
- return { propName: metadata, oldValue, newValue };
5655
- }
5656
- // metadata is not available for this expression, check if this expression is a part of the
5657
- // property interpolation by going from the current binding index left and look for a string that
5658
- // contains INTERPOLATION_DELIMITER, the layout in tView.data for this case will look like this:
5659
- // [..., 'id�Prefix � and � suffix', null, null, null, ...]
5660
- if (metadata === null) {
5661
- let idx = bindingIndex - 1;
5662
- while (typeof tData[idx] !== 'string' && tData[idx + 1] === null) {
5663
- idx--;
5664
- }
5665
- const meta = tData[idx];
5666
- if (typeof meta === 'string') {
5667
- const matches = meta.match(new RegExp(INTERPOLATION_DELIMITER, 'g'));
5668
- // first interpolation delimiter separates property name from interpolation parts (in case of
5669
- // property interpolations), so we subtract one from total number of found delimiters
5670
- if (matches && (matches.length - 1) > bindingIndex - idx) {
5671
- return constructDetailsForInterpolation(lView, idx, bindingIndex, meta, newValue);
5672
- }
5673
- }
5674
- }
5675
- return { propName: undefined, oldValue, newValue };
5676
- }
5677
-
5678
5684
  /**
5679
5685
  * @license
5680
5686
  * Copyright Google LLC All Rights Reserved.
@@ -7761,7 +7767,7 @@ function generatePropertyAliases(inputAliasMap, directiveDefIdx, propStore) {
7761
7767
  return propStore;
7762
7768
  }
7763
7769
  /**
7764
- * Initializes data structures required to work with directive outputs and outputs.
7770
+ * Initializes data structures required to work with directive inputs and outputs.
7765
7771
  * Initialization is done for all directives matched on a given TNode.
7766
7772
  */
7767
7773
  function initializeInputAndOutputAliases(tView, tNode) {
@@ -11186,7 +11192,8 @@ class R3Injector {
11186
11192
  // Check for circular dependencies.
11187
11193
  if (ngDevMode && parents.indexOf(defType) !== -1) {
11188
11194
  const defName = stringify(defType);
11189
- throw new Error(`Circular dependency in DI detected for type ${defName}. Dependency path: ${parents.map(defType => stringify(defType)).join(' > ')} > ${defName}.`);
11195
+ const path = parents.map(stringify);
11196
+ throwCyclicDependencyError(defName, path);
11190
11197
  }
11191
11198
  // Check for multiple imports of the same module
11192
11199
  const isDuplicate = dedupStack.indexOf(defType) !== -1;
@@ -13373,7 +13380,7 @@ function publishGlobalUtil(name, fn) {
13373
13380
  * found in the LICENSE file at https://angular.io/license
13374
13381
  */
13375
13382
  const ɵ0$b = (token, notFoundValue) => {
13376
- throw new Error('NullInjector: Not found: ' + stringifyForError(token));
13383
+ throwProviderNotFoundError(token, 'NullInjector');
13377
13384
  };
13378
13385
  // TODO: A hack to not pull in the NullInjector from @angular/core.
13379
13386
  const NULL_INJECTOR$1 = {
@@ -21059,7 +21066,7 @@ class Version {
21059
21066
  /**
21060
21067
  * @publicApi
21061
21068
  */
21062
- const VERSION = new Version('10.2.0');
21069
+ const VERSION = new Version('10.2.1');
21063
21070
 
21064
21071
  /**
21065
21072
  * @license
@@ -25571,7 +25578,7 @@ function ɵɵtemplateRefExtractor(tNode, currentView) {
25571
25578
  function ɵɵinjectPipeChangeDetectorRef(flags = InjectFlags.Default) {
25572
25579
  const value = injectChangeDetectorRef(true);
25573
25580
  if (value == null && !(flags & InjectFlags.Optional)) {
25574
- throw new Error(`No provider for ChangeDetectorRef!`);
25581
+ throwProviderNotFoundError('ChangeDetectorRef');
25575
25582
  }
25576
25583
  else {
25577
25584
  return value;
@@ -31761,7 +31768,7 @@ class NgModuleFactory_ extends NgModuleFactory {
31761
31768
  * Use of this source code is governed by an MIT-style license that can be
31762
31769
  * found in the LICENSE file at https://angular.io/license
31763
31770
  */
31764
- if (ngDevMode) {
31771
+ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
31765
31772
  // This helper is to give a reasonable error message to people upgrading to v9 that have not yet
31766
31773
  // installed `@angular/localize` in their app.
31767
31774
  // tslint:disable-next-line: no-toplevel-property-access