@angular/core 21.0.3 → 21.0.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/fesm2022/_attribute-chunk.mjs +1 -1
- package/fesm2022/_attribute-chunk.mjs.map +1 -1
- package/fesm2022/_debug_node-chunk.mjs +29 -22
- package/fesm2022/_debug_node-chunk.mjs.map +1 -1
- package/fesm2022/_effect-chunk.mjs +1 -1
- package/fesm2022/_effect-chunk.mjs.map +1 -1
- package/fesm2022/_linked_signal-chunk.mjs +1 -1
- package/fesm2022/_linked_signal-chunk.mjs.map +1 -1
- package/fesm2022/_not_found-chunk.mjs +1 -1
- package/fesm2022/_not_found-chunk.mjs.map +1 -1
- package/fesm2022/_resource-chunk.mjs +5 -2
- package/fesm2022/_resource-chunk.mjs.map +1 -1
- package/fesm2022/_untracked-chunk.mjs +40 -40
- 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 +4 -4
- 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 +1 -1
- package/fesm2022/primitives-signals.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +6 -6
- package/fesm2022/testing.mjs.map +1 -1
- package/package.json +2 -2
- 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 +1 -1
- 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 +9 -2
- package/types/_discovery-chunk.d.ts +11 -5
- package/types/_effect-chunk.d.ts +1 -1
- package/types/_event_dispatcher-chunk.d.ts +1 -1
- package/types/_formatter-chunk.d.ts +1 -1
- package/types/_weak_ref-chunk.d.ts +1 -1
- package/types/core.d.ts +37 -16
- package/types/primitives-di.d.ts +1 -1
- package/types/primitives-event-dispatch.d.ts +1 -1
- package/types/primitives-signals.d.ts +1 -1
- package/types/rxjs-interop.d.ts +1 -1
- package/types/testing.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/core",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.4",
|
|
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.
|
|
49
|
+
"@angular/compiler": "21.0.4",
|
|
50
50
|
"rxjs": "^6.5.3 || ^7.4.0",
|
|
51
51
|
"zone.js": "~0.15.0 || ~0.16.0"
|
|
52
52
|
},
|
package/types/_api-chunk.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.0.
|
|
2
|
+
* @license Angular v21.0.4
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -237,6 +237,13 @@ type Writable<T> = {
|
|
|
237
237
|
declare class InjectionToken<T> {
|
|
238
238
|
protected _desc: string;
|
|
239
239
|
readonly ɵprov: unknown;
|
|
240
|
+
/**
|
|
241
|
+
* @deprecated The `providedIn: NgModule` or `providedIn:'any'` options are deprecated. Please use the other signature.
|
|
242
|
+
*/
|
|
243
|
+
constructor(_desc: string, options: {
|
|
244
|
+
providedIn?: Type<any> | 'any';
|
|
245
|
+
factory: () => T;
|
|
246
|
+
});
|
|
240
247
|
/**
|
|
241
248
|
* @param _desc Description for the token,
|
|
242
249
|
* used only for debugging purposes,
|
|
@@ -843,7 +850,7 @@ declare global {
|
|
|
843
850
|
* Start listening to the Angular's internal performance-related events and route those to the Chrome DevTools performance panel.
|
|
844
851
|
* This enables Angular-specific data visualization when recording a performance profile directly in the Chrome DevTools.
|
|
845
852
|
*
|
|
846
|
-
*
|
|
853
|
+
* NOTE: Integration is enabled in the development mode only, this operation is noop in the production mode.
|
|
847
854
|
*
|
|
848
855
|
* @publicApi v21.0
|
|
849
856
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.0.
|
|
2
|
+
* @license Angular v21.0.4
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -5611,6 +5611,9 @@ interface HostListenerDecorator {
|
|
|
5611
5611
|
*
|
|
5612
5612
|
* @usageNotes
|
|
5613
5613
|
*
|
|
5614
|
+
* NOTE: **Always** prefer using the `host` property over `@HostListener`.
|
|
5615
|
+
* This decorator exist exclusively for backwards compatibility.
|
|
5616
|
+
*
|
|
5614
5617
|
* The following example declares a directive
|
|
5615
5618
|
* that attaches a click listener to a button and counts clicks.
|
|
5616
5619
|
*
|
|
@@ -5634,13 +5637,15 @@ interface HostListenerDecorator {
|
|
|
5634
5637
|
*
|
|
5635
5638
|
* The following example registers another DOM event handler that listens for `Enter` key-press
|
|
5636
5639
|
* events on the global `window`.
|
|
5637
|
-
* ```ts
|
|
5640
|
+
* ```angular-ts
|
|
5638
5641
|
* import { HostListener, Component } from "@angular/core";
|
|
5639
5642
|
*
|
|
5640
5643
|
* @Component({
|
|
5641
5644
|
* selector: 'app',
|
|
5642
|
-
* template:
|
|
5643
|
-
*
|
|
5645
|
+
* template: `
|
|
5646
|
+
* <h1>Hello, you have pressed enter {{counter}} number of times!</h1>
|
|
5647
|
+
* Press enter key to increment the counter.
|
|
5648
|
+
* <button (click)="resetCounter()">Reset Counter</button>`
|
|
5644
5649
|
* })
|
|
5645
5650
|
* class AppComponent {
|
|
5646
5651
|
* counter = 0;
|
|
@@ -5657,7 +5662,7 @@ interface HostListenerDecorator {
|
|
|
5657
5662
|
* can be found here:
|
|
5658
5663
|
* https://www.w3.org/TR/DOM-Level-3-Events-key/#named-key-attribute-values
|
|
5659
5664
|
*
|
|
5660
|
-
*
|
|
5665
|
+
* NOTE: that keys can also be combined, e.g. `@HostListener('keydown.shift.a')`.
|
|
5661
5666
|
*
|
|
5662
5667
|
* The global target names that can be used to prefix an event name are
|
|
5663
5668
|
* `document:`, `window:` and `body:`.
|
|
@@ -7410,6 +7415,7 @@ declare class Navigation extends EventTarget {
|
|
|
7410
7415
|
declare class NavigationTransition {
|
|
7411
7416
|
readonly navigationType: NavigationTypeString;
|
|
7412
7417
|
readonly from: NavigationHistoryEntry;
|
|
7418
|
+
readonly to: NavigationDestination;
|
|
7413
7419
|
readonly finished: Promise<void>;
|
|
7414
7420
|
readonly committed: Promise<void>;
|
|
7415
7421
|
}
|
package/types/_effect-chunk.d.ts
CHANGED
package/types/core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.0.
|
|
2
|
+
* @license Angular v21.0.4
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -1696,7 +1696,7 @@ interface ForwardRefFn {
|
|
|
1696
1696
|
* @Component({
|
|
1697
1697
|
* imports: [ChildComponent],
|
|
1698
1698
|
* selector: 'app-parent',
|
|
1699
|
-
* template: `<app-child [hideParent]="hideParent()"
|
|
1699
|
+
* template: `<app-child [hideParent]="hideParent()"/>`,
|
|
1700
1700
|
* })
|
|
1701
1701
|
* export class ParentComponent {
|
|
1702
1702
|
* hideParent = input.required<boolean>();
|
|
@@ -1707,7 +1707,7 @@ interface ForwardRefFn {
|
|
|
1707
1707
|
* imports: [forwardRef(() => ParentComponent)],
|
|
1708
1708
|
* selector: 'app-child',
|
|
1709
1709
|
* template: `
|
|
1710
|
-
* @if(!hideParent() {
|
|
1710
|
+
* @if(!hideParent()) {
|
|
1711
1711
|
* <app-parent/>
|
|
1712
1712
|
* }
|
|
1713
1713
|
* `,
|
|
@@ -1768,8 +1768,14 @@ interface InjectableDecorator {
|
|
|
1768
1768
|
*
|
|
1769
1769
|
*/
|
|
1770
1770
|
(): TypeDecorator;
|
|
1771
|
+
/**
|
|
1772
|
+
* @deprecated The `providedIn: NgModule` or `providedIn:'any'` options are deprecated. Please use the other signatures.
|
|
1773
|
+
*/
|
|
1771
1774
|
(options?: {
|
|
1772
|
-
providedIn: Type$1<any> | '
|
|
1775
|
+
providedIn: Type$1<any> | 'any';
|
|
1776
|
+
} & InjectableProvider): TypeDecorator;
|
|
1777
|
+
(options?: {
|
|
1778
|
+
providedIn: 'root' | 'platform' | null;
|
|
1773
1779
|
} & InjectableProvider): TypeDecorator;
|
|
1774
1780
|
new (): Injectable;
|
|
1775
1781
|
new (options?: {
|
|
@@ -1972,6 +1978,9 @@ declare const INJECTOR: InjectionToken<Injector>;
|
|
|
1972
1978
|
* }
|
|
1973
1979
|
* ```
|
|
1974
1980
|
* @publicApi
|
|
1981
|
+
*
|
|
1982
|
+
* @see [Inject the host element's tag name](guide/di/di-in-action#inject-the-host-elements-tag-name)
|
|
1983
|
+
*
|
|
1975
1984
|
*/
|
|
1976
1985
|
declare const HOST_TAG_NAME: InjectionToken<string>;
|
|
1977
1986
|
|
|
@@ -2316,12 +2325,12 @@ interface AfterRenderOptions {
|
|
|
2316
2325
|
* template: `<span #content>{{ ... }}</span>`,
|
|
2317
2326
|
* })
|
|
2318
2327
|
* export class MyComponent {
|
|
2319
|
-
*
|
|
2328
|
+
* contentRef = viewChild.required<ElementRef>('content');
|
|
2320
2329
|
*
|
|
2321
2330
|
* constructor() {
|
|
2322
2331
|
* afterEveryRender({
|
|
2323
2332
|
* read: () => {
|
|
2324
|
-
* console.log('content height: ' + this.contentRef.nativeElement.scrollHeight);
|
|
2333
|
+
* console.log('content height: ' + this.contentRef().nativeElement.scrollHeight);
|
|
2325
2334
|
* }
|
|
2326
2335
|
* });
|
|
2327
2336
|
* }
|
|
@@ -2376,12 +2385,12 @@ declare function afterEveryRender<E = never, W = never, M = never>(spec: {
|
|
|
2376
2385
|
* template: `<span #content>{{ ... }}</span>`,
|
|
2377
2386
|
* })
|
|
2378
2387
|
* export class MyComponent {
|
|
2379
|
-
*
|
|
2388
|
+
* contentRef = viewChild.required<ElementRef>('content');
|
|
2380
2389
|
*
|
|
2381
2390
|
* constructor() {
|
|
2382
2391
|
* afterEveryRender({
|
|
2383
2392
|
* read: () => {
|
|
2384
|
-
* console.log('content height: ' + this.contentRef.nativeElement.scrollHeight);
|
|
2393
|
+
* console.log('content height: ' + this.contentRef().nativeElement.scrollHeight);
|
|
2385
2394
|
* }
|
|
2386
2395
|
* });
|
|
2387
2396
|
* }
|
|
@@ -2455,13 +2464,13 @@ declare function afterEveryRender(callback: VoidFunction, options?: AfterRenderO
|
|
|
2455
2464
|
* template: `<div #chart>{{ ... }}</div>`,
|
|
2456
2465
|
* })
|
|
2457
2466
|
* export class MyChartCmp {
|
|
2458
|
-
*
|
|
2467
|
+
* chartRef = viewChild.required<ElementRef>('chart');
|
|
2459
2468
|
* chart: MyChart|null;
|
|
2460
2469
|
*
|
|
2461
2470
|
* constructor() {
|
|
2462
2471
|
* afterNextRender({
|
|
2463
2472
|
* write: () => {
|
|
2464
|
-
* this.chart = new MyChart(this.chartRef.nativeElement);
|
|
2473
|
+
* this.chart = new MyChart(this.chartRef().nativeElement);
|
|
2465
2474
|
* }
|
|
2466
2475
|
* });
|
|
2467
2476
|
* }
|
|
@@ -2515,13 +2524,13 @@ declare function afterNextRender<E = never, W = never, M = never>(spec: {
|
|
|
2515
2524
|
* template: `<div #chart>{{ ... }}</div>`,
|
|
2516
2525
|
* })
|
|
2517
2526
|
* export class MyChartCmp {
|
|
2518
|
-
*
|
|
2527
|
+
* chartRef = viewChild.required<ElementRef>('chart');
|
|
2519
2528
|
* chart: MyChart|null;
|
|
2520
2529
|
*
|
|
2521
2530
|
* constructor() {
|
|
2522
2531
|
* afterNextRender({
|
|
2523
2532
|
* write: () => {
|
|
2524
|
-
* this.chart = new MyChart(this.chartRef.nativeElement);
|
|
2533
|
+
* this.chart = new MyChart(this.chartRef().nativeElement);
|
|
2525
2534
|
* }
|
|
2526
2535
|
* });
|
|
2527
2536
|
* }
|
|
@@ -7335,7 +7344,7 @@ declare function ɵɵproperty<T>(propName: string, value: T, sanitizer?: Sanitiz
|
|
|
7335
7344
|
*
|
|
7336
7345
|
* @codeGenApi
|
|
7337
7346
|
*/
|
|
7338
|
-
declare function ɵɵcontentQuery<T>(directiveIndex: number, predicate: ProviderToken<unknown> | string | string[], flags: QueryFlags, read?: any):
|
|
7347
|
+
declare function ɵɵcontentQuery<T>(directiveIndex: number, predicate: ProviderToken<unknown> | string | string[], flags: QueryFlags, read?: any): typeof ɵɵcontentQuery;
|
|
7339
7348
|
/**
|
|
7340
7349
|
* Creates a new view query by initializing internal data structures.
|
|
7341
7350
|
*
|
|
@@ -7345,7 +7354,7 @@ declare function ɵɵcontentQuery<T>(directiveIndex: number, predicate: Provider
|
|
|
7345
7354
|
*
|
|
7346
7355
|
* @codeGenApi
|
|
7347
7356
|
*/
|
|
7348
|
-
declare function ɵɵviewQuery<T>(predicate: ProviderToken<unknown> | string | string[], flags: QueryFlags, read?: any):
|
|
7357
|
+
declare function ɵɵviewQuery<T>(predicate: ProviderToken<unknown> | string | string[], flags: QueryFlags, read?: any): typeof ɵɵviewQuery;
|
|
7349
7358
|
/**
|
|
7350
7359
|
* Refreshes a query by combining matches from all active views and removing matches from deleted
|
|
7351
7360
|
* views.
|
|
@@ -7374,7 +7383,7 @@ declare function ɵɵloadQuery<T>(): QueryList<T>;
|
|
|
7374
7383
|
*
|
|
7375
7384
|
* @codeGenApi
|
|
7376
7385
|
*/
|
|
7377
|
-
declare function ɵɵcontentQuerySignal<T>(directiveIndex: number, target: Signal<T>, predicate: ProviderToken<unknown> | string[], flags: QueryFlags, read?: any):
|
|
7386
|
+
declare function ɵɵcontentQuerySignal<T>(directiveIndex: number, target: Signal<T>, predicate: ProviderToken<unknown> | string[], flags: QueryFlags, read?: any): typeof ɵɵcontentQuerySignal;
|
|
7378
7387
|
/**
|
|
7379
7388
|
* Creates a new view query by initializing internal data structures and binding a new query to the
|
|
7380
7389
|
* target signal.
|
|
@@ -7386,7 +7395,7 @@ declare function ɵɵcontentQuerySignal<T>(directiveIndex: number, target: Signa
|
|
|
7386
7395
|
*
|
|
7387
7396
|
* @codeGenApi
|
|
7388
7397
|
*/
|
|
7389
|
-
declare function ɵɵviewQuerySignal(target: Signal<unknown>, predicate: ProviderToken<unknown> | string[], flags: QueryFlags, read?: ProviderToken<unknown>):
|
|
7398
|
+
declare function ɵɵviewQuerySignal(target: Signal<unknown>, predicate: ProviderToken<unknown> | string[], flags: QueryFlags, read?: ProviderToken<unknown>): typeof ɵɵviewQuerySignal;
|
|
7390
7399
|
/**
|
|
7391
7400
|
* Advances the current query index by a specified offset.
|
|
7392
7401
|
*
|
|
@@ -8421,6 +8430,18 @@ interface ɵFieldState<T> {
|
|
|
8421
8430
|
* A signal indicating whether the field has been touched by the user.
|
|
8422
8431
|
*/
|
|
8423
8432
|
readonly touched: Signal<boolean>;
|
|
8433
|
+
/**
|
|
8434
|
+
* A signal indicating whether the field value has been changed by user.
|
|
8435
|
+
*/
|
|
8436
|
+
readonly dirty: Signal<boolean>;
|
|
8437
|
+
/**
|
|
8438
|
+
* A signal indicating whether the field is hidden.
|
|
8439
|
+
*/
|
|
8440
|
+
readonly hidden: Signal<boolean>;
|
|
8441
|
+
/**
|
|
8442
|
+
* A signal indicating whether there are any validators still pending for this field.
|
|
8443
|
+
*/
|
|
8444
|
+
readonly pending: Signal<boolean>;
|
|
8424
8445
|
/**
|
|
8425
8446
|
* A writable signal containing the value for this field.
|
|
8426
8447
|
*
|
package/types/primitives-di.d.ts
CHANGED
package/types/rxjs-interop.d.ts
CHANGED
package/types/testing.d.ts
CHANGED