@angular/core 21.0.0-rc.0 → 21.0.0-rc.2
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/README.md +1 -2
- package/fesm2022/_attribute-chunk.mjs +1 -1
- package/fesm2022/_attribute-chunk.mjs.map +1 -1
- package/fesm2022/_debug_node-chunk.mjs +388 -270
- package/fesm2022/_debug_node-chunk.mjs.map +1 -1
- package/fesm2022/_effect-chunk.mjs +11 -2
- package/fesm2022/_effect-chunk.mjs.map +1 -1
- package/fesm2022/_linked_signal-chunk.mjs +87 -0
- package/fesm2022/_linked_signal-chunk.mjs.map +1 -0
- package/fesm2022/_not_found-chunk.mjs +1 -1
- package/fesm2022/_not_found-chunk.mjs.map +1 -1
- package/fesm2022/_resource-chunk.mjs +4 -8
- package/fesm2022/_resource-chunk.mjs.map +1 -1
- package/fesm2022/_untracked-chunk.mjs +2922 -74
- package/fesm2022/_untracked-chunk.mjs.map +1 -1
- package/fesm2022/_weak_ref-chunk.mjs +1 -1
- package/fesm2022/_weak_ref-chunk.mjs.map +1 -1
- package/fesm2022/core.mjs +8 -8
- package/fesm2022/core.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 +5 -5
- package/fesm2022/primitives-signals.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +4 -4
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +24 -36
- package/fesm2022/testing.mjs.map +1 -1
- package/package.json +2 -2
- package/resources/best-practices.md +1 -1
- package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +1 -1
- package/schematics/bundles/application-config-core.cjs +1 -1
- package/schematics/bundles/apply_import_manager-1Zs_gpB6.cjs +1 -1
- package/schematics/bundles/bootstrap-options-migration.cjs +1 -1
- package/schematics/bundles/cleanup-unused-imports.cjs +1 -1
- package/schematics/bundles/common-to-standalone-migration.cjs +1 -1
- package/schematics/bundles/compiler_host-DBwYMlTo.cjs +1 -1
- package/schematics/bundles/control-flow-migration.cjs +2 -2
- package/schematics/bundles/imports-DP72APSx.cjs +1 -1
- package/schematics/bundles/index-B7I9sIUx.cjs +1 -1
- package/schematics/bundles/inject-migration.cjs +1 -1
- package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
- package/schematics/bundles/migrate_ts_type_references-UGIUl7En.cjs +1 -1
- package/schematics/bundles/ng_component_template-Dsuq1Lw7.cjs +1 -1
- package/schematics/bundles/ng_decorators-DSFlWYQY.cjs +1 -1
- package/schematics/bundles/ngclass-to-class-migration.cjs +1 -1
- package/schematics/bundles/ngstyle-to-style-migration.cjs +1 -1
- package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
- package/schematics/bundles/output-migration.cjs +1 -1
- package/schematics/bundles/parse_html-8VLCL37B.cjs +1 -1
- package/schematics/bundles/project_paths-DvD50ouC.cjs +1 -1
- package/schematics/bundles/project_tsconfig_paths-CDVxT6Ov.cjs +1 -1
- package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
- package/schematics/bundles/route-lazy-loading.cjs +1 -1
- package/schematics/bundles/router-current-navigation.cjs +1 -1
- package/schematics/bundles/router-last-successful-navigation.cjs +1 -1
- package/schematics/bundles/router-testing-module-migration.cjs +1 -1
- package/schematics/bundles/self-closing-tags-migration.cjs +1 -1
- package/schematics/bundles/signal-input-migration.cjs +1 -1
- package/schematics/bundles/signal-queries-migration.cjs +1 -1
- package/schematics/bundles/signals.cjs +1 -1
- package/schematics/bundles/standalone-migration.cjs +1 -1
- package/schematics/bundles/symbol-BObKoqes.cjs +1 -1
- package/types/_api-chunk.d.ts +1 -1
- package/types/_chrome_dev_tools_performance-chunk.d.ts +34 -28
- package/types/_discovery-chunk.d.ts +23 -8
- package/types/_effect-chunk.d.ts +1 -1
- package/types/_event_dispatcher-chunk.d.ts +1 -1
- package/types/_formatter-chunk.d.ts +2 -2
- package/types/_weak_ref-chunk.d.ts +1 -1
- package/types/core.d.ts +56 -55
- package/types/primitives-di.d.ts +1 -1
- package/types/primitives-event-dispatch.d.ts +1 -1
- package/types/primitives-signals.d.ts +6 -5
- package/types/rxjs-interop.d.ts +1 -1
- package/types/testing.d.ts +2 -2
- package/fesm2022/_effect-chunk2.mjs +0 -2951
- package/fesm2022/_effect-chunk2.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/core",
|
|
3
|
-
"version": "21.0.0-rc.
|
|
3
|
+
"version": "21.0.0-rc.2",
|
|
4
4
|
"description": "Angular - the core framework",
|
|
5
5
|
"author": "angular",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"tslib": "^2.3.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@angular/compiler": "21.0.0-rc.
|
|
49
|
+
"@angular/compiler": "21.0.0-rc.2",
|
|
50
50
|
"rxjs": "^6.5.3 || ^7.4.0",
|
|
51
51
|
"zone.js": "~0.15.0"
|
|
52
52
|
},
|
|
@@ -45,7 +45,7 @@ You are an expert in TypeScript, Angular, and scalable web application developme
|
|
|
45
45
|
- Keep templates simple and avoid complex logic
|
|
46
46
|
- Use native control flow (`@if`, `@for`, `@switch`) instead of `*ngIf`, `*ngFor`, `*ngSwitch`
|
|
47
47
|
- Use the async pipe to handle observables
|
|
48
|
-
- Do not assume globals like (`new Date()`) are available.
|
|
48
|
+
- Do not assume globals like (`new Date()`) are available.
|
|
49
49
|
- Do not write arrow functions in templates (they are not supported).
|
|
50
50
|
- Do not write Regular expressions in templates (they are not supported).
|
|
51
51
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v21.0.0-rc.
|
|
3
|
+
* @license Angular v21.0.0-rc.2
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -783,7 +783,7 @@ function analyzeTemplateUsage(nodes, templateName) {
|
|
|
783
783
|
if (node.attrs) {
|
|
784
784
|
for (const attr of node.attrs) {
|
|
785
785
|
if ((attr.name === '*ngTemplateOutlet' || attr.name === '[ngTemplateOutlet]') &&
|
|
786
|
-
attr.value?.split(';')[0] === templateName) {
|
|
786
|
+
attr.value?.split(';')[0]?.trim() === templateName) {
|
|
787
787
|
isReferencedInTemplateOutlet = true;
|
|
788
788
|
}
|
|
789
789
|
if (attr.name.trim() === templateNameWithHash) {
|
package/types/_api-chunk.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.0.0-rc.
|
|
2
|
+
* @license Angular v21.0.0-rc.2
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -7,32 +7,6 @@
|
|
|
7
7
|
import { SIGNAL } from './_formatter-chunk.js';
|
|
8
8
|
import { EventContract } from './_event_dispatcher-chunk.js';
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* A reactive value which notifies consumers of any changes.
|
|
12
|
-
*
|
|
13
|
-
* Signals are functions which returns their current value. To access the current value of a signal,
|
|
14
|
-
* call it.
|
|
15
|
-
*
|
|
16
|
-
* Ordinary values can be turned into `Signal`s with the `signal` function.
|
|
17
|
-
*
|
|
18
|
-
* @publicApi 17.0
|
|
19
|
-
*/
|
|
20
|
-
type Signal<T> = (() => T) & {
|
|
21
|
-
[SIGNAL]: unknown;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Checks if the given `value` is a reactive `Signal`.
|
|
25
|
-
*
|
|
26
|
-
* @publicApi 17.0
|
|
27
|
-
*/
|
|
28
|
-
declare function isSignal(value: unknown): value is Signal<unknown>;
|
|
29
|
-
/**
|
|
30
|
-
* A comparison function which can determine if two values are equal.
|
|
31
|
-
*
|
|
32
|
-
* @publicApi 17.0
|
|
33
|
-
*/
|
|
34
|
-
type ValueEqualityFn<T> = (a: T, b: T) => boolean;
|
|
35
|
-
|
|
36
10
|
/** Symbol used distinguish `WritableSignal` from other non-writable signals and functions. */
|
|
37
11
|
declare const ɵWRITABLE_SIGNAL: unique symbol;
|
|
38
12
|
/**
|
|
@@ -83,6 +57,38 @@ interface CreateSignalOptions<T> {
|
|
|
83
57
|
*/
|
|
84
58
|
declare function signal<T>(initialValue: T, options?: CreateSignalOptions<T>): WritableSignal<T>;
|
|
85
59
|
|
|
60
|
+
/**
|
|
61
|
+
* A reactive value which notifies consumers of any changes.
|
|
62
|
+
*
|
|
63
|
+
* Signals are functions which returns their current value. To access the current value of a signal,
|
|
64
|
+
* call it.
|
|
65
|
+
*
|
|
66
|
+
* Ordinary values can be turned into `Signal`s with the `signal` function.
|
|
67
|
+
*
|
|
68
|
+
* @publicApi 17.0
|
|
69
|
+
*/
|
|
70
|
+
type Signal<T> = (() => T) & {
|
|
71
|
+
[SIGNAL]: unknown;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Checks if the given `value` is a reactive `Signal`.
|
|
75
|
+
*
|
|
76
|
+
* @publicApi 17.0
|
|
77
|
+
*/
|
|
78
|
+
declare function isSignal(value: unknown): value is Signal<unknown>;
|
|
79
|
+
/**
|
|
80
|
+
* A comparison function which can determine if two values are equal.
|
|
81
|
+
*
|
|
82
|
+
* @publicApi 17.0
|
|
83
|
+
*/
|
|
84
|
+
type ValueEqualityFn<T> = (a: T, b: T) => boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Checks if the given `value` is a writeable signal.
|
|
87
|
+
*
|
|
88
|
+
* @publicApi 21.1
|
|
89
|
+
*/
|
|
90
|
+
declare function isWritableSignal(value: unknown): value is WritableSignal<unknown>;
|
|
91
|
+
|
|
86
92
|
/**
|
|
87
93
|
* Function that can be used to manually clean up a
|
|
88
94
|
* programmatic {@link OutputRef#subscribe} subscription.
|
|
@@ -828,5 +834,5 @@ declare global {
|
|
|
828
834
|
*/
|
|
829
835
|
declare function enableProfiling(): () => void;
|
|
830
836
|
|
|
831
|
-
export { DestroyRef, InjectionToken, Injector, InternalInjectFlags, JSACTION_EVENT_CONTRACT, Type, enableProfiling, isEnvironmentProviders, isSignal, signal, ɵunwrapWritableSignal };
|
|
837
|
+
export { DestroyRef, InjectionToken, Injector, InternalInjectFlags, JSACTION_EVENT_CONTRACT, Type, enableProfiling, isEnvironmentProviders, isSignal, isWritableSignal, signal, ɵunwrapWritableSignal };
|
|
832
838
|
export type { AbstractType, ClassProvider, ClassSansProvider, ConstructorProvider, ConstructorSansProvider, CreateSignalOptions, DestroyableInjector, EnvironmentProviders, EventCallback, ExistingProvider, ExistingSansProvider, FactoryProvider, FactorySansProvider, InjectOptions, InternalEnvironmentProviders, ModuleWithProviders, OutputRef, OutputRefSubscription, ProcessProvidersFunction, Provider, ProviderToken, Signal, StaticClassProvider, StaticClassSansProvider, StaticProvider, TypeProvider, ValueEqualityFn, ValueProvider, ValueSansProvider, Writable, WritableSignal };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.0.0-rc.
|
|
2
|
+
* @license Angular v21.0.0-rc.2
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -67,16 +67,29 @@ declare const MAX_ANIMATION_TIMEOUT: InjectionToken<number>;
|
|
|
67
67
|
* @publicApi 20.2
|
|
68
68
|
*/
|
|
69
69
|
type AnimationFunction = (event: AnimationCallbackEvent) => void;
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
type RunEnterAnimationFn = VoidFunction;
|
|
71
|
+
type RunLeaveAnimationFn = () => {
|
|
72
|
+
promise: Promise<void>;
|
|
73
|
+
resolve: VoidFunction;
|
|
74
|
+
};
|
|
75
|
+
interface EnterNodeAnimations {
|
|
76
|
+
animateFns: RunEnterAnimationFn[];
|
|
77
|
+
resolvers?: VoidFunction[];
|
|
78
|
+
}
|
|
79
|
+
interface LeaveNodeAnimations {
|
|
80
|
+
animateFns: RunLeaveAnimationFn[];
|
|
72
81
|
resolvers?: VoidFunction[];
|
|
73
82
|
}
|
|
74
83
|
interface AnimationLViewData {
|
|
75
|
-
enter?: Map<number,
|
|
76
|
-
leave?: Map<number,
|
|
84
|
+
enter?: Map<number, EnterNodeAnimations>;
|
|
85
|
+
leave?: Map<number, LeaveNodeAnimations>;
|
|
77
86
|
running?: Promise<unknown>;
|
|
78
|
-
|
|
87
|
+
detachedLeaveAnimationFns?: VoidFunction[];
|
|
79
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* Function that returns the class or class list binded to the animate instruction
|
|
91
|
+
*/
|
|
92
|
+
type AnimationClassBindingFn = () => string | string[];
|
|
80
93
|
|
|
81
94
|
declare const enum NotificationSource {
|
|
82
95
|
MarkAncestorsForTraversal = 0,
|
|
@@ -2253,8 +2266,10 @@ declare enum ViewEncapsulation {
|
|
|
2253
2266
|
* Similar to `ShadowDom`, but prevents any external styles from leaking into the
|
|
2254
2267
|
* component's ShadowRoot. This is useful when you want to ensure that the component's
|
|
2255
2268
|
* styles are completely isolated from the rest of the application, including global styles.
|
|
2269
|
+
*
|
|
2270
|
+
* @experimental 21.0
|
|
2256
2271
|
*/
|
|
2257
|
-
|
|
2272
|
+
ExperimentalIsolatedShadowDom = 4
|
|
2258
2273
|
}
|
|
2259
2274
|
|
|
2260
2275
|
/**
|
|
@@ -7442,4 +7457,4 @@ interface DeferBlockDetails extends DehydratedDeferBlock {
|
|
|
7442
7457
|
declare function getDeferBlocks(lView: LView, deferBlocks: DeferBlockDetails[]): void;
|
|
7443
7458
|
|
|
7444
7459
|
export { ANIMATIONS_DISABLED, APP_BOOTSTRAP_LISTENER, AfterRenderManager, AnimationRendererType, ApplicationRef, AttributeMarker, COMPILER_OPTIONS, CONTAINER_HEADER_OFFSET, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionScheduler, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory, ComponentFactoryResolver, ComponentRef, DebugElement, DebugEventListener, DebugNode, DeferBlockBehavior, DeferBlockState, Directive, EffectScheduler, ElementRef, EmbeddedViewRef, EnvironmentInjector, EventEmitter, HostBinding, HostListener, INJECTOR_SCOPE, Input, InputFlags, MAX_ANIMATION_TIMEOUT, ModuleWithComponentFactories, NG_INJ_DEF, NG_PROV_DEF, NO_ERRORS_SCHEMA, NavigateEvent, Navigation, NavigationCurrentEntryChangeEvent, NavigationDestination, NavigationHistoryEntry, NavigationTransition, NgModule, NgModuleFactory, NgModuleRef, NgZone, NoopNgZone, NotificationSource, Output, PROVIDED_ZONELESS, Pipe, PlatformRef, QueryFlags, QueryList, R3Injector, RenderFlags, Renderer2, RendererFactory2, RendererStyleFlags2, Sanitizer, SecurityContext, TDeferDetailsFlags, TracingAction, TracingService, ViewEncapsulation, ViewRef, ZONELESS_ENABLED, asNativeElements, effect, getDebugNode, getDeferBlocks, getInjectableDef, injectChangeDetectorRef, inputBinding, isBoundToModule, isInjectable, outputBinding, twoWayBinding, ɵɵdefineInjectable, ɵɵdefineInjector };
|
|
7445
|
-
export type { AfterRenderRef, AnimationCallbackEvent, AnimationFunction, Binding, BootstrapOptions, ClassDebugInfo, CompilerOptions, ComponentDecorator, ComponentDef, ComponentDefFeature, ComponentTemplate, ComponentType, ContentQueriesFunction, CreateEffectOptions, CssSelectorList, DeferBlockConfig, DeferBlockDependencyInterceptor, DeferBlockDetails, DehydratedDeferBlock, DependencyResolverFn, DependencyTypeList, DirectiveDecorator, DirectiveDef, DirectiveDefFeature, DirectiveType, DirectiveWithBindings, EffectCleanupFn, EffectCleanupRegisterFn, EffectRef, GlobalTargetResolver, HostBindingDecorator, HostBindingsFunction, HostDirectiveConfig, HostListenerDecorator, InjectableType, InjectorType, InputDecorator, InputSignalNode, InputTransformFunction, InternalNgModuleRef, LContainer, LView, ListenerOptions, LocalRefExtractor, NavigationInterceptOptions, NavigationNavigateOptions, NavigationOptions, NavigationReloadOptions, NavigationResult, NavigationTypeString, NavigationUpdateCurrentEntryOptions, NgModuleDecorator, NgModuleScopeInfoFromDecorator, OpaqueViewState, OutputDecorator, PipeDecorator, PipeDef, PipeType, Predicate, ProjectionSlots, RElement, RNode, RawScopeInfoFromDecorator, RendererType2, SanitizerFn, SchemaMetadata, TAttributes, TConstantsOrFactory, TDeferBlockDetails, TNode, TView, TracingSnapshot, TrustedHTML, TrustedScript, TrustedScriptURL, TypeDecorator, TypeOrFactory, ViewQueriesFunction, ɵɵComponentDeclaration, ɵɵDirectiveDeclaration, ɵɵFactoryDeclaration, ɵɵInjectableDeclaration, ɵɵInjectorDeclaration, ɵɵInjectorDef, ɵɵNgModuleDeclaration, ɵɵPipeDeclaration };
|
|
7460
|
+
export type { AfterRenderRef, AnimationCallbackEvent, AnimationClassBindingFn, AnimationFunction, Binding, BootstrapOptions, ClassDebugInfo, CompilerOptions, ComponentDecorator, ComponentDef, ComponentDefFeature, ComponentTemplate, ComponentType, ContentQueriesFunction, CreateEffectOptions, CssSelectorList, DeferBlockConfig, DeferBlockDependencyInterceptor, DeferBlockDetails, DehydratedDeferBlock, DependencyResolverFn, DependencyTypeList, DirectiveDecorator, DirectiveDef, DirectiveDefFeature, DirectiveType, DirectiveWithBindings, EffectCleanupFn, EffectCleanupRegisterFn, EffectRef, GlobalTargetResolver, HostBindingDecorator, HostBindingsFunction, HostDirectiveConfig, HostListenerDecorator, InjectableType, InjectorType, InputDecorator, InputSignalNode, InputTransformFunction, InternalNgModuleRef, LContainer, LView, ListenerOptions, LocalRefExtractor, NavigationInterceptOptions, NavigationNavigateOptions, NavigationOptions, NavigationReloadOptions, NavigationResult, NavigationTypeString, NavigationUpdateCurrentEntryOptions, NgModuleDecorator, NgModuleScopeInfoFromDecorator, OpaqueViewState, OutputDecorator, PipeDecorator, PipeDef, PipeType, Predicate, ProjectionSlots, RElement, RNode, RawScopeInfoFromDecorator, RendererType2, SanitizerFn, SchemaMetadata, TAttributes, TConstantsOrFactory, TDeferBlockDetails, TNode, TView, TracingSnapshot, TrustedHTML, TrustedScript, TrustedScriptURL, TypeDecorator, TypeOrFactory, ViewQueriesFunction, ɵɵComponentDeclaration, ɵɵDirectiveDeclaration, ɵɵFactoryDeclaration, ɵɵInjectableDeclaration, ɵɵInjectorDeclaration, ɵɵInjectorDef, ɵɵNgModuleDeclaration, ɵɵPipeDeclaration };
|
package/types/_effect-chunk.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.0.0-rc.
|
|
2
|
+
* @license Angular v21.0.0-rc.2
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -212,4 +212,4 @@ declare global {
|
|
|
212
212
|
declare function installDevToolsSignalFormatter(): void;
|
|
213
213
|
|
|
214
214
|
export { REACTIVE_NODE, SIGNAL, consumerAfterComputation, consumerBeforeComputation, consumerDestroy, consumerMarkDirty, consumerPollProducersForChange, defaultEquals, finalizeConsumerAfterComputation, getActiveConsumer, installDevToolsSignalFormatter, isInNotificationPhase, isReactive, producerAccessed, producerIncrementEpoch, producerMarkClean, producerNotifyConsumers, producerUpdateValueVersion, producerUpdatesAllowed, resetConsumerBeforeComputation, runPostProducerCreatedFn, setActiveConsumer, setPostProducerCreatedFn };
|
|
215
|
-
export type { Reactive, ReactiveHookFn, ReactiveNode, ReactiveNodeKind, ValueEqualityFn };
|
|
215
|
+
export type { Reactive, ReactiveHookFn, ReactiveNode, ReactiveNodeKind, ValueEqualityFn, Version };
|