@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/fesm2015/testing.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
|
*/
|
|
@@ -2048,7 +2048,7 @@ function setCurrentInjector(injector) {
|
|
|
2048
2048
|
function injectInjectorOnly(token, flags = InjectFlags.Default) {
|
|
2049
2049
|
if (_currentInjector === undefined) {
|
|
2050
2050
|
throw new RuntimeError(-203 /* RuntimeErrorCode.MISSING_INJECTION_CONTEXT */, ngDevMode &&
|
|
2051
|
-
`inject() must be called from an injection context
|
|
2051
|
+
`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\`.`);
|
|
2052
2052
|
}
|
|
2053
2053
|
else if (_currentInjector === null) {
|
|
2054
2054
|
return injectRootLimpMode(token, undefined, flags);
|
|
@@ -7618,7 +7618,7 @@ class Version {
|
|
|
7618
7618
|
/**
|
|
7619
7619
|
* @publicApi
|
|
7620
7620
|
*/
|
|
7621
|
-
const VERSION = new Version('14.1.
|
|
7621
|
+
const VERSION = new Version('14.1.1');
|
|
7622
7622
|
|
|
7623
7623
|
/**
|
|
7624
7624
|
* @license
|
|
@@ -7834,9 +7834,10 @@ function handleUnknownPropertyError(propName, tagName, nodeType, lView) {
|
|
|
7834
7834
|
'a part of an @NgModule where this component is declared';
|
|
7835
7835
|
if (KNOWN_CONTROL_FLOW_DIRECTIVES.has(propName)) {
|
|
7836
7836
|
// Most likely this is a control flow directive (such as `*ngIf`) used in
|
|
7837
|
-
// a template, but the `CommonModule` is not imported.
|
|
7837
|
+
// a template, but the directive or the `CommonModule` is not imported.
|
|
7838
|
+
const correspondingImport = KNOWN_CONTROL_FLOW_DIRECTIVES.get(propName);
|
|
7838
7839
|
message += `\nIf the '${propName}' is an Angular control flow directive, ` +
|
|
7839
|
-
`please make sure that the 'CommonModule' is ${importLocation}.`;
|
|
7840
|
+
`please make sure that either the '${correspondingImport}' directive or the 'CommonModule' is ${importLocation}.`;
|
|
7840
7841
|
}
|
|
7841
7842
|
else {
|
|
7842
7843
|
// May be an Angular component, which is not imported/declared?
|
|
@@ -7916,11 +7917,14 @@ function getTemplateLocationDetails(lView) {
|
|
|
7916
7917
|
return componentClassName ? ` (used in the '${componentClassName}' component template)` : '';
|
|
7917
7918
|
}
|
|
7918
7919
|
/**
|
|
7919
|
-
* The set of known control flow directives.
|
|
7920
|
+
* The set of known control flow directives and their corresponding imports.
|
|
7920
7921
|
* We use this set to produce a more precises error message with a note
|
|
7921
7922
|
* that the `CommonModule` should also be included.
|
|
7922
7923
|
*/
|
|
7923
|
-
const KNOWN_CONTROL_FLOW_DIRECTIVES = new
|
|
7924
|
+
const KNOWN_CONTROL_FLOW_DIRECTIVES = new Map([
|
|
7925
|
+
['ngIf', 'NgIf'], ['ngFor', 'NgForOf'], ['ngSwitchCase', 'NgSwitchCase'],
|
|
7926
|
+
['ngSwitchDefault', 'NgSwitchDefault']
|
|
7927
|
+
]);
|
|
7924
7928
|
/**
|
|
7925
7929
|
* Returns true if the tag name is allowed by specified schemas.
|
|
7926
7930
|
* @param schemas Array of schemas
|