@angular/core 20.2.4 → 20.3.0
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/api.d.d.ts +1 -1
- package/chrome_dev_tools_performance.d.d.ts +1 -1
- package/discovery.d.d.ts +1 -1
- package/effect.d.d.ts +1 -1
- package/event_dispatcher.d.d.ts +1 -1
- package/fesm2022/attribute.mjs +1 -1
- package/fesm2022/core.mjs +35 -26
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/debug_node.mjs +2 -2
- package/fesm2022/debug_node.mjs.map +1 -1
- package/fesm2022/effect.mjs +1 -1
- package/fesm2022/not_found.mjs +1 -1
- package/fesm2022/primitives/di.mjs +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/resource.mjs +1 -1
- package/fesm2022/root_effect_scheduler.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/signal.mjs +1 -1
- package/fesm2022/testing.mjs +1 -1
- package/fesm2022/weak_ref.mjs +1 -1
- package/graph.d.d.ts +1 -1
- package/index.d.ts +7 -8
- package/package.json +2 -2
- package/primitives/di/index.d.ts +1 -1
- package/primitives/event-dispatch/index.d.ts +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +135 -0
- package/schematics/bundles/{apply_import_manager-C481F-Gt.cjs → apply_import_manager-CeOmw2t5.cjs} +3 -3
- package/schematics/bundles/cleanup-unused-imports.cjs +5 -5
- package/schematics/bundles/{compiler_host-BBQ2scSi.cjs → compiler_host-CXabxf2P.cjs} +2 -2
- package/schematics/bundles/control-flow-migration.cjs +3 -3
- package/schematics/bundles/document-core.cjs +5 -5
- package/schematics/bundles/imports-CIX-JgAN.cjs +1 -1
- package/schematics/bundles/{index-Cwnr5FLK.cjs → index-CKtFJ_6n.cjs} +4 -4
- package/schematics/bundles/{index-DXYtX_OC.cjs → index-CLpTl6rd.cjs} +33 -12
- package/schematics/bundles/inject-flags.cjs +5 -5
- package/schematics/bundles/inject-migration.cjs +3 -3
- package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
- package/schematics/bundles/{migrate_ts_type_references-DPTNlXk3.cjs → migrate_ts_type_references-CjIN7lkE.cjs} +5 -5
- package/schematics/bundles/ng_decorators-B5HCqr20.cjs +1 -1
- package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
- package/schematics/bundles/output-migration.cjs +6 -6
- package/schematics/bundles/{project_paths-FWT-fVvl.cjs → project_paths-CGqaSutM.cjs} +3 -3
- package/schematics/bundles/{project_tsconfig_paths-Cj3oe5Ih.cjs → project_tsconfig_paths-RAvhwg8f.cjs} +5 -3
- package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
- package/schematics/bundles/route-lazy-loading.cjs +3 -3
- package/schematics/bundles/router-current-navigation.cjs +4 -4
- package/schematics/bundles/self-closing-tags-migration.cjs +4 -4
- package/schematics/bundles/signal-input-migration.cjs +7 -7
- package/schematics/bundles/signal-queries-migration.cjs +7 -7
- package/schematics/bundles/signals.cjs +7 -7
- package/schematics/bundles/standalone-migration.cjs +4 -4
- package/schematics/bundles/symbol-VPWguRxr.cjs +1 -1
- package/schematics/bundles/test-bed-get.cjs +4 -4
- package/schematics/migrations.json +5 -0
- package/testing/index.d.ts +1 -1
- package/weak_ref.d.d.ts +1 -1
package/api.d.d.ts
CHANGED
package/discovery.d.d.ts
CHANGED
package/effect.d.d.ts
CHANGED
package/event_dispatcher.d.d.ts
CHANGED
package/fesm2022/attribute.mjs
CHANGED
package/fesm2022/core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v20.
|
|
2
|
+
* @license Angular v20.3.0
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -626,7 +626,7 @@ class Version {
|
|
|
626
626
|
/**
|
|
627
627
|
* @publicApi
|
|
628
628
|
*/
|
|
629
|
-
const VERSION = /* @__PURE__ */ new Version('20.
|
|
629
|
+
const VERSION = /* @__PURE__ */ new Version('20.3.0');
|
|
630
630
|
|
|
631
631
|
function compileNgModuleFactory(injector, options, moduleType) {
|
|
632
632
|
ngDevMode && assertNgModuleType(moduleType);
|
|
@@ -952,8 +952,8 @@ function bootstrap(config) {
|
|
|
952
952
|
// If the `LOCALE_ID` provider is defined at bootstrap then we set the value for ivy
|
|
953
953
|
const localeId = envInjector.get(LOCALE_ID, DEFAULT_LOCALE_ID);
|
|
954
954
|
setLocaleId(localeId || DEFAULT_LOCALE_ID);
|
|
955
|
-
const
|
|
956
|
-
if (!
|
|
955
|
+
const enableRootComponentbootstrap = envInjector.get(ENABLE_ROOT_COMPONENT_BOOTSTRAP, true);
|
|
956
|
+
if (!enableRootComponentbootstrap) {
|
|
957
957
|
if (isApplicationBootstrapConfig(config)) {
|
|
958
958
|
return envInjector.get(ApplicationRef);
|
|
959
959
|
}
|
|
@@ -981,8 +981,8 @@ function bootstrap(config) {
|
|
|
981
981
|
});
|
|
982
982
|
}
|
|
983
983
|
/**
|
|
984
|
-
* Having a separate symbol for the module
|
|
985
|
-
* tree shake the module based
|
|
984
|
+
* Having a separate symbol for the module bootstrap implementation allows us to
|
|
985
|
+
* tree shake the module based bootstrap implementation in standalone apps.
|
|
986
986
|
*/
|
|
987
987
|
let moduleBootstrapImpl;
|
|
988
988
|
/**
|
|
@@ -1142,11 +1142,6 @@ class PlatformRef {
|
|
|
1142
1142
|
}], () => [{ type: Injector }], null); })();
|
|
1143
1143
|
|
|
1144
1144
|
let _platformInjector = null;
|
|
1145
|
-
/**
|
|
1146
|
-
* Internal token to indicate whether having multiple bootstrapped platform should be allowed (only
|
|
1147
|
-
* one bootstrapped platform is allowed by default). This token helps to support SSR scenarios.
|
|
1148
|
-
*/
|
|
1149
|
-
const ALLOW_MULTIPLE_PLATFORMS = new InjectionToken(ngDevMode ? 'AllowMultipleToken' : '');
|
|
1150
1145
|
/**
|
|
1151
1146
|
* Creates a platform.
|
|
1152
1147
|
* Platforms must be created on launch using this function.
|
|
@@ -1154,12 +1149,14 @@ const ALLOW_MULTIPLE_PLATFORMS = new InjectionToken(ngDevMode ? 'AllowMultipleTo
|
|
|
1154
1149
|
* @publicApi
|
|
1155
1150
|
*/
|
|
1156
1151
|
function createPlatform(injector) {
|
|
1157
|
-
if (
|
|
1152
|
+
if (getPlatform()) {
|
|
1158
1153
|
throw new RuntimeError(400 /* RuntimeErrorCode.MULTIPLE_PLATFORMS */, ngDevMode && 'There can be only one platform. Destroy the previous one to create a new one.');
|
|
1159
1154
|
}
|
|
1160
1155
|
publishDefaultGlobalUtils();
|
|
1161
1156
|
publishSignalConfiguration();
|
|
1162
|
-
|
|
1157
|
+
// During SSR, using this setting and using an injector from the global can cause the
|
|
1158
|
+
// injector to be used for a different requjest due to concurrency.
|
|
1159
|
+
_platformInjector = typeof ngServerMode === 'undefined' || !ngServerMode ? injector : null;
|
|
1163
1160
|
const platform = injector.get(PlatformRef);
|
|
1164
1161
|
runPlatformInitializers(injector);
|
|
1165
1162
|
return platform;
|
|
@@ -1180,20 +1177,17 @@ function createPlatformFactory(parentPlatformFactory, name, providers = []) {
|
|
|
1180
1177
|
const marker = new InjectionToken(desc);
|
|
1181
1178
|
return (extraProviders = []) => {
|
|
1182
1179
|
let platform = getPlatform();
|
|
1183
|
-
if (!platform
|
|
1180
|
+
if (!platform) {
|
|
1184
1181
|
const platformProviders = [
|
|
1185
1182
|
...providers,
|
|
1186
1183
|
...extraProviders,
|
|
1187
1184
|
{ provide: marker, useValue: true },
|
|
1188
1185
|
];
|
|
1189
|
-
|
|
1190
|
-
parentPlatformFactory(platformProviders)
|
|
1191
|
-
|
|
1192
|
-
else {
|
|
1193
|
-
createPlatform(createPlatformInjector(platformProviders, desc));
|
|
1194
|
-
}
|
|
1186
|
+
platform =
|
|
1187
|
+
parentPlatformFactory?.(platformProviders) ??
|
|
1188
|
+
createPlatform(createPlatformInjector(platformProviders, desc));
|
|
1195
1189
|
}
|
|
1196
|
-
return assertPlatform(marker);
|
|
1190
|
+
return typeof ngServerMode !== 'undefined' && ngServerMode ? platform : assertPlatform(marker);
|
|
1197
1191
|
};
|
|
1198
1192
|
}
|
|
1199
1193
|
/**
|
|
@@ -1227,17 +1221,23 @@ function assertPlatform(requiredToken) {
|
|
|
1227
1221
|
return platform;
|
|
1228
1222
|
}
|
|
1229
1223
|
/**
|
|
1230
|
-
* Returns the current platform.
|
|
1224
|
+
* Returns the current platform in the browser environment. In the server environment,
|
|
1225
|
+
* returns `null`. If you need access to the platform information, inject `PlatformRef` in your application.
|
|
1231
1226
|
*
|
|
1232
1227
|
* @publicApi
|
|
1233
1228
|
*/
|
|
1234
1229
|
function getPlatform() {
|
|
1230
|
+
if (typeof ngServerMode !== 'undefined' && ngServerMode) {
|
|
1231
|
+
return null;
|
|
1232
|
+
}
|
|
1235
1233
|
return _platformInjector?.get(PlatformRef) ?? null;
|
|
1236
1234
|
}
|
|
1237
1235
|
/**
|
|
1238
1236
|
* Destroys the current Angular platform and all Angular applications on the page.
|
|
1239
1237
|
* Destroys all modules and listeners registered with the platform.
|
|
1240
1238
|
*
|
|
1239
|
+
* This function should not be used in a server environment, as it will be a no-op.
|
|
1240
|
+
*
|
|
1241
1241
|
* @publicApi
|
|
1242
1242
|
*/
|
|
1243
1243
|
function destroyPlatform() {
|
|
@@ -1256,7 +1256,11 @@ function createOrReusePlatformInjector(providers = []) {
|
|
|
1256
1256
|
publishDefaultGlobalUtils();
|
|
1257
1257
|
// Otherwise, setup a new platform injector and run platform initializers.
|
|
1258
1258
|
const injector = createPlatformInjector(providers);
|
|
1259
|
-
|
|
1259
|
+
// During SSR, using this setting and using an injector from the global can cause the
|
|
1260
|
+
// injector to be used for a different request due to concurrency.
|
|
1261
|
+
if (typeof ngServerMode === 'undefined' || !ngServerMode) {
|
|
1262
|
+
_platformInjector = injector;
|
|
1263
|
+
}
|
|
1260
1264
|
publishSignalConfiguration();
|
|
1261
1265
|
runPlatformInitializers(injector);
|
|
1262
1266
|
return injector;
|
|
@@ -2631,13 +2635,18 @@ class ApplicationModule {
|
|
|
2631
2635
|
* @returns A promise that returns an `ApplicationRef` instance once resolved.
|
|
2632
2636
|
*/
|
|
2633
2637
|
function internalCreateApplication(config) {
|
|
2638
|
+
const { rootComponent, appProviders, platformProviders, platformRef } = config;
|
|
2634
2639
|
profiler(8 /* ProfilerEvent.BootstrapApplicationStart */);
|
|
2640
|
+
if (typeof ngServerMode !== 'undefined' && ngServerMode && !platformRef) {
|
|
2641
|
+
throw new RuntimeError(401 /* RuntimeErrorCode.PLATFORM_NOT_FOUND */, ngDevMode &&
|
|
2642
|
+
'Missing Platform: This may be due to using `bootstrapApplication` on the server without passing a `BootstrapContext`. ' +
|
|
2643
|
+
'Please make sure that `bootstrapApplication` is called with a `context` argument.');
|
|
2644
|
+
}
|
|
2635
2645
|
try {
|
|
2636
|
-
const
|
|
2646
|
+
const platformInjector = platformRef?.injector ?? createOrReusePlatformInjector(platformProviders);
|
|
2637
2647
|
if ((typeof ngDevMode === 'undefined' || ngDevMode) && rootComponent !== undefined) {
|
|
2638
2648
|
assertStandaloneComponentType(rootComponent);
|
|
2639
2649
|
}
|
|
2640
|
-
const platformInjector = createOrReusePlatformInjector(platformProviders);
|
|
2641
2650
|
// Create root application injector based on a set of providers configured at the platform
|
|
2642
2651
|
// bootstrap level as well as providers passed to the bootstrap call by a user.
|
|
2643
2652
|
const allAppProviders = [
|
|
@@ -4535,5 +4544,5 @@ const REQUEST_CONTEXT = new InjectionToken(typeof ngDevMode === 'undefined' || n
|
|
|
4535
4544
|
factory: () => null,
|
|
4536
4545
|
});
|
|
4537
4546
|
|
|
4538
|
-
export { APP_BOOTSTRAP_LISTENER, APP_ID, ApplicationInitStatus, ApplicationModule, ApplicationRef, COMPILER_OPTIONS, ChangeDetectorRef, ContentChild, ContentChildren, DefaultIterableDiffer, DestroyRef, ENVIRONMENT_INITIALIZER, EmbeddedViewRef, ErrorHandler, HOST_TAG_NAME, HostAttributeToken, Injectable, InjectionToken, Injector, IterableDiffers, KeyValueDiffers, LOCALE_ID, NgModule, NgZone, OutputEmitterRef, PLATFORM_INITIALIZER, PlatformRef, Query, REQUEST, REQUEST_CONTEXT, RESPONSE_INIT, TransferState, VERSION, Version, ViewChild, ViewChildren, ViewEncapsulation$1 as ViewEncapsulation, ViewRef, afterRenderEffect, assertInInjectionContext, assertNotInReactiveContext, assertPlatform, booleanAttribute, contentChild, contentChildren, createComponent, createPlatform, createPlatformFactory, destroyPlatform, enableProdMode, getModuleFactory, getNgModuleById, getPlatform, inject, input, isDevMode, makeEnvironmentProviders, mergeApplicationConfig, model, numberAttribute, output, platformCore, provideCheckNoChangesConfig, provideEnvironmentInitializer, providePlatformInitializer, reflectComponentType, runInInjectionContext, viewChild, viewChildren,
|
|
4547
|
+
export { APP_BOOTSTRAP_LISTENER, APP_ID, ApplicationInitStatus, ApplicationModule, ApplicationRef, COMPILER_OPTIONS, ChangeDetectorRef, ContentChild, ContentChildren, DefaultIterableDiffer, DestroyRef, ENVIRONMENT_INITIALIZER, EmbeddedViewRef, ErrorHandler, HOST_TAG_NAME, HostAttributeToken, Injectable, InjectionToken, Injector, IterableDiffers, KeyValueDiffers, LOCALE_ID, NgModule, NgZone, OutputEmitterRef, PLATFORM_INITIALIZER, PlatformRef, Query, REQUEST, REQUEST_CONTEXT, RESPONSE_INIT, TransferState, VERSION, Version, ViewChild, ViewChildren, ViewEncapsulation$1 as ViewEncapsulation, ViewRef, afterRenderEffect, assertInInjectionContext, assertNotInReactiveContext, assertPlatform, booleanAttribute, contentChild, contentChildren, createComponent, createPlatform, createPlatformFactory, destroyPlatform, enableProdMode, getModuleFactory, getNgModuleById, getPlatform, inject, input, isDevMode, makeEnvironmentProviders, mergeApplicationConfig, model, numberAttribute, output, platformCore, provideCheckNoChangesConfig, provideEnvironmentInitializer, providePlatformInitializer, reflectComponentType, runInInjectionContext, viewChild, viewChildren, AfterRenderManager as ɵAfterRenderManager, CLIENT_RENDER_MODE_FLAG as ɵCLIENT_RENDER_MODE_FLAG, CONTAINER_HEADER_OFFSET as ɵCONTAINER_HEADER_OFFSET, ChangeDetectionScheduler as ɵChangeDetectionScheduler, ChangeDetectionSchedulerImpl as ɵChangeDetectionSchedulerImpl, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, DEHYDRATED_BLOCK_REGISTRY as ɵDEHYDRATED_BLOCK_REGISTRY, ENABLE_ROOT_COMPONENT_BOOTSTRAP as ɵENABLE_ROOT_COMPONENT_BOOTSTRAP, IMAGE_CONFIG as ɵIMAGE_CONFIG, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, ɵINPUT_SIGNAL_BRAND_WRITE_TYPE, INTERNAL_APPLICATION_ERROR_HANDLER as ɵINTERNAL_APPLICATION_ERROR_HANDLER, IS_HYDRATION_DOM_REUSE_ENABLED as ɵIS_HYDRATION_DOM_REUSE_ENABLED, IS_INCREMENTAL_HYDRATION_ENABLED as ɵIS_INCREMENTAL_HYDRATION_ENABLED, JSACTION_BLOCK_ELEMENT_MAP as ɵJSACTION_BLOCK_ELEMENT_MAP, JSACTION_EVENT_CONTRACT as ɵJSACTION_EVENT_CONTRACT, NgModuleFactory as ɵNgModuleFactory, PERFORMANCE_MARK_PREFIX as ɵPERFORMANCE_MARK_PREFIX, PROVIDED_NG_ZONE as ɵPROVIDED_NG_ZONE, PendingTasksInternal as ɵPendingTasksInternal, ComponentFactory as ɵRender3ComponentFactory, RuntimeError as ɵRuntimeError, SIGNAL as ɵSIGNAL, TracingService as ɵTracingService, ViewRef$1 as ɵViewRef, annotateForHydration as ɵannotateForHydration, ɵassertType, compileNgModuleFactory as ɵcompileNgModuleFactory, createOrReusePlatformInjector as ɵcreateOrReusePlatformInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, disableProfiling as ɵdisableProfiling, enableProfiling as ɵenableProfiling, formatRuntimeError as ɵformatRuntimeError, getClosestComponentName as ɵgetClosestComponentName, getComponentDef as ɵgetComponentDef, getDocument as ɵgetDocument, _global as ɵglobal, injectChangeDetectorRef as ɵinjectChangeDetectorRef, internalCreateApplication as ɵinternalCreateApplication, internalProvideZoneChangeDetection as ɵinternalProvideZoneChangeDetection, isPromise as ɵisPromise, performanceMarkFeature as ɵperformanceMarkFeature, resolveComponentResources as ɵresolveComponentResources, setClassMetadata as ɵsetClassMetadata, setClassMetadataAsync as ɵsetClassMetadataAsync, setInjectorProfilerContext as ɵsetInjectorProfilerContext, setLocaleId as ɵsetLocaleId, startMeasuring as ɵstartMeasuring, stopMeasuring as ɵstopMeasuring, stringify as ɵstringify, withDomHydration as ɵwithDomHydration, withEventReplay as ɵwithEventReplay, withI18nSupport as ɵwithI18nSupport, withIncrementalHydration as ɵwithIncrementalHydration, FactoryTarget as ɵɵFactoryTarget, __defineInjectable as ɵɵdefineInjectable, __defineInjector as ɵɵdefineInjector, __defineNgModule as ɵɵdefineNgModule, __inject as ɵɵinject, __injectAttribute as ɵɵinjectAttribute, ɵɵngDeclareClassMetadata, ɵɵngDeclareClassMetadataAsync, ɵɵngDeclareComponent, ɵɵngDeclareDirective, ɵɵngDeclareFactory, ɵɵngDeclareInjectable, ɵɵngDeclareInjector, ɵɵngDeclareNgModule, ɵɵngDeclarePipe };
|
|
4539
4548
|
//# sourceMappingURL=core.mjs.map
|