@angular/core 14.1.0 → 14.1.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.
- package/esm2020/src/di/injector_compatibility.mjs +2 -2
- package/esm2020/src/render3/instructions/element_validation.mjs +9 -5
- 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/fesm2015/core.mjs +11 -7
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +11 -7
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +11 -7
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +11 -7
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/package.json +1 -1
- package/testing/index.d.ts +1 -1
package/fesm2020/core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.1.
|
|
2
|
+
* @license Angular v14.1.1
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -4770,7 +4770,7 @@ function setCurrentInjector(injector) {
|
|
|
4770
4770
|
function injectInjectorOnly(token, flags = InjectFlags.Default) {
|
|
4771
4771
|
if (_currentInjector === undefined) {
|
|
4772
4772
|
throw new RuntimeError(-203 /* RuntimeErrorCode.MISSING_INJECTION_CONTEXT */, ngDevMode &&
|
|
4773
|
-
`inject() must be called from an injection context
|
|
4773
|
+
`inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with \`EnvironmentInjector#runInContext\`.`);
|
|
4774
4774
|
}
|
|
4775
4775
|
else if (_currentInjector === null) {
|
|
4776
4776
|
return injectRootLimpMode(token, undefined, flags);
|
|
@@ -7258,7 +7258,7 @@ class Version {
|
|
|
7258
7258
|
/**
|
|
7259
7259
|
* @publicApi
|
|
7260
7260
|
*/
|
|
7261
|
-
const VERSION = new Version('14.1.
|
|
7261
|
+
const VERSION = new Version('14.1.1');
|
|
7262
7262
|
|
|
7263
7263
|
/**
|
|
7264
7264
|
* @license
|
|
@@ -7474,9 +7474,10 @@ function handleUnknownPropertyError(propName, tagName, nodeType, lView) {
|
|
|
7474
7474
|
'a part of an @NgModule where this component is declared';
|
|
7475
7475
|
if (KNOWN_CONTROL_FLOW_DIRECTIVES.has(propName)) {
|
|
7476
7476
|
// Most likely this is a control flow directive (such as `*ngIf`) used in
|
|
7477
|
-
// a template, but the `CommonModule` is not imported.
|
|
7477
|
+
// a template, but the directive or the `CommonModule` is not imported.
|
|
7478
|
+
const correspondingImport = KNOWN_CONTROL_FLOW_DIRECTIVES.get(propName);
|
|
7478
7479
|
message += `\nIf the '${propName}' is an Angular control flow directive, ` +
|
|
7479
|
-
`please make sure that the 'CommonModule' is ${importLocation}.`;
|
|
7480
|
+
`please make sure that either the '${correspondingImport}' directive or the 'CommonModule' is ${importLocation}.`;
|
|
7480
7481
|
}
|
|
7481
7482
|
else {
|
|
7482
7483
|
// May be an Angular component, which is not imported/declared?
|
|
@@ -7555,11 +7556,14 @@ function getTemplateLocationDetails(lView) {
|
|
|
7555
7556
|
return componentClassName ? ` (used in the '${componentClassName}' component template)` : '';
|
|
7556
7557
|
}
|
|
7557
7558
|
/**
|
|
7558
|
-
* The set of known control flow directives.
|
|
7559
|
+
* The set of known control flow directives and their corresponding imports.
|
|
7559
7560
|
* We use this set to produce a more precises error message with a note
|
|
7560
7561
|
* that the `CommonModule` should also be included.
|
|
7561
7562
|
*/
|
|
7562
|
-
const KNOWN_CONTROL_FLOW_DIRECTIVES = new
|
|
7563
|
+
const KNOWN_CONTROL_FLOW_DIRECTIVES = new Map([
|
|
7564
|
+
['ngIf', 'NgIf'], ['ngFor', 'NgForOf'], ['ngSwitchCase', 'NgSwitchCase'],
|
|
7565
|
+
['ngSwitchDefault', 'NgSwitchDefault']
|
|
7566
|
+
]);
|
|
7563
7567
|
/**
|
|
7564
7568
|
* Returns true if the tag name is allowed by specified schemas.
|
|
7565
7569
|
* @param schemas Array of schemas
|