@angular/core 21.0.0-next.2 → 21.0.0-next.4
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 +44 -18
- package/effect.d.d.ts +1 -1
- package/event_dispatcher.d.d.ts +1 -1
- package/fesm2022/attribute.mjs +1 -1
- package/fesm2022/attribute.mjs.map +1 -1
- package/fesm2022/core.mjs +253 -87
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/debug_node.mjs +516 -690
- package/fesm2022/debug_node.mjs.map +1 -1
- package/fesm2022/effect.mjs +1 -1
- package/fesm2022/effect.mjs.map +1 -1
- package/fesm2022/not_found.mjs +1 -1
- package/fesm2022/not_found.mjs.map +1 -1
- package/fesm2022/primitives/di.mjs +1 -1
- package/fesm2022/primitives/di.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -1
- package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +2 -2
- package/fesm2022/primitives/signals.mjs.map +1 -1
- package/fesm2022/resource.mjs +1 -1
- package/fesm2022/resource.mjs.map +1 -1
- package/fesm2022/root_effect_scheduler.mjs +55 -39
- package/fesm2022/root_effect_scheduler.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +3 -1
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/signal.mjs +32 -11
- package/fesm2022/signal.mjs.map +1 -1
- package/fesm2022/testing.mjs +4 -4
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/weak_ref.mjs +1 -1
- package/fesm2022/weak_ref.mjs.map +1 -1
- package/graph.d.d.ts +24 -4
- package/index.d.ts +16 -135
- 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 +2 -2
- package/rxjs-interop/index.d.ts +3 -1
- package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +135 -0
- package/schematics/bundles/application-config-core.cjs +6 -6
- package/schematics/bundles/{apply_import_manager-B3czqUhF.cjs → apply_import_manager-DroqamMP.cjs} +3 -3
- package/schematics/bundles/bootstrap-options-migration.cjs +715 -0
- package/schematics/bundles/cleanup-unused-imports.cjs +5 -5
- package/schematics/bundles/{compiler_host-B9qvCnmC.cjs → compiler_host-aKaS4KRz.cjs} +2 -2
- package/schematics/bundles/control-flow-migration.cjs +4 -4
- package/schematics/bundles/{imports-26VeX8i-.cjs → imports-DwPXlGFl.cjs} +27 -1
- package/schematics/bundles/{index-B6-f9bil.cjs → index-BI97t1U8.cjs} +130 -34
- package/schematics/bundles/{index-DN8W1c8n.cjs → index-DaB-z4lP.cjs} +4 -4
- package/schematics/bundles/inject-migration.cjs +5 -5
- package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
- package/schematics/bundles/{migrate_ts_type_references-DawXRJzI.cjs → migrate_ts_type_references-DPuwhGod.cjs} +5 -5
- package/schematics/bundles/{ng_component_template-DUAg-x1h.cjs → ng_component_template-CytqBs-q.cjs} +3 -3
- package/schematics/bundles/{ng_decorators-CtYwz9Lw.cjs → ng_decorators-BI0uV7KI.cjs} +2 -2
- package/schematics/bundles/ngclass-to-class-migration.cjs +9 -9
- package/schematics/bundles/ngstyle-to-style-migration.cjs +490 -0
- package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
- package/schematics/bundles/output-migration.cjs +6 -6
- package/schematics/bundles/parse_html-CeQjkdOK.cjs +132 -0
- package/schematics/bundles/{project_paths-D64fJzoa.cjs → project_paths-Cz4x-QiT.cjs} +3 -3
- package/schematics/bundles/{project_tsconfig_paths-DZ17BWwk.cjs → project_tsconfig_paths-Clg7WX1w.cjs} +170 -198
- package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
- package/schematics/bundles/route-lazy-loading.cjs +48 -4
- package/schematics/bundles/router-current-navigation.cjs +6 -6
- package/schematics/bundles/router-last-successful-navigation.cjs +6 -6
- package/schematics/bundles/self-closing-tags-migration.cjs +8 -8
- package/schematics/bundles/signal-input-migration.cjs +17 -9
- package/schematics/bundles/signal-queries-migration.cjs +7 -7
- package/schematics/bundles/signals.cjs +7 -7
- package/schematics/bundles/standalone-migration.cjs +7 -7
- package/schematics/bundles/{symbol-VPWguRxr.cjs → symbol-BObKoqes.cjs} +3 -2
- package/schematics/collection.json +6 -0
- package/schematics/migrations/ngclass-to-class-migration/schema.json +1 -1
- package/schematics/migrations/ngstyle-to-style-migration/schema.json +20 -0
- package/schematics/migrations.json +10 -0
- package/testing/index.d.ts +1 -1
- package/weak_ref.d.d.ts +1 -1
- package/schematics/bundles/parse_html-C8TYlOyu.cjs +0 -41
package/fesm2022/core.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.0.0-next.
|
|
2
|
+
* @license Angular v21.0.0-next.4
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { RuntimeError, InjectionToken, getCurrentTNode, assertInInjectionContext, signalAsReadonlyFn, assertNgModuleType, Injector, inject, ɵɵdefineInjectable as __defineInjectable,
|
|
8
|
-
export { DOCUMENT, EnvironmentInjector, EventEmitter, INJECTOR, PendingTasks, forwardRef, importProvidersFrom, isSignal, isStandalone, provideBrowserGlobalErrorListeners, resolveForwardRef, signal, EffectScheduler as ɵEffectScheduler, NG_COMP_DEF as ɵNG_COMP_DEF, NG_DIR_DEF as ɵNG_DIR_DEF, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_INJ_DEF as ɵNG_INJ_DEF, NG_MOD_DEF as ɵNG_MOD_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_PROV_DEF as ɵNG_PROV_DEF, NoopNgZone as ɵNoopNgZone, R3Injector as ɵR3Injector, XSS_SECURITY_URL as ɵXSS_SECURITY_URL,
|
|
7
|
+
import { RuntimeError, InjectionToken, getCurrentTNode, assertInInjectionContext, signalAsReadonlyFn, assertNgModuleType, Injector, inject, NgZone, ChangeDetectionScheduler, INTERNAL_APPLICATION_ERROR_HANDLER, ɵɵdefineInjectable as __defineInjectable, ZONELESS_ENABLED, ENVIRONMENT_INITIALIZER, SCHEDULE_IN_ROOT_ZONE, SCHEDULE_IN_ROOT_ZONE_DEFAULT, makeEnvironmentProviders, PendingTasksInternal, formatRuntimeError, PROVIDED_ZONELESS, stringify, ɵɵinject as __inject, errorHandlerEnvironmentInitializer, INJECTOR_SCOPE, runInInjectionContext, provideEnvironmentInitializer, ErrorHandler, _global, isComponentHost, getComponentLViewByIndex, getLView, DECLARATION_COMPONENT_VIEW, ɵɵdefineInjector as __defineInjector, unwrapRNode, CLEANUP, isLContainer, HOST, hasI18n, unwrapLView, RENDERER, assertTNode, isProjectionTNode, PARENT, isRootView, HEADER_OFFSET, TVIEW, CONTEXT, getComponentDef, CONTAINER_HEADER_OFFSET, isLView, getTNode, assertNotInReactiveContext, ViewContext, DestroyRef, setInjectorProfilerContext, emitEffectCreatedEvent, getNullInjector } from './root_effect_scheduler.mjs';
|
|
8
|
+
export { DOCUMENT, EnvironmentInjector, EventEmitter, INJECTOR, PendingTasks, VERSION, Version, forwardRef, importProvidersFrom, isSignal, isStandalone, provideBrowserGlobalErrorListeners, resolveForwardRef, signal, EffectScheduler as ɵEffectScheduler, NG_COMP_DEF as ɵNG_COMP_DEF, NG_DIR_DEF as ɵNG_DIR_DEF, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_INJ_DEF as ɵNG_INJ_DEF, NG_MOD_DEF as ɵNG_MOD_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_PROV_DEF as ɵNG_PROV_DEF, NoopNgZone as ɵNoopNgZone, R3Injector as ɵR3Injector, XSS_SECURITY_URL as ɵXSS_SECURITY_URL, convertToBitFlags as ɵconvertToBitFlags, createInjector as ɵcreateInjector, getInjectableDef as ɵgetInjectableDef, isEnvironmentProviders as ɵisEnvironmentProviders, isInjectable as ɵisInjectable, store as ɵstore, truncateMiddle as ɵtruncateMiddle, ɵunwrapWritableSignal, ɵɵdisableBindings, ɵɵenableBindings, ɵɵinvalidFactoryDep, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵresetView, ɵɵrestoreView } from './root_effect_scheduler.mjs';
|
|
9
9
|
import { SIGNAL_NODE, signalSetFn, SIGNAL, producerAccessed, consumerDestroy, consumerPollProducersForChange, consumerBeforeComputation, consumerAfterComputation } from './signal.mjs';
|
|
10
|
-
import { ɵɵinjectAttribute as __injectAttribute, createMultiResultQuerySignalFn, createSingleResultOptionalQuerySignalFn, createSingleResultRequiredQuerySignalFn, makePropDecorator, NgModuleFactory, COMPILER_OPTIONS, setJitOptions, isComponentResourceResolutionQueueEmpty, getCompilerFacade, resolveComponentResources,
|
|
11
|
-
export { ANIMATION_MODULE_TYPE, APP_INITIALIZER, Attribute, CSP_NONCE, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, Compiler, CompilerFactory, Component, ComponentFactory$1 as ComponentFactory, ComponentFactoryResolver, ComponentRef, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, Directive, ElementRef, Host, HostBinding, HostListener, Inject, Input, MAX_ANIMATION_TIMEOUT, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModuleFactory$1 as NgModuleFactory, NgModuleRef$1 as NgModuleRef, Optional, Output, PLATFORM_ID, Pipe, QueryList, Renderer2, RendererFactory2, RendererStyleFlags2, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, ViewContainerRef, afterEveryRender, afterNextRender, asNativeElements, createEnvironmentInjector, createNgModule, createNgModuleRef, enableProfiling, getDebugNode, inputBinding, makeStateKey, outputBinding, provideAppInitializer, provideNgReflectAttributes,
|
|
10
|
+
import { ɵɵinjectAttribute as __injectAttribute, createMultiResultQuerySignalFn, createSingleResultOptionalQuerySignalFn, createSingleResultRequiredQuerySignalFn, makePropDecorator, NgModuleFactory, COMPILER_OPTIONS, setJitOptions, isComponentResourceResolutionQueueEmpty, getCompilerFacade, resolveComponentResources, ApplicationRef, setClassMetadata, Injectable, performanceMarkFeature, IMAGE_CONFIG, getDocument, remove, isPromise, ApplicationInitStatus, LOCALE_ID, DEFAULT_LOCALE_ID, setLocaleId, createNgModuleRefWithProviders, optionsReducer, provideZonelessChangeDetectionInternal, publishDefaultGlobalUtils, PLATFORM_INITIALIZER, publishSignalConfiguration, ChangeDetectionSchedulerImpl, checkNoChangesInternal, UseExhaustiveCheckNoChanges, getRegisteredNgModuleType, ViewRef as ViewRef$1, isListLikeIterable, iterateListLike, isJsObject, ɵɵdefineNgModule as __defineNgModule, NgModule, profiler, assertStandaloneComponentType, EnvironmentNgModuleRefAdapter, JSACTION_BLOCK_ELEMENT_MAP, APP_ID, setStashFn, APP_BOOTSTRAP_LISTENER, JSACTION_EVENT_CONTRACT, removeListeners, isIncrementalHydrationEnabled, DEFER_BLOCK_SSR_ID_ATTRIBUTE, invokeListeners, triggerHydrationFromBlockName, IS_EVENT_REPLAY_ENABLED, EVENT_REPLAY_ENABLED_DEFAULT, sharedStashFunction, sharedMapFunction, enableStashEventListenerImpl, isI18nHydrationEnabled, TransferState, NGH_DATA_KEY, NGH_DEFER_BLOCKS_KEY, SKIP_HYDRATION_ATTR_NAME, NGH_ATTR_NAME, getLNodeForHydration, isI18nHydrationSupportEnabled, getOrComputeI18nChildren, trySerializeI18nBlock, I18N_DATA, isTNodeShape, isDetachedByI18n, TEMPLATES, isDisconnectedNode, isInSkipHydrationBlock, unsupportedProjectionOfDomNodes, CONTAINERS, isLetDeclaration, ELEMENT_CONTAINERS, processTextNodeBeforeSerialization, setJSActionAttributes, ViewEncapsulation as ViewEncapsulation$1, collectNativeNodes, TEMPLATE_ID, NUM_ROOT_NODES, isDeferBlock, getLDeferBlockDetails, getTDeferBlockDetails, collectNativeNodesInLContainer, validateNodeExists, validateMatchingNode, DEFER_BLOCK_ID, DEFER_BLOCK_STATE, DEFER_BLOCK_STATE$1, MULTIPLIER, NODES, calcPathForNode, DISCONNECTED_NODES, convertHydrateTriggersToJsAction, DEFER_HYDRATE_TRIGGERS, DEFER_PARENT_BLOCK_ID, IS_I18N_HYDRATION_ENABLED, IS_HYDRATION_DOM_REUSE_ENABLED, IS_INCREMENTAL_HYDRATION_ENABLED, DEHYDRATED_BLOCK_REGISTRY, DehydratedBlockRegistry, processBlockData, gatherDeferBlocksCommentNodes, processAndInitTriggers, appendDeferBlocksToJSActionMap, verifySsrContentsIntegrity, Console, PRESERVE_HOST_CONTENT, cleanupDehydratedViews, countBlocksSkippedByHydration, enableRetrieveHydrationInfoImpl, enableLocateOrCreateElementNodeImpl, enableLocateOrCreateTextNodeImpl, enableLocateOrCreateElementContainerNodeImpl, enableLocateOrCreateContainerAnchorImpl, enableLocateOrCreateContainerRefImpl, enableFindMatchingDehydratedViewImpl, enableApplyRootElementTransformImpl, enableLocateOrCreateI18nNodeImpl, enablePrepareI18nBlockForHydrationImpl, setIsI18nHydrationSupportEnabled, enableClaimDehydratedIcuCaseImpl, enableRetrieveDeferBlockDataImpl, readPatchedLView, angularCoreEnv, setClassMetadataAsync, NOOP_AFTER_RENDER_REF, AfterRenderManager, TracingService, AfterRenderImpl, AfterRenderSequence, AFTER_RENDER_PHASES, assertComponentDef, ComponentFactory } from './debug_node.mjs';
|
|
11
|
+
export { ANIMATION_MODULE_TYPE, APP_INITIALIZER, Attribute, CSP_NONCE, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, Compiler, CompilerFactory, Component, ComponentFactory$1 as ComponentFactory, ComponentFactoryResolver, ComponentRef, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, Directive, ElementRef, Host, HostBinding, HostListener, Inject, Input, MAX_ANIMATION_TIMEOUT, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModuleFactory$1 as NgModuleFactory, NgModuleRef$1 as NgModuleRef, Optional, Output, PLATFORM_ID, Pipe, QueryList, Renderer2, RendererFactory2, RendererStyleFlags2, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, ViewContainerRef, afterEveryRender, afterNextRender, asNativeElements, createEnvironmentInjector, createNgModule, createNgModuleRef, enableProfiling, getDebugNode, inputBinding, makeStateKey, outputBinding, provideAppInitializer, provideNgReflectAttributes, provideZonelessChangeDetection, setTestabilityGetter, twoWayBinding, ANIMATIONS_DISABLED as ɵANIMATIONS_DISABLED, AcxChangeDetectionStrategy as ɵAcxChangeDetectionStrategy, AcxViewEncapsulation as ɵAcxViewEncapsulation, ComponentFactory$1 as ɵComponentFactory, DEFER_BLOCK_CONFIG as ɵDEFER_BLOCK_CONFIG, DEFER_BLOCK_DEPENDENCY_INTERCEPTOR as ɵDEFER_BLOCK_DEPENDENCY_INTERCEPTOR, DeferBlockBehavior as ɵDeferBlockBehavior, DeferBlockState as ɵDeferBlockState, Framework as ɵFramework, HydrationStatus as ɵHydrationStatus, IMAGE_CONFIG_DEFAULTS as ɵIMAGE_CONFIG_DEFAULTS, IS_ENABLED_BLOCKING_INITIAL_NAVIGATION as ɵIS_ENABLED_BLOCKING_INITIAL_NAVIGATION, LContext as ɵLContext, LocaleDataIndex as ɵLocaleDataIndex, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, NO_CHANGE as ɵNO_CHANGE, ReflectionCapabilities as ɵReflectionCapabilities, ComponentRef$1 as ɵRender3ComponentRef, NgModuleRef as ɵRender3NgModuleRef, SSR_CONTENT_INTEGRITY_MARKER as ɵSSR_CONTENT_INTEGRITY_MARKER, TESTABILITY as ɵTESTABILITY, TESTABILITY_GETTER as ɵTESTABILITY_GETTER, TimerScheduler as ɵTimerScheduler, TracingAction as ɵTracingAction, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allLeavingAnimations as ɵallLeavingAnimations, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, compilePipe as ɵcompilePipe, depsTracker as ɵdepsTracker, devModeEqual as ɵdevModeEqual, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, generateStandaloneInDeclarationsError as ɵgenerateStandaloneInDeclarationsError, getAsyncClassMetadataFn as ɵgetAsyncClassMetadataFn, getDebugNode as ɵgetDebugNode, getDeferBlocks as ɵgetDeferBlocks, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getSanitizationBypassType as ɵgetSanitizationBypassType, getTransferState as ɵgetTransferState, ɵgetUnknownElementStrictMode, ɵgetUnknownPropertyStrictMode, inferTagNameFromDefinition as ɵinferTagNameFromDefinition, isBoundToModule as ɵisBoundToModule, isComponentDefPendingResolution as ɵisComponentDefPendingResolution, isNgModule as ɵisNgModule, isSubscribable as ɵisSubscribable, isViewDirty as ɵisViewDirty, markForRefresh as ɵmarkForRefresh, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, publishExternalGlobalUtil as ɵpublishExternalGlobalUtil, readHydrationInfo as ɵreadHydrationInfo, registerLocaleData as ɵregisterLocaleData, renderDeferBlockState as ɵrenderDeferBlockState, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, restoreComponentResolutionQueue as ɵrestoreComponentResolutionQueue, setAllowDuplicateNgModuleIdsForTest as ɵsetAllowDuplicateNgModuleIdsForTest, ɵsetClassDebugInfo, setDocument as ɵsetDocument, ɵsetUnknownElementStrictMode, ɵsetUnknownPropertyStrictMode, transitiveScopesFor as ɵtransitiveScopesFor, triggerResourceLoading as ɵtriggerResourceLoading, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, ɵɵCopyDefinitionFeature, ɵɵExternalStylesFeature, ɵɵHostDirectivesFeature, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵadvance, ɵɵanimateEnter, ɵɵanimateEnterListener, ɵɵanimateLeave, ɵɵanimateLeaveListener, ɵɵariaProperty, ɵɵattachSourceLocations, ɵɵattribute, ɵɵclassMap, ɵɵclassProp, ɵɵcomponentInstance, ɵɵconditional, ɵɵconditionalBranchCreate, ɵɵconditionalCreate, ɵɵcontentQuery, ɵɵcontentQuerySignal, ɵɵdeclareLet, ɵɵdefer, ɵɵdeferEnableTimerScheduling, ɵɵdeferHydrateNever, ɵɵdeferHydrateOnHover, ɵɵdeferHydrateOnIdle, ɵɵdeferHydrateOnImmediate, ɵɵdeferHydrateOnInteraction, ɵɵdeferHydrateOnTimer, ɵɵdeferHydrateOnViewport, ɵɵdeferHydrateWhen, ɵɵdeferOnHover, ɵɵdeferOnIdle, ɵɵdeferOnImmediate, ɵɵdeferOnInteraction, ɵɵdeferOnTimer, ɵɵdeferOnViewport, ɵɵdeferPrefetchOnHover, ɵɵdeferPrefetchOnIdle, ɵɵdeferPrefetchOnImmediate, ɵɵdeferPrefetchOnInteraction, ɵɵdeferPrefetchOnTimer, ɵɵdeferPrefetchOnViewport, ɵɵdeferPrefetchWhen, ɵɵdeferWhen, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdomElement, ɵɵdomElementContainer, ɵɵdomElementContainerEnd, ɵɵdomElementContainerStart, ɵɵdomElementEnd, ɵɵdomElementStart, ɵɵdomListener, ɵɵdomProperty, ɵɵdomTemplate, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵgetComponentDepsFactory, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵgetReplaceMetadataURL, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinterpolate, ɵɵinterpolate1, ɵɵinterpolate2, ɵɵinterpolate3, ɵɵinterpolate4, ɵɵinterpolate5, ɵɵinterpolate6, ɵɵinterpolate7, ɵɵinterpolate8, ɵɵinterpolateV, ɵɵinvalidFactory, ɵɵlistener, ɵɵloadQuery, ɵɵnextContext, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryAdvance, ɵɵqueryRefresh, ɵɵreadContextLet, ɵɵreference, registerNgModuleType as ɵɵregisterNgModuleType, ɵɵrepeater, ɵɵrepeaterCreate, ɵɵrepeaterTrackByIdentity, ɵɵrepeaterTrackByIndex, ɵɵreplaceMetadata, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstoreLet, ɵɵstyleMap, ɵɵstyleProp, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵtwoWayBindingSet, ɵɵtwoWayListener, ɵɵtwoWayProperty, ɵɵvalidateIframeAttribute, ɵɵviewQuery, ɵɵviewQuerySignal } from './debug_node.mjs';
|
|
12
12
|
import { OutputEmitterRef } from './resource.mjs';
|
|
13
13
|
export { computed, effect, linkedSignal, resource, untracked, ResourceImpl as ɵResourceImpl, encapsulateResourceError as ɵencapsulateResourceError, getOutputDestroyRef as ɵgetOutputDestroyRef } from './resource.mjs';
|
|
14
|
+
import { Subscription } from 'rxjs';
|
|
14
15
|
export { setAlternateWeakRefImpl as ɵsetAlternateWeakRefImpl } from './weak_ref.mjs';
|
|
15
16
|
export { setCurrentInjector as ɵsetCurrentInjector } from './not_found.mjs';
|
|
16
17
|
import { clearAppScopedEarlyEventContract, EventContract, EventContractContainer, EventDispatcher, registerDispatcher, EventPhase, getAppScopedQueuedEventInfos, isEarlyEventType, isCaptureEventType } from './primitives/event-dispatch.mjs';
|
|
17
18
|
import '@angular/core/primitives/signals';
|
|
18
19
|
import '@angular/core/primitives/di';
|
|
19
|
-
import 'rxjs';
|
|
20
20
|
import 'rxjs/operators';
|
|
21
21
|
import './attribute.mjs';
|
|
22
22
|
import './effect.mjs';
|
|
@@ -154,27 +154,35 @@ class HostAttributeToken {
|
|
|
154
154
|
* ```
|
|
155
155
|
* @publicApi
|
|
156
156
|
*/
|
|
157
|
-
const HOST_TAG_NAME =
|
|
158
|
-
|
|
159
|
-
//
|
|
160
|
-
//
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
157
|
+
const HOST_TAG_NAME = /* @__PURE__ */ (() => {
|
|
158
|
+
|
|
159
|
+
// If nothing ever injects `HOST_TAG_NAME`, the IIFE result is unused and
|
|
160
|
+
// the bundler can drop the whole block. If we set `__NG_ELEMENT_ID__` at
|
|
161
|
+
// the top level instead, the mutation would look like a side effect,
|
|
162
|
+
// forcing the bundler to keep it even when unused.
|
|
163
|
+
const HOST_TAG_NAME_TOKEN = new InjectionToken(ngDevMode ? 'HOST_TAG_NAME' : '');
|
|
164
|
+
// HOST_TAG_NAME should be resolved at the current node, similar to e.g. ElementRef,
|
|
165
|
+
// so we manually specify __NG_ELEMENT_ID__ here, instead of using a factory.
|
|
166
|
+
// tslint:disable-next-line:no-toplevel-property-access
|
|
167
|
+
HOST_TAG_NAME_TOKEN.__NG_ELEMENT_ID__ = (flags) => {
|
|
168
|
+
const tNode = getCurrentTNode();
|
|
169
|
+
if (tNode === null) {
|
|
170
|
+
throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode &&
|
|
171
|
+
'HOST_TAG_NAME can only be injected in directives and components ' +
|
|
172
|
+
'during construction time (in a class constructor or as a class field initializer)');
|
|
173
|
+
}
|
|
174
|
+
if (tNode.type & 2 /* TNodeType.Element */) {
|
|
175
|
+
return tNode.value;
|
|
176
|
+
}
|
|
177
|
+
if (flags & 8 /* InternalInjectFlags.Optional */) {
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
164
180
|
throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode &&
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
if (flags & 8 /* InternalInjectFlags.Optional */) {
|
|
172
|
-
return null;
|
|
173
|
-
}
|
|
174
|
-
throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode &&
|
|
175
|
-
`HOST_TAG_NAME was used on ${getDevModeNodeName(tNode)} which doesn't have an underlying element in the DOM. ` +
|
|
176
|
-
`This is invalid, and so the dependency should be marked as optional.`);
|
|
177
|
-
};
|
|
181
|
+
`HOST_TAG_NAME was used on ${getDevModeNodeName(tNode)} which doesn't have an underlying element in the DOM. ` +
|
|
182
|
+
`This is invalid, and so the dependency should be marked as optional.`);
|
|
183
|
+
};
|
|
184
|
+
return HOST_TAG_NAME_TOKEN;
|
|
185
|
+
})();
|
|
178
186
|
function getDevModeNodeName(tNode) {
|
|
179
187
|
if (tNode.type & 8 /* TNodeType.ElementContainer */) {
|
|
180
188
|
return 'an <ng-container>';
|
|
@@ -606,29 +614,6 @@ const ViewChild = makePropDecorator('ViewChild', (selector, opts) => ({
|
|
|
606
614
|
...opts,
|
|
607
615
|
}), Query);
|
|
608
616
|
|
|
609
|
-
/**
|
|
610
|
-
* @description Represents the version of Angular
|
|
611
|
-
*
|
|
612
|
-
* @publicApi
|
|
613
|
-
*/
|
|
614
|
-
class Version {
|
|
615
|
-
full;
|
|
616
|
-
major;
|
|
617
|
-
minor;
|
|
618
|
-
patch;
|
|
619
|
-
constructor(full) {
|
|
620
|
-
this.full = full;
|
|
621
|
-
const parts = full.split('.');
|
|
622
|
-
this.major = parts[0];
|
|
623
|
-
this.minor = parts[1];
|
|
624
|
-
this.patch = parts.slice(2).join('.');
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
/**
|
|
628
|
-
* @publicApi
|
|
629
|
-
*/
|
|
630
|
-
const VERSION = /* @__PURE__ */ new Version('21.0.0-next.2');
|
|
631
|
-
|
|
632
617
|
function compileNgModuleFactory(injector, options, moduleType) {
|
|
633
618
|
ngDevMode && assertNgModuleType(moduleType);
|
|
634
619
|
const moduleFactory = new NgModuleFactory(moduleType);
|
|
@@ -675,6 +660,177 @@ function _lastDefined(args) {
|
|
|
675
660
|
return undefined;
|
|
676
661
|
}
|
|
677
662
|
|
|
663
|
+
class NgZoneChangeDetectionScheduler {
|
|
664
|
+
zone = inject(NgZone);
|
|
665
|
+
changeDetectionScheduler = inject(ChangeDetectionScheduler);
|
|
666
|
+
applicationRef = inject(ApplicationRef);
|
|
667
|
+
applicationErrorHandler = inject(INTERNAL_APPLICATION_ERROR_HANDLER);
|
|
668
|
+
_onMicrotaskEmptySubscription;
|
|
669
|
+
initialize() {
|
|
670
|
+
if (this._onMicrotaskEmptySubscription) {
|
|
671
|
+
return;
|
|
672
|
+
}
|
|
673
|
+
this._onMicrotaskEmptySubscription = this.zone.onMicrotaskEmpty.subscribe({
|
|
674
|
+
next: () => {
|
|
675
|
+
// `onMicroTaskEmpty` can happen _during_ the zoneless scheduler change detection because
|
|
676
|
+
// zone.run(() => {}) will result in `checkStable` at the end of the `zone.run` closure
|
|
677
|
+
// and emit `onMicrotaskEmpty` synchronously if run coalsecing is false.
|
|
678
|
+
if (this.changeDetectionScheduler.runningTick) {
|
|
679
|
+
return;
|
|
680
|
+
}
|
|
681
|
+
this.zone.run(() => {
|
|
682
|
+
try {
|
|
683
|
+
this.applicationRef.dirtyFlags |= 1 /* ApplicationRefDirtyFlags.ViewTreeGlobal */;
|
|
684
|
+
this.applicationRef._tick();
|
|
685
|
+
}
|
|
686
|
+
catch (e) {
|
|
687
|
+
this.applicationErrorHandler(e);
|
|
688
|
+
}
|
|
689
|
+
});
|
|
690
|
+
},
|
|
691
|
+
});
|
|
692
|
+
}
|
|
693
|
+
ngOnDestroy() {
|
|
694
|
+
this._onMicrotaskEmptySubscription?.unsubscribe();
|
|
695
|
+
}
|
|
696
|
+
static ɵfac = function NgZoneChangeDetectionScheduler_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NgZoneChangeDetectionScheduler)(); };
|
|
697
|
+
static ɵprov = /*@__PURE__*/ __defineInjectable({ token: NgZoneChangeDetectionScheduler, factory: NgZoneChangeDetectionScheduler.ɵfac, providedIn: 'root' });
|
|
698
|
+
}
|
|
699
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgZoneChangeDetectionScheduler, [{
|
|
700
|
+
type: Injectable,
|
|
701
|
+
args: [{ providedIn: 'root' }]
|
|
702
|
+
}], null, null); })();
|
|
703
|
+
/**
|
|
704
|
+
* Internal token used to verify that `provideZoneChangeDetection` is not used
|
|
705
|
+
* with the bootstrapModule API.
|
|
706
|
+
*/
|
|
707
|
+
const PROVIDED_NG_ZONE = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'provideZoneChangeDetection token' : '', { factory: () => false });
|
|
708
|
+
function internalProvideZoneChangeDetection({ ngZoneFactory, scheduleInRootZone, }) {
|
|
709
|
+
ngZoneFactory ??= () => new NgZone({ ...getNgZoneOptions(), scheduleInRootZone });
|
|
710
|
+
return [
|
|
711
|
+
{ provide: ZONELESS_ENABLED, useValue: false },
|
|
712
|
+
{ provide: NgZone, useFactory: ngZoneFactory },
|
|
713
|
+
{
|
|
714
|
+
provide: ENVIRONMENT_INITIALIZER,
|
|
715
|
+
multi: true,
|
|
716
|
+
useFactory: () => {
|
|
717
|
+
const ngZoneChangeDetectionScheduler = inject(NgZoneChangeDetectionScheduler, {
|
|
718
|
+
optional: true,
|
|
719
|
+
});
|
|
720
|
+
if ((typeof ngDevMode === 'undefined' || ngDevMode) &&
|
|
721
|
+
ngZoneChangeDetectionScheduler === null) {
|
|
722
|
+
throw new RuntimeError(402 /* RuntimeErrorCode.MISSING_REQUIRED_INJECTABLE_IN_BOOTSTRAP */, `A required Injectable was not found in the dependency injection tree. ` +
|
|
723
|
+
'If you are bootstrapping an NgModule, make sure that the `BrowserModule` is imported.');
|
|
724
|
+
}
|
|
725
|
+
return () => ngZoneChangeDetectionScheduler.initialize();
|
|
726
|
+
},
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
provide: ENVIRONMENT_INITIALIZER,
|
|
730
|
+
multi: true,
|
|
731
|
+
useFactory: () => {
|
|
732
|
+
const service = inject(ZoneStablePendingTask);
|
|
733
|
+
return () => {
|
|
734
|
+
service.initialize();
|
|
735
|
+
};
|
|
736
|
+
},
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
provide: SCHEDULE_IN_ROOT_ZONE,
|
|
740
|
+
useValue: scheduleInRootZone ?? SCHEDULE_IN_ROOT_ZONE_DEFAULT,
|
|
741
|
+
},
|
|
742
|
+
];
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* Provides `NgZone`-based change detection for the application bootstrapped using
|
|
746
|
+
* `bootstrapApplication`.
|
|
747
|
+
*
|
|
748
|
+
* `NgZone` is already provided in applications by default. This provider allows you to configure
|
|
749
|
+
* options like `eventCoalescing` in the `NgZone`.
|
|
750
|
+
* This provider is not available for `platformBrowser().bootstrapModule`, which uses
|
|
751
|
+
* `BootstrapOptions` instead.
|
|
752
|
+
*
|
|
753
|
+
* @usageNotes
|
|
754
|
+
* ```ts
|
|
755
|
+
* bootstrapApplication(MyApp, {providers: [
|
|
756
|
+
* provideZoneChangeDetection({eventCoalescing: true}),
|
|
757
|
+
* ]});
|
|
758
|
+
* ```
|
|
759
|
+
*
|
|
760
|
+
* @publicApi
|
|
761
|
+
* @see {@link /api/platform-browser/bootstrapApplication bootstrapApplication}
|
|
762
|
+
* @see {@link NgZoneOptions}
|
|
763
|
+
*/
|
|
764
|
+
function provideZoneChangeDetection(options) {
|
|
765
|
+
const scheduleInRootZone = options?.scheduleInRootZone;
|
|
766
|
+
const zoneProviders = internalProvideZoneChangeDetection({
|
|
767
|
+
ngZoneFactory: () => {
|
|
768
|
+
const ngZoneOptions = getNgZoneOptions(options);
|
|
769
|
+
ngZoneOptions.scheduleInRootZone = scheduleInRootZone;
|
|
770
|
+
if (ngZoneOptions.shouldCoalesceEventChangeDetection) {
|
|
771
|
+
performanceMarkFeature('NgZone_CoalesceEvent');
|
|
772
|
+
}
|
|
773
|
+
return new NgZone(ngZoneOptions);
|
|
774
|
+
},
|
|
775
|
+
scheduleInRootZone,
|
|
776
|
+
});
|
|
777
|
+
return makeEnvironmentProviders([{ provide: PROVIDED_NG_ZONE, useValue: true }, zoneProviders]);
|
|
778
|
+
}
|
|
779
|
+
// Transforms a set of `BootstrapOptions` (supported by the NgModule-based bootstrap APIs) ->
|
|
780
|
+
// `NgZoneOptions` that are recognized by the NgZone constructor. Passing no options will result in
|
|
781
|
+
// a set of default options returned.
|
|
782
|
+
function getNgZoneOptions(options) {
|
|
783
|
+
return {
|
|
784
|
+
enableLongStackTrace: typeof ngDevMode === 'undefined' ? false : !!ngDevMode,
|
|
785
|
+
shouldCoalesceEventChangeDetection: options?.eventCoalescing ?? false,
|
|
786
|
+
shouldCoalesceRunChangeDetection: options?.runCoalescing ?? false,
|
|
787
|
+
};
|
|
788
|
+
}
|
|
789
|
+
class ZoneStablePendingTask {
|
|
790
|
+
subscription = new Subscription();
|
|
791
|
+
initialized = false;
|
|
792
|
+
zone = inject(NgZone);
|
|
793
|
+
pendingTasks = inject(PendingTasksInternal);
|
|
794
|
+
initialize() {
|
|
795
|
+
if (this.initialized) {
|
|
796
|
+
return;
|
|
797
|
+
}
|
|
798
|
+
this.initialized = true;
|
|
799
|
+
let task = null;
|
|
800
|
+
if (!this.zone.isStable && !this.zone.hasPendingMacrotasks && !this.zone.hasPendingMicrotasks) {
|
|
801
|
+
task = this.pendingTasks.add();
|
|
802
|
+
}
|
|
803
|
+
this.zone.runOutsideAngular(() => {
|
|
804
|
+
this.subscription.add(this.zone.onStable.subscribe(() => {
|
|
805
|
+
NgZone.assertNotInAngularZone();
|
|
806
|
+
// Check whether there are no pending macro/micro tasks in the next tick
|
|
807
|
+
// to allow for NgZone to update the state.
|
|
808
|
+
queueMicrotask(() => {
|
|
809
|
+
if (task !== null &&
|
|
810
|
+
!this.zone.hasPendingMacrotasks &&
|
|
811
|
+
!this.zone.hasPendingMicrotasks) {
|
|
812
|
+
this.pendingTasks.remove(task);
|
|
813
|
+
task = null;
|
|
814
|
+
}
|
|
815
|
+
});
|
|
816
|
+
}));
|
|
817
|
+
});
|
|
818
|
+
this.subscription.add(this.zone.onUnstable.subscribe(() => {
|
|
819
|
+
NgZone.assertInAngularZone();
|
|
820
|
+
task ??= this.pendingTasks.add();
|
|
821
|
+
}));
|
|
822
|
+
}
|
|
823
|
+
ngOnDestroy() {
|
|
824
|
+
this.subscription.unsubscribe();
|
|
825
|
+
}
|
|
826
|
+
static ɵfac = function ZoneStablePendingTask_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ZoneStablePendingTask)(); };
|
|
827
|
+
static ɵprov = /*@__PURE__*/ __defineInjectable({ token: ZoneStablePendingTask, factory: ZoneStablePendingTask.ɵfac, providedIn: 'root' });
|
|
828
|
+
}
|
|
829
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ZoneStablePendingTask, [{
|
|
830
|
+
type: Injectable,
|
|
831
|
+
args: [{ providedIn: 'root' }]
|
|
832
|
+
}], null, null); })();
|
|
833
|
+
|
|
678
834
|
// A delay in milliseconds before the scan is run after onLoad, to avoid any
|
|
679
835
|
// potential race conditions with other LCP-related functions. This delay
|
|
680
836
|
// happens outside of the main JavaScript execution and will only effect the timing
|
|
@@ -915,6 +1071,7 @@ function bootstrap(config) {
|
|
|
915
1071
|
console.warn(formatRuntimeError(408 /* RuntimeErrorCode.PROVIDED_BOTH_ZONE_AND_ZONELESS */, 'Both provideZoneChangeDetection and provideZonelessChangeDetection are provided. ' +
|
|
916
1072
|
'This is likely a mistake. Update the application providers to use only one of the two.'));
|
|
917
1073
|
}
|
|
1074
|
+
if (!envInjector.get(PROVIDED_ZONELESS) && !envInjector.get(PROVIDED_NG_ZONE)) ;
|
|
918
1075
|
}
|
|
919
1076
|
let onErrorSubscription;
|
|
920
1077
|
ngZone.runOutsideAngular(() => {
|
|
@@ -953,8 +1110,8 @@ function bootstrap(config) {
|
|
|
953
1110
|
// If the `LOCALE_ID` provider is defined at bootstrap then we set the value for ivy
|
|
954
1111
|
const localeId = envInjector.get(LOCALE_ID, DEFAULT_LOCALE_ID);
|
|
955
1112
|
setLocaleId(localeId || DEFAULT_LOCALE_ID);
|
|
956
|
-
const
|
|
957
|
-
if (!
|
|
1113
|
+
const enableRootComponentbootstrap = envInjector.get(ENABLE_ROOT_COMPONENT_BOOTSTRAP, true);
|
|
1114
|
+
if (!enableRootComponentbootstrap) {
|
|
958
1115
|
if (isApplicationBootstrapConfig(config)) {
|
|
959
1116
|
return envInjector.get(ApplicationRef);
|
|
960
1117
|
}
|
|
@@ -982,8 +1139,8 @@ function bootstrap(config) {
|
|
|
982
1139
|
});
|
|
983
1140
|
}
|
|
984
1141
|
/**
|
|
985
|
-
* Having a separate symbol for the module
|
|
986
|
-
* tree shake the module based
|
|
1142
|
+
* Having a separate symbol for the module bootstrap implementation allows us to
|
|
1143
|
+
* tree shake the module based bootstrap implementation in standalone apps.
|
|
987
1144
|
*/
|
|
988
1145
|
let moduleBootstrapImpl;
|
|
989
1146
|
/**
|
|
@@ -1027,6 +1184,12 @@ function _callAndReportToErrorHandler(errorHandler, ngZone, callback) {
|
|
|
1027
1184
|
}
|
|
1028
1185
|
}
|
|
1029
1186
|
|
|
1187
|
+
// Holds the set of providers to be used for the *next* application to be bootstrapped.
|
|
1188
|
+
// Used only for providing the zone related providers by default with `downgradeModule`.
|
|
1189
|
+
let _additionalApplicationProviders = undefined;
|
|
1190
|
+
function setZoneProvidersForNextBootstrap() {
|
|
1191
|
+
_additionalApplicationProviders = internalProvideZoneChangeDetection({});
|
|
1192
|
+
}
|
|
1030
1193
|
/**
|
|
1031
1194
|
* The Angular platform is the entry point for Angular on a web page.
|
|
1032
1195
|
* Each page has exactly one platform. Services (such as reflection) which are common
|
|
@@ -1052,21 +1215,14 @@ class PlatformRef {
|
|
|
1052
1215
|
* argument is deprecated. Use the `PlatformRef.bootstrapModule` API instead.
|
|
1053
1216
|
*/
|
|
1054
1217
|
bootstrapModuleFactory(moduleFactory, options) {
|
|
1055
|
-
const
|
|
1056
|
-
const ngZoneFactory = () => getNgZone(options?.ngZone, {
|
|
1057
|
-
...getNgZoneOptions({
|
|
1058
|
-
eventCoalescing: options?.ngZoneEventCoalescing,
|
|
1059
|
-
runCoalescing: options?.ngZoneRunCoalescing,
|
|
1060
|
-
}),
|
|
1061
|
-
scheduleInRootZone,
|
|
1062
|
-
});
|
|
1218
|
+
const defaultZoneCdProviders = [];
|
|
1063
1219
|
const allAppProviders = [
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
{ provide: ChangeDetectionScheduler, useExisting: ChangeDetectionSchedulerImpl },
|
|
1220
|
+
provideZonelessChangeDetectionInternal(),
|
|
1221
|
+
...defaultZoneCdProviders,
|
|
1222
|
+
...(_additionalApplicationProviders ?? []),
|
|
1068
1223
|
errorHandlerEnvironmentInitializer,
|
|
1069
1224
|
];
|
|
1225
|
+
_additionalApplicationProviders = undefined;
|
|
1070
1226
|
const moduleRef = createNgModuleRefWithProviders(moduleFactory.moduleType, this.injector, allAppProviders);
|
|
1071
1227
|
setModuleBootstrapImpl();
|
|
1072
1228
|
return bootstrap({
|
|
@@ -1141,11 +1297,6 @@ class PlatformRef {
|
|
|
1141
1297
|
}], () => [{ type: Injector }], null); })();
|
|
1142
1298
|
|
|
1143
1299
|
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
1300
|
/**
|
|
1150
1301
|
* Creates a platform.
|
|
1151
1302
|
* Platforms must be created on launch using this function.
|
|
@@ -1153,12 +1304,14 @@ const ALLOW_MULTIPLE_PLATFORMS = new InjectionToken(ngDevMode ? 'AllowMultipleTo
|
|
|
1153
1304
|
* @publicApi
|
|
1154
1305
|
*/
|
|
1155
1306
|
function createPlatform(injector) {
|
|
1156
|
-
if (
|
|
1307
|
+
if (getPlatform()) {
|
|
1157
1308
|
throw new RuntimeError(400 /* RuntimeErrorCode.MULTIPLE_PLATFORMS */, ngDevMode && 'There can be only one platform. Destroy the previous one to create a new one.');
|
|
1158
1309
|
}
|
|
1159
1310
|
publishDefaultGlobalUtils();
|
|
1160
1311
|
publishSignalConfiguration();
|
|
1161
|
-
|
|
1312
|
+
// During SSR, using this setting and using an injector from the global can cause the
|
|
1313
|
+
// injector to be used for a different requjest due to concurrency.
|
|
1314
|
+
_platformInjector = typeof ngServerMode === 'undefined' || !ngServerMode ? injector : null;
|
|
1162
1315
|
const platform = injector.get(PlatformRef);
|
|
1163
1316
|
runPlatformInitializers(injector);
|
|
1164
1317
|
return platform;
|
|
@@ -1179,20 +1332,17 @@ function createPlatformFactory(parentPlatformFactory, name, providers = []) {
|
|
|
1179
1332
|
const marker = new InjectionToken(desc);
|
|
1180
1333
|
return (extraProviders = []) => {
|
|
1181
1334
|
let platform = getPlatform();
|
|
1182
|
-
if (!platform
|
|
1335
|
+
if (!platform) {
|
|
1183
1336
|
const platformProviders = [
|
|
1184
1337
|
...providers,
|
|
1185
1338
|
...extraProviders,
|
|
1186
1339
|
{ provide: marker, useValue: true },
|
|
1187
1340
|
];
|
|
1188
|
-
|
|
1189
|
-
parentPlatformFactory(platformProviders)
|
|
1190
|
-
|
|
1191
|
-
else {
|
|
1192
|
-
createPlatform(createPlatformInjector(platformProviders, desc));
|
|
1193
|
-
}
|
|
1341
|
+
platform =
|
|
1342
|
+
parentPlatformFactory?.(platformProviders) ??
|
|
1343
|
+
createPlatform(createPlatformInjector(platformProviders, desc));
|
|
1194
1344
|
}
|
|
1195
|
-
return assertPlatform(marker);
|
|
1345
|
+
return typeof ngServerMode !== 'undefined' && ngServerMode ? platform : assertPlatform(marker);
|
|
1196
1346
|
};
|
|
1197
1347
|
}
|
|
1198
1348
|
/**
|
|
@@ -1226,17 +1376,23 @@ function assertPlatform(requiredToken) {
|
|
|
1226
1376
|
return platform;
|
|
1227
1377
|
}
|
|
1228
1378
|
/**
|
|
1229
|
-
* Returns the current platform.
|
|
1379
|
+
* Returns the current platform in the browser environment. In the server environment,
|
|
1380
|
+
* returns `null`. If you need access to the platform information, inject `PlatformRef` in your application.
|
|
1230
1381
|
*
|
|
1231
1382
|
* @publicApi
|
|
1232
1383
|
*/
|
|
1233
1384
|
function getPlatform() {
|
|
1385
|
+
if (typeof ngServerMode !== 'undefined' && ngServerMode) {
|
|
1386
|
+
return null;
|
|
1387
|
+
}
|
|
1234
1388
|
return _platformInjector?.get(PlatformRef) ?? null;
|
|
1235
1389
|
}
|
|
1236
1390
|
/**
|
|
1237
1391
|
* Destroys the current Angular platform and all Angular applications on the page.
|
|
1238
1392
|
* Destroys all modules and listeners registered with the platform.
|
|
1239
1393
|
*
|
|
1394
|
+
* This function should not be used in a server environment, as it will be a no-op.
|
|
1395
|
+
*
|
|
1240
1396
|
* @publicApi
|
|
1241
1397
|
*/
|
|
1242
1398
|
function destroyPlatform() {
|
|
@@ -1255,7 +1411,11 @@ function createOrReusePlatformInjector(providers = []) {
|
|
|
1255
1411
|
publishDefaultGlobalUtils();
|
|
1256
1412
|
// Otherwise, setup a new platform injector and run platform initializers.
|
|
1257
1413
|
const injector = createPlatformInjector(providers);
|
|
1258
|
-
|
|
1414
|
+
// During SSR, using this setting and using an injector from the global can cause the
|
|
1415
|
+
// injector to be used for a different request due to concurrency.
|
|
1416
|
+
if (typeof ngServerMode === 'undefined' || !ngServerMode) {
|
|
1417
|
+
_platformInjector = injector;
|
|
1418
|
+
}
|
|
1259
1419
|
publishSignalConfiguration();
|
|
1260
1420
|
runPlatformInitializers(injector);
|
|
1261
1421
|
return injector;
|
|
@@ -2618,6 +2778,7 @@ class ApplicationModule {
|
|
|
2618
2778
|
type: NgModule
|
|
2619
2779
|
}], () => [{ type: ApplicationRef }], null); })();
|
|
2620
2780
|
|
|
2781
|
+
const ZONELESS_BY_DEFAULT = true;
|
|
2621
2782
|
/**
|
|
2622
2783
|
* Internal create application API that implements the core application creation logic and optional
|
|
2623
2784
|
* bootstrap logic.
|
|
@@ -2630,18 +2791,23 @@ class ApplicationModule {
|
|
|
2630
2791
|
* @returns A promise that returns an `ApplicationRef` instance once resolved.
|
|
2631
2792
|
*/
|
|
2632
2793
|
function internalCreateApplication(config) {
|
|
2794
|
+
const { rootComponent, appProviders, platformProviders, platformRef } = config;
|
|
2633
2795
|
profiler(8 /* ProfilerEvent.BootstrapApplicationStart */);
|
|
2796
|
+
if (typeof ngServerMode !== 'undefined' && ngServerMode && !platformRef) {
|
|
2797
|
+
throw new RuntimeError(401 /* RuntimeErrorCode.PLATFORM_NOT_FOUND */, ngDevMode &&
|
|
2798
|
+
'Missing Platform: This may be due to using `bootstrapApplication` on the server without passing a `BootstrapContext`. ' +
|
|
2799
|
+
'Please make sure that `bootstrapApplication` is called with a `context` argument.');
|
|
2800
|
+
}
|
|
2634
2801
|
try {
|
|
2635
|
-
const
|
|
2802
|
+
const platformInjector = platformRef?.injector ?? createOrReusePlatformInjector(platformProviders);
|
|
2636
2803
|
if ((typeof ngDevMode === 'undefined' || ngDevMode) && rootComponent !== undefined) {
|
|
2637
2804
|
assertStandaloneComponentType(rootComponent);
|
|
2638
2805
|
}
|
|
2639
|
-
const platformInjector = createOrReusePlatformInjector(platformProviders);
|
|
2640
2806
|
// Create root application injector based on a set of providers configured at the platform
|
|
2641
2807
|
// bootstrap level as well as providers passed to the bootstrap call by a user.
|
|
2642
2808
|
const allAppProviders = [
|
|
2643
|
-
|
|
2644
|
-
|
|
2809
|
+
provideZonelessChangeDetectionInternal(),
|
|
2810
|
+
ZONELESS_BY_DEFAULT ? [] : internalProvideZoneChangeDetection({}),
|
|
2645
2811
|
errorHandlerEnvironmentInitializer,
|
|
2646
2812
|
...(appProviders || []),
|
|
2647
2813
|
];
|
|
@@ -4536,5 +4702,5 @@ const REQUEST_CONTEXT = new InjectionToken(typeof ngDevMode === 'undefined' || n
|
|
|
4536
4702
|
factory: () => null,
|
|
4537
4703
|
});
|
|
4538
4704
|
|
|
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,
|
|
4705
|
+
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, 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, provideZoneChangeDetection, 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, 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, ZONELESS_ENABLED as ɵZONELESS_ENABLED, 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, provideZonelessChangeDetectionInternal as ɵprovideZonelessChangeDetectionInternal, resolveComponentResources as ɵresolveComponentResources, setClassMetadata as ɵsetClassMetadata, setClassMetadataAsync as ɵsetClassMetadataAsync, setInjectorProfilerContext as ɵsetInjectorProfilerContext, setLocaleId as ɵsetLocaleId, setZoneProvidersForNextBootstrap as ɵsetZoneProvidersForNextBootstrap, 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
4706
|
//# sourceMappingURL=core.mjs.map
|