@angular/core 21.0.0-next.2 → 21.0.0-next.3
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/application-config-core.cjs +5 -5
- package/schematics/bundles/{apply_import_manager-B3czqUhF.cjs → apply_import_manager-tNexl58m.cjs} +3 -3
- package/schematics/bundles/cleanup-unused-imports.cjs +5 -5
- package/schematics/bundles/{compiler_host-B9qvCnmC.cjs → compiler_host-Df7s6Riz.cjs} +2 -2
- package/schematics/bundles/control-flow-migration.cjs +4 -4
- package/schematics/bundles/imports-26VeX8i-.cjs +1 -1
- package/schematics/bundles/{index-B6-f9bil.cjs → index-CBaykQBv.cjs} +35 -14
- package/schematics/bundles/{index-DN8W1c8n.cjs → index-Clvp4COX.cjs} +4 -4
- package/schematics/bundles/inject-migration.cjs +3 -3
- package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
- package/schematics/bundles/{migrate_ts_type_references-DawXRJzI.cjs → migrate_ts_type_references-C_gTvDtH.cjs} +5 -5
- package/schematics/bundles/{ng_component_template-DUAg-x1h.cjs → ng_component_template-HYGPuVhy.cjs} +2 -2
- package/schematics/bundles/ng_decorators-CtYwz9Lw.cjs +1 -1
- package/schematics/bundles/ngclass-to-class-migration.cjs +7 -7
- package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
- package/schematics/bundles/output-migration.cjs +6 -6
- package/schematics/bundles/{parse_html-C8TYlOyu.cjs → parse_html-CLFKoiOK.cjs} +2 -2
- package/schematics/bundles/{project_paths-D64fJzoa.cjs → project_paths-BJTqcWvC.cjs} +3 -3
- package/schematics/bundles/{project_tsconfig_paths-DZ17BWwk.cjs → project_tsconfig_paths-bRwOJEk9.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/router-last-successful-navigation.cjs +4 -4
- package/schematics/bundles/self-closing-tags-migration.cjs +6 -6
- 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/migrations/ngclass-to-class-migration/schema.json +1 -1
- 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 v21.0.0-next.
|
|
2
|
+
* @license Angular v21.0.0-next.3
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -627,7 +627,7 @@ class Version {
|
|
|
627
627
|
/**
|
|
628
628
|
* @publicApi
|
|
629
629
|
*/
|
|
630
|
-
const VERSION = /* @__PURE__ */ new Version('21.0.0-next.
|
|
630
|
+
const VERSION = /* @__PURE__ */ new Version('21.0.0-next.3');
|
|
631
631
|
|
|
632
632
|
function compileNgModuleFactory(injector, options, moduleType) {
|
|
633
633
|
ngDevMode && assertNgModuleType(moduleType);
|
|
@@ -953,8 +953,8 @@ function bootstrap(config) {
|
|
|
953
953
|
// If the `LOCALE_ID` provider is defined at bootstrap then we set the value for ivy
|
|
954
954
|
const localeId = envInjector.get(LOCALE_ID, DEFAULT_LOCALE_ID);
|
|
955
955
|
setLocaleId(localeId || DEFAULT_LOCALE_ID);
|
|
956
|
-
const
|
|
957
|
-
if (!
|
|
956
|
+
const enableRootComponentbootstrap = envInjector.get(ENABLE_ROOT_COMPONENT_BOOTSTRAP, true);
|
|
957
|
+
if (!enableRootComponentbootstrap) {
|
|
958
958
|
if (isApplicationBootstrapConfig(config)) {
|
|
959
959
|
return envInjector.get(ApplicationRef);
|
|
960
960
|
}
|
|
@@ -982,8 +982,8 @@ function bootstrap(config) {
|
|
|
982
982
|
});
|
|
983
983
|
}
|
|
984
984
|
/**
|
|
985
|
-
* Having a separate symbol for the module
|
|
986
|
-
* tree shake the module based
|
|
985
|
+
* Having a separate symbol for the module bootstrap implementation allows us to
|
|
986
|
+
* tree shake the module based bootstrap implementation in standalone apps.
|
|
987
987
|
*/
|
|
988
988
|
let moduleBootstrapImpl;
|
|
989
989
|
/**
|
|
@@ -1141,11 +1141,6 @@ class PlatformRef {
|
|
|
1141
1141
|
}], () => [{ type: Injector }], null); })();
|
|
1142
1142
|
|
|
1143
1143
|
let _platformInjector = null;
|
|
1144
|
-
/**
|
|
1145
|
-
* Internal token to indicate whether having multiple bootstrapped platform should be allowed (only
|
|
1146
|
-
* one bootstrapped platform is allowed by default). This token helps to support SSR scenarios.
|
|
1147
|
-
*/
|
|
1148
|
-
const ALLOW_MULTIPLE_PLATFORMS = new InjectionToken(ngDevMode ? 'AllowMultipleToken' : '');
|
|
1149
1144
|
/**
|
|
1150
1145
|
* Creates a platform.
|
|
1151
1146
|
* Platforms must be created on launch using this function.
|
|
@@ -1153,12 +1148,14 @@ const ALLOW_MULTIPLE_PLATFORMS = new InjectionToken(ngDevMode ? 'AllowMultipleTo
|
|
|
1153
1148
|
* @publicApi
|
|
1154
1149
|
*/
|
|
1155
1150
|
function createPlatform(injector) {
|
|
1156
|
-
if (
|
|
1151
|
+
if (getPlatform()) {
|
|
1157
1152
|
throw new RuntimeError(400 /* RuntimeErrorCode.MULTIPLE_PLATFORMS */, ngDevMode && 'There can be only one platform. Destroy the previous one to create a new one.');
|
|
1158
1153
|
}
|
|
1159
1154
|
publishDefaultGlobalUtils();
|
|
1160
1155
|
publishSignalConfiguration();
|
|
1161
|
-
|
|
1156
|
+
// During SSR, using this setting and using an injector from the global can cause the
|
|
1157
|
+
// injector to be used for a different requjest due to concurrency.
|
|
1158
|
+
_platformInjector = typeof ngServerMode === 'undefined' || !ngServerMode ? injector : null;
|
|
1162
1159
|
const platform = injector.get(PlatformRef);
|
|
1163
1160
|
runPlatformInitializers(injector);
|
|
1164
1161
|
return platform;
|
|
@@ -1179,20 +1176,17 @@ function createPlatformFactory(parentPlatformFactory, name, providers = []) {
|
|
|
1179
1176
|
const marker = new InjectionToken(desc);
|
|
1180
1177
|
return (extraProviders = []) => {
|
|
1181
1178
|
let platform = getPlatform();
|
|
1182
|
-
if (!platform
|
|
1179
|
+
if (!platform) {
|
|
1183
1180
|
const platformProviders = [
|
|
1184
1181
|
...providers,
|
|
1185
1182
|
...extraProviders,
|
|
1186
1183
|
{ provide: marker, useValue: true },
|
|
1187
1184
|
];
|
|
1188
|
-
|
|
1189
|
-
parentPlatformFactory(platformProviders)
|
|
1190
|
-
|
|
1191
|
-
else {
|
|
1192
|
-
createPlatform(createPlatformInjector(platformProviders, desc));
|
|
1193
|
-
}
|
|
1185
|
+
platform =
|
|
1186
|
+
parentPlatformFactory?.(platformProviders) ??
|
|
1187
|
+
createPlatform(createPlatformInjector(platformProviders, desc));
|
|
1194
1188
|
}
|
|
1195
|
-
return assertPlatform(marker);
|
|
1189
|
+
return typeof ngServerMode !== 'undefined' && ngServerMode ? platform : assertPlatform(marker);
|
|
1196
1190
|
};
|
|
1197
1191
|
}
|
|
1198
1192
|
/**
|
|
@@ -1226,17 +1220,23 @@ function assertPlatform(requiredToken) {
|
|
|
1226
1220
|
return platform;
|
|
1227
1221
|
}
|
|
1228
1222
|
/**
|
|
1229
|
-
* Returns the current platform.
|
|
1223
|
+
* Returns the current platform in the browser environment. In the server environment,
|
|
1224
|
+
* returns `null`. If you need access to the platform information, inject `PlatformRef` in your application.
|
|
1230
1225
|
*
|
|
1231
1226
|
* @publicApi
|
|
1232
1227
|
*/
|
|
1233
1228
|
function getPlatform() {
|
|
1229
|
+
if (typeof ngServerMode !== 'undefined' && ngServerMode) {
|
|
1230
|
+
return null;
|
|
1231
|
+
}
|
|
1234
1232
|
return _platformInjector?.get(PlatformRef) ?? null;
|
|
1235
1233
|
}
|
|
1236
1234
|
/**
|
|
1237
1235
|
* Destroys the current Angular platform and all Angular applications on the page.
|
|
1238
1236
|
* Destroys all modules and listeners registered with the platform.
|
|
1239
1237
|
*
|
|
1238
|
+
* This function should not be used in a server environment, as it will be a no-op.
|
|
1239
|
+
*
|
|
1240
1240
|
* @publicApi
|
|
1241
1241
|
*/
|
|
1242
1242
|
function destroyPlatform() {
|
|
@@ -1255,7 +1255,11 @@ function createOrReusePlatformInjector(providers = []) {
|
|
|
1255
1255
|
publishDefaultGlobalUtils();
|
|
1256
1256
|
// Otherwise, setup a new platform injector and run platform initializers.
|
|
1257
1257
|
const injector = createPlatformInjector(providers);
|
|
1258
|
-
|
|
1258
|
+
// During SSR, using this setting and using an injector from the global can cause the
|
|
1259
|
+
// injector to be used for a different request due to concurrency.
|
|
1260
|
+
if (typeof ngServerMode === 'undefined' || !ngServerMode) {
|
|
1261
|
+
_platformInjector = injector;
|
|
1262
|
+
}
|
|
1259
1263
|
publishSignalConfiguration();
|
|
1260
1264
|
runPlatformInitializers(injector);
|
|
1261
1265
|
return injector;
|
|
@@ -2630,13 +2634,18 @@ class ApplicationModule {
|
|
|
2630
2634
|
* @returns A promise that returns an `ApplicationRef` instance once resolved.
|
|
2631
2635
|
*/
|
|
2632
2636
|
function internalCreateApplication(config) {
|
|
2637
|
+
const { rootComponent, appProviders, platformProviders, platformRef } = config;
|
|
2633
2638
|
profiler(8 /* ProfilerEvent.BootstrapApplicationStart */);
|
|
2639
|
+
if (typeof ngServerMode !== 'undefined' && ngServerMode && !platformRef) {
|
|
2640
|
+
throw new RuntimeError(401 /* RuntimeErrorCode.PLATFORM_NOT_FOUND */, ngDevMode &&
|
|
2641
|
+
'Missing Platform: This may be due to using `bootstrapApplication` on the server without passing a `BootstrapContext`. ' +
|
|
2642
|
+
'Please make sure that `bootstrapApplication` is called with a `context` argument.');
|
|
2643
|
+
}
|
|
2634
2644
|
try {
|
|
2635
|
-
const
|
|
2645
|
+
const platformInjector = platformRef?.injector ?? createOrReusePlatformInjector(platformProviders);
|
|
2636
2646
|
if ((typeof ngDevMode === 'undefined' || ngDevMode) && rootComponent !== undefined) {
|
|
2637
2647
|
assertStandaloneComponentType(rootComponent);
|
|
2638
2648
|
}
|
|
2639
|
-
const platformInjector = createOrReusePlatformInjector(platformProviders);
|
|
2640
2649
|
// Create root application injector based on a set of providers configured at the platform
|
|
2641
2650
|
// bootstrap level as well as providers passed to the bootstrap call by a user.
|
|
2642
2651
|
const allAppProviders = [
|
|
@@ -4536,5 +4545,5 @@ const REQUEST_CONTEXT = new InjectionToken(typeof ngDevMode === 'undefined' || n
|
|
|
4536
4545
|
factory: () => null,
|
|
4537
4546
|
});
|
|
4538
4547
|
|
|
4539
|
-
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,
|
|
4548
|
+
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, PROVIDED_ZONELESS as ɵPROVIDED_ZONELESS, 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 };
|
|
4540
4549
|
//# sourceMappingURL=core.mjs.map
|