@angular/core 19.0.1 → 19.0.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/fesm2022/core.mjs +289 -300
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +8 -8
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +150 -139
- package/package.json +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/{checker-3cbc9cc1.js → checker-c58f97d2.js} +49 -50
- package/schematics/bundles/{combine_units-c36a3065.js → combine_units-605024c1.js} +3 -3
- package/schematics/bundles/{compiler_host-087c5caa.js → compiler_host-f5d588fe.js} +2 -2
- package/schematics/bundles/control-flow-migration.js +3 -3
- package/schematics/bundles/explicit-standalone-flag.js +5 -5
- package/schematics/bundles/{imports-4ac08251.js → imports-31a38653.js} +2 -2
- package/schematics/bundles/inject-migration.js +64 -43
- package/schematics/bundles/{leading_space-d190b83b.js → leading_space-6e7a8ec6.js} +1 -1
- package/schematics/bundles/{migrate_ts_type_references-bb0c286a.js → migrate_ts_type_references-596627c6.js} +9 -9
- package/schematics/bundles/{nodes-0e7d45ca.js → nodes-88c2157f.js} +2 -2
- package/schematics/bundles/output-migration.js +5 -5
- package/schematics/bundles/pending-tasks.js +5 -5
- package/schematics/bundles/{program-561595c4.js → program-fe7d9b66.js} +54 -30
- package/schematics/bundles/{project_tsconfig_paths-e9ccccbf.js → project_tsconfig_paths-6c9cde78.js} +1 -1
- package/schematics/bundles/provide-initializer.js +5 -5
- package/schematics/bundles/route-lazy-loading.js +4 -4
- package/schematics/bundles/signal-input-migration.js +8 -8
- package/schematics/bundles/signal-queries-migration.js +7 -7
- package/schematics/bundles/signals.js +7 -7
- package/schematics/bundles/standalone-migration.js +8 -8
- package/testing/index.d.ts +5 -5
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.0.
|
|
2
|
+
* @license Angular v19.0.3
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -98,7 +98,7 @@ export declare interface AfterContentInit {
|
|
|
98
98
|
* - `read`
|
|
99
99
|
* Use this phase to **read** from the DOM. **Never** write to the DOM in this phase.
|
|
100
100
|
*
|
|
101
|
-
* <div class="alert
|
|
101
|
+
* <div class="docs-alert docs-alert-critical">
|
|
102
102
|
*
|
|
103
103
|
* You should prefer using the `read` and `write` phases over the `earlyRead` and `mixedReadWrite`
|
|
104
104
|
* phases when possible, to avoid performance degradation.
|
|
@@ -125,7 +125,7 @@ export declare interface AfterContentInit {
|
|
|
125
125
|
* manual DOM access, ensuring the best experience for the end users of your application
|
|
126
126
|
* or library.
|
|
127
127
|
*
|
|
128
|
-
* <div class="alert
|
|
128
|
+
* <div class="docs-alert docs-alert-important">
|
|
129
129
|
*
|
|
130
130
|
* Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.
|
|
131
131
|
* You must use caution when directly reading or writing the DOM and layout.
|
|
@@ -141,7 +141,7 @@ export declare interface AfterContentInit {
|
|
|
141
141
|
* for example to initialize a non-Angular library.
|
|
142
142
|
*
|
|
143
143
|
* ### Example
|
|
144
|
-
* ```ts
|
|
144
|
+
* ```angular-ts
|
|
145
145
|
* @Component({
|
|
146
146
|
* selector: 'my-chart-cmp',
|
|
147
147
|
* template: `<div #chart>{{ ... }}</div>`,
|
|
@@ -173,7 +173,7 @@ export declare function afterNextRender<E = never, W = never, M = never>(spec: {
|
|
|
173
173
|
* Register a callback to be invoked the next time the application finishes rendering, during the
|
|
174
174
|
* `mixedReadWrite` phase.
|
|
175
175
|
*
|
|
176
|
-
* <div class="alert
|
|
176
|
+
* <div class="docs-alert docs-alert-critical">
|
|
177
177
|
*
|
|
178
178
|
* You should prefer specifying an explicit phase for the callback instead, or you risk significant
|
|
179
179
|
* performance degradation.
|
|
@@ -185,7 +185,7 @@ export declare function afterNextRender<E = never, W = never, M = never>(spec: {
|
|
|
185
185
|
* - on browser platforms only
|
|
186
186
|
* - during the `mixedReadWrite` phase
|
|
187
187
|
*
|
|
188
|
-
* <div class="alert
|
|
188
|
+
* <div class="docs-alert docs-alert-important">
|
|
189
189
|
*
|
|
190
190
|
* Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.
|
|
191
191
|
* You must use caution when directly reading or writing the DOM and layout.
|
|
@@ -201,7 +201,7 @@ export declare function afterNextRender<E = never, W = never, M = never>(spec: {
|
|
|
201
201
|
* for example to initialize a non-Angular library.
|
|
202
202
|
*
|
|
203
203
|
* ### Example
|
|
204
|
-
* ```ts
|
|
204
|
+
* ```angular-ts
|
|
205
205
|
* @Component({
|
|
206
206
|
* selector: 'my-chart-cmp',
|
|
207
207
|
* template: `<div #chart>{{ ... }}</div>`,
|
|
@@ -239,7 +239,7 @@ export declare function afterNextRender(callback: VoidFunction, options?: AfterR
|
|
|
239
239
|
* - `read`
|
|
240
240
|
* Use this phase to **read** from the DOM. **Never** write to the DOM in this phase.
|
|
241
241
|
*
|
|
242
|
-
* <div class="alert
|
|
242
|
+
* <div class="docs-alert docs-alert-critical">
|
|
243
243
|
*
|
|
244
244
|
* You should prefer using the `read` and `write` phases over the `earlyRead` and `mixedReadWrite`
|
|
245
245
|
* phases when possible, to avoid performance degradation.
|
|
@@ -266,7 +266,7 @@ export declare function afterNextRender(callback: VoidFunction, options?: AfterR
|
|
|
266
266
|
* manual DOM access, ensuring the best experience for the end users of your application
|
|
267
267
|
* or library.
|
|
268
268
|
*
|
|
269
|
-
* <div class="alert
|
|
269
|
+
* <div class="docs-alert docs-alert-important">
|
|
270
270
|
*
|
|
271
271
|
* Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.
|
|
272
272
|
* You must use caution when directly reading or writing the DOM and layout.
|
|
@@ -281,7 +281,7 @@ export declare function afterNextRender(callback: VoidFunction, options?: AfterR
|
|
|
281
281
|
* Use `afterRender` to read or write the DOM after each render.
|
|
282
282
|
*
|
|
283
283
|
* ### Example
|
|
284
|
-
* ```ts
|
|
284
|
+
* ```angular-ts
|
|
285
285
|
* @Component({
|
|
286
286
|
* selector: 'my-cmp',
|
|
287
287
|
* template: `<span #content>{{ ... }}</span>`,
|
|
@@ -312,7 +312,7 @@ export declare function afterRender<E = never, W = never, M = never>(spec: {
|
|
|
312
312
|
* Register a callback to be invoked each time the application finishes rendering, during the
|
|
313
313
|
* `mixedReadWrite` phase.
|
|
314
314
|
*
|
|
315
|
-
* <div class="alert
|
|
315
|
+
* <div class="docs-alert docs-alert-critical">
|
|
316
316
|
*
|
|
317
317
|
* You should prefer specifying an explicit phase for the callback instead, or you risk significant
|
|
318
318
|
* performance degradation.
|
|
@@ -325,7 +325,7 @@ export declare function afterRender<E = never, W = never, M = never>(spec: {
|
|
|
325
325
|
* - on browser platforms only
|
|
326
326
|
* - during the `mixedReadWrite` phase
|
|
327
327
|
*
|
|
328
|
-
* <div class="alert
|
|
328
|
+
* <div class="docs-alert docs-alert-important">
|
|
329
329
|
*
|
|
330
330
|
* Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.
|
|
331
331
|
* You must use caution when directly reading or writing the DOM and layout.
|
|
@@ -340,7 +340,7 @@ export declare function afterRender<E = never, W = never, M = never>(spec: {
|
|
|
340
340
|
* Use `afterRender` to read or write the DOM after each render.
|
|
341
341
|
*
|
|
342
342
|
* ### Example
|
|
343
|
-
* ```ts
|
|
343
|
+
* ```angular-ts
|
|
344
344
|
* @Component({
|
|
345
345
|
* selector: 'my-cmp',
|
|
346
346
|
* template: `<span #content>{{ ... }}</span>`,
|
|
@@ -366,7 +366,7 @@ export declare function afterRender(callback: VoidFunction, options?: AfterRende
|
|
|
366
366
|
* Register an effect that, when triggered, is invoked when the application finishes rendering, during the
|
|
367
367
|
* `mixedReadWrite` phase.
|
|
368
368
|
*
|
|
369
|
-
* <div class="alert
|
|
369
|
+
* <div class="docs-alert docs-alert-critical">
|
|
370
370
|
*
|
|
371
371
|
* You should prefer specifying an explicit phase for the effect instead, or you risk significant
|
|
372
372
|
* performance degradation.
|
|
@@ -379,7 +379,7 @@ export declare function afterRender(callback: VoidFunction, options?: AfterRende
|
|
|
379
379
|
* - on browser platforms only
|
|
380
380
|
* - during the `mixedReadWrite` phase
|
|
381
381
|
*
|
|
382
|
-
* <div class="alert
|
|
382
|
+
* <div class="docs-alert docs-alert-important">
|
|
383
383
|
*
|
|
384
384
|
* Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.
|
|
385
385
|
* You must use caution when directly reading or writing the DOM and layout.
|
|
@@ -408,7 +408,7 @@ export declare function afterRenderEffect(callback: (onCleanup: EffectCleanupReg
|
|
|
408
408
|
* - `read`
|
|
409
409
|
* Use this phase to **read** from the DOM. **Never** write to the DOM in this phase.
|
|
410
410
|
*
|
|
411
|
-
* <div class="alert
|
|
411
|
+
* <div class="docs-alert docs-alert-critical">
|
|
412
412
|
*
|
|
413
413
|
* You should prefer using the `read` and `write` phases over the `earlyRead` and `mixedReadWrite`
|
|
414
414
|
* phases when possible, to avoid performance degradation.
|
|
@@ -436,7 +436,7 @@ export declare function afterRenderEffect(callback: (onCleanup: EffectCleanupReg
|
|
|
436
436
|
* manual DOM access, ensuring the best experience for the end users of your application
|
|
437
437
|
* or library.
|
|
438
438
|
*
|
|
439
|
-
* <div class="alert
|
|
439
|
+
* <div class="docs-alert docs-alert-important">
|
|
440
440
|
*
|
|
441
441
|
* Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.
|
|
442
442
|
* You must use caution when directly reading or writing the DOM and layout.
|
|
@@ -514,7 +514,7 @@ export declare interface AfterRenderOptions {
|
|
|
514
514
|
/**
|
|
515
515
|
* The phase the callback should be invoked in.
|
|
516
516
|
*
|
|
517
|
-
* <div class="alert
|
|
517
|
+
* <div class="docs-alert docs-alert-critical">
|
|
518
518
|
*
|
|
519
519
|
* Defaults to `AfterRenderPhase.MixedReadWrite`. You should choose a more specific
|
|
520
520
|
* phase instead. See `AfterRenderPhase` for more information.
|
|
@@ -557,7 +557,7 @@ export declare enum AfterRenderPhase {
|
|
|
557
557
|
* `AfterRenderPhase.EarlyRead` phase if reading can wait until after the write phase.
|
|
558
558
|
* **Never** write to the DOM in this phase.
|
|
559
559
|
*
|
|
560
|
-
* <div class="alert
|
|
560
|
+
* <div class="docs-alert docs-alert-important">
|
|
561
561
|
*
|
|
562
562
|
* Using this value can degrade performance.
|
|
563
563
|
* Instead, prefer using built-in browser functionality when possible.
|
|
@@ -575,7 +575,7 @@ export declare enum AfterRenderPhase {
|
|
|
575
575
|
* DOM, that haven't been refactored to use a different phase. **Never** use this phase if
|
|
576
576
|
* it is possible to divide the work among the other phases instead.
|
|
577
577
|
*
|
|
578
|
-
* <div class="alert
|
|
578
|
+
* <div class="docs-alert docs-alert-critical">
|
|
579
579
|
*
|
|
580
580
|
* Using this value can **significantly** degrade performance.
|
|
581
581
|
* Instead, prefer dividing work into the appropriate phase callbacks.
|
|
@@ -704,7 +704,7 @@ export declare const APP_BOOTSTRAP_LISTENER: InjectionToken<readonly ((compRef:
|
|
|
704
704
|
* (for example, using `bootstrapApplication` calls). In this case, ensure that those applications
|
|
705
705
|
* have different `APP_ID` value setup. For example:
|
|
706
706
|
*
|
|
707
|
-
* ```
|
|
707
|
+
* ```ts
|
|
708
708
|
* bootstrapApplication(ComponentA, {
|
|
709
709
|
* providers: [
|
|
710
710
|
* { provide: APP_ID, useValue: 'app-a' },
|
|
@@ -752,7 +752,7 @@ export declare const APP_ID: InjectionToken<string>;
|
|
|
752
752
|
* The following example illustrates how to configure a multi-provider using `APP_INITIALIZER` token
|
|
753
753
|
* and a function returning a promise.
|
|
754
754
|
* ### Example with NgModule-based application
|
|
755
|
-
* ```
|
|
755
|
+
* ```ts
|
|
756
756
|
* function initializeApp(): Promise<any> {
|
|
757
757
|
* const http = inject(HttpClient);
|
|
758
758
|
* return firstValueFrom(
|
|
@@ -776,7 +776,7 @@ export declare const APP_ID: InjectionToken<string>;
|
|
|
776
776
|
* ```
|
|
777
777
|
*
|
|
778
778
|
* ### Example with standalone application
|
|
779
|
-
* ```
|
|
779
|
+
* ```ts
|
|
780
780
|
* function initializeApp() {
|
|
781
781
|
* const http = inject(HttpClient);
|
|
782
782
|
* return firstValueFrom(
|
|
@@ -806,7 +806,7 @@ export declare const APP_ID: InjectionToken<string>;
|
|
|
806
806
|
* through DI.
|
|
807
807
|
*
|
|
808
808
|
* ### Example with NgModule-based application
|
|
809
|
-
* ```
|
|
809
|
+
* ```ts
|
|
810
810
|
* function initializeApp() {
|
|
811
811
|
* const http = inject(HttpClient);
|
|
812
812
|
* return firstValueFrom(
|
|
@@ -830,7 +830,7 @@ export declare const APP_ID: InjectionToken<string>;
|
|
|
830
830
|
* ```
|
|
831
831
|
*
|
|
832
832
|
* ### Example with standalone application
|
|
833
|
-
* ```
|
|
833
|
+
* ```ts
|
|
834
834
|
* function initializeApp() {
|
|
835
835
|
* const http = inject(HttpClient);
|
|
836
836
|
* return firstValueFrom(
|
|
@@ -918,7 +918,7 @@ export declare class ApplicationModule {
|
|
|
918
918
|
* (here incrementing a counter, using RxJS `interval`),
|
|
919
919
|
* and at the same time subscribe to `isStable`.
|
|
920
920
|
*
|
|
921
|
-
* ```
|
|
921
|
+
* ```ts
|
|
922
922
|
* constructor(appRef: ApplicationRef) {
|
|
923
923
|
* appRef.isStable.pipe(
|
|
924
924
|
* filter(stable => stable)
|
|
@@ -933,7 +933,7 @@ export declare class ApplicationModule {
|
|
|
933
933
|
* you have to wait for the application to be stable
|
|
934
934
|
* before starting your polling process.
|
|
935
935
|
*
|
|
936
|
-
* ```
|
|
936
|
+
* ```ts
|
|
937
937
|
* constructor(appRef: ApplicationRef) {
|
|
938
938
|
* appRef.isStable.pipe(
|
|
939
939
|
* first(stable => stable),
|
|
@@ -953,7 +953,7 @@ export declare class ApplicationModule {
|
|
|
953
953
|
* you update a field of your component
|
|
954
954
|
* and display it in its template.
|
|
955
955
|
*
|
|
956
|
-
* ```
|
|
956
|
+
* ```ts
|
|
957
957
|
* constructor(appRef: ApplicationRef) {
|
|
958
958
|
* appRef.isStable.pipe(
|
|
959
959
|
* first(stable => stable),
|
|
@@ -967,7 +967,7 @@ export declare class ApplicationModule {
|
|
|
967
967
|
*
|
|
968
968
|
* You'll have to manually trigger the change detection to update the template.
|
|
969
969
|
*
|
|
970
|
-
* ```
|
|
970
|
+
* ```ts
|
|
971
971
|
* constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {
|
|
972
972
|
* appRef.isStable.pipe(
|
|
973
973
|
* first(stable => stable),
|
|
@@ -981,7 +981,7 @@ export declare class ApplicationModule {
|
|
|
981
981
|
*
|
|
982
982
|
* Or make the subscription callback run inside the zone.
|
|
983
983
|
*
|
|
984
|
-
* ```
|
|
984
|
+
* ```ts
|
|
985
985
|
* constructor(appRef: ApplicationRef, zone: NgZone) {
|
|
986
986
|
* appRef.isStable.pipe(
|
|
987
987
|
* first(stable => stable),
|
|
@@ -1023,6 +1023,7 @@ export declare class ApplicationRef {
|
|
|
1023
1023
|
*/
|
|
1024
1024
|
whenStable(): Promise<void>;
|
|
1025
1025
|
private readonly _injector;
|
|
1026
|
+
private _rendererFactory;
|
|
1026
1027
|
/**
|
|
1027
1028
|
* The `EnvironmentInjector` used to create this application.
|
|
1028
1029
|
*/
|
|
@@ -1276,7 +1277,7 @@ export declare interface AttributeDecorator {
|
|
|
1276
1277
|
* Intended to be used as a transform function of an input.
|
|
1277
1278
|
*
|
|
1278
1279
|
* @usageNotes
|
|
1279
|
-
* ```
|
|
1280
|
+
* ```ts
|
|
1280
1281
|
* @Input({ transform: booleanAttribute }) status!: boolean;
|
|
1281
1282
|
* ```
|
|
1282
1283
|
* @param value Value to be transformed.
|
|
@@ -1407,8 +1408,7 @@ declare type ChangeDetectionStrategy_2 = number;
|
|
|
1407
1408
|
* (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check
|
|
1408
1409
|
* after an interval.
|
|
1409
1410
|
*
|
|
1410
|
-
*
|
|
1411
|
-
* region="mark-for-check"></code-example>
|
|
1411
|
+
* {@example core/ts/change_detect/change-detection.ts region='mark-for-check'}
|
|
1412
1412
|
*
|
|
1413
1413
|
* ### Detach change detector to limit how often check occurs
|
|
1414
1414
|
*
|
|
@@ -1418,7 +1418,7 @@ declare type ChangeDetectionStrategy_2 = number;
|
|
|
1418
1418
|
* less often than the changes actually occur. To do that, we detach
|
|
1419
1419
|
* the component's change detector and perform an explicit local check every five seconds.
|
|
1420
1420
|
*
|
|
1421
|
-
*
|
|
1421
|
+
* {@example core/ts/change_detect/change-detection.ts region='detach'}
|
|
1422
1422
|
*
|
|
1423
1423
|
*
|
|
1424
1424
|
* ### Reattaching a detached component
|
|
@@ -1428,7 +1428,7 @@ declare type ChangeDetectionStrategy_2 = number;
|
|
|
1428
1428
|
* when the `live` property is set to false, and reattaches it when the property
|
|
1429
1429
|
* becomes true.
|
|
1430
1430
|
*
|
|
1431
|
-
*
|
|
1431
|
+
* {@example core/ts/change_detect/change-detection.ts region='reattach'}
|
|
1432
1432
|
*
|
|
1433
1433
|
* @publicApi
|
|
1434
1434
|
*/
|
|
@@ -1798,7 +1798,7 @@ export declare interface ComponentDecorator {
|
|
|
1798
1798
|
* The following example creates a component with two data-bound properties,
|
|
1799
1799
|
* specified by the `inputs` value.
|
|
1800
1800
|
*
|
|
1801
|
-
*
|
|
1801
|
+
* {@example core/ts/metadata/directives.ts region='component-input'}
|
|
1802
1802
|
*
|
|
1803
1803
|
*
|
|
1804
1804
|
* ### Setting component outputs
|
|
@@ -2555,7 +2555,7 @@ declare const CONTEXT = 8;
|
|
|
2555
2555
|
* Note: the example uses standalone components, but the function can also be used for
|
|
2556
2556
|
* non-standalone components (declared in an NgModule) as well.
|
|
2557
2557
|
*
|
|
2558
|
-
* ```
|
|
2558
|
+
* ```angular-ts
|
|
2559
2559
|
* @Component({
|
|
2560
2560
|
* standalone: true,
|
|
2561
2561
|
* template: `Hello {{ name }}!`
|
|
@@ -2975,7 +2975,7 @@ declare const DECLARATION_VIEW = 14;
|
|
|
2975
2975
|
*
|
|
2976
2976
|
* See the [i18n guide](guide/i18n/locale-id) for more information.
|
|
2977
2977
|
*
|
|
2978
|
-
* <div class="alert
|
|
2978
|
+
* <div class="docs-alert docs-alert-helpful">
|
|
2979
2979
|
*
|
|
2980
2980
|
* **Deprecation notice:**
|
|
2981
2981
|
*
|
|
@@ -2995,7 +2995,7 @@ declare const DECLARATION_VIEW = 14;
|
|
|
2995
2995
|
* @usageNotes
|
|
2996
2996
|
* ### Example
|
|
2997
2997
|
*
|
|
2998
|
-
* ```
|
|
2998
|
+
* ```ts
|
|
2999
2999
|
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
3000
3000
|
* import { AppModule } from './app/app.module';
|
|
3001
3001
|
*
|
|
@@ -3341,7 +3341,7 @@ export declare abstract class DestroyRef {
|
|
|
3341
3341
|
*
|
|
3342
3342
|
* @usageNotes
|
|
3343
3343
|
* ### Example
|
|
3344
|
-
* ```
|
|
3344
|
+
* ```ts
|
|
3345
3345
|
* const destroyRef = inject(DestroyRef);
|
|
3346
3346
|
*
|
|
3347
3347
|
* // register a destroy callback
|
|
@@ -3411,7 +3411,7 @@ export declare interface Directive {
|
|
|
3411
3411
|
*
|
|
3412
3412
|
* The following example creates a component with two data-bound properties.
|
|
3413
3413
|
*
|
|
3414
|
-
* ```
|
|
3414
|
+
* ```ts
|
|
3415
3415
|
* @Component({
|
|
3416
3416
|
* selector: 'bank-account',
|
|
3417
3417
|
* inputs: ['bankName', {name: 'id', alias: 'account-id'}],
|
|
@@ -3447,7 +3447,7 @@ export declare interface Directive {
|
|
|
3447
3447
|
*
|
|
3448
3448
|
* @usageNotes
|
|
3449
3449
|
*
|
|
3450
|
-
* ```
|
|
3450
|
+
* ```ts
|
|
3451
3451
|
* @Component({
|
|
3452
3452
|
* selector: 'child-dir',
|
|
3453
3453
|
* outputs: [ 'bankNameChange' ],
|
|
@@ -3831,7 +3831,7 @@ declare type DirectiveDefListOrFactory = (() => DirectiveDefList) | DirectiveDef
|
|
|
3831
3831
|
* Map of inputs for a given directive/component.
|
|
3832
3832
|
*
|
|
3833
3833
|
* Given:
|
|
3834
|
-
* ```
|
|
3834
|
+
* ```ts
|
|
3835
3835
|
* class MyComponent {
|
|
3836
3836
|
* @Input()
|
|
3837
3837
|
* publicInput1: string;
|
|
@@ -3847,7 +3847,7 @@ declare type DirectiveDefListOrFactory = (() => DirectiveDefList) | DirectiveDef
|
|
|
3847
3847
|
* ```
|
|
3848
3848
|
*
|
|
3849
3849
|
* is described as:
|
|
3850
|
-
* ```
|
|
3850
|
+
* ```ts
|
|
3851
3851
|
* {
|
|
3852
3852
|
* publicInput1: 'publicInput1',
|
|
3853
3853
|
* declaredInput2: [InputFlags.None, 'declaredInput2', 'publicInput2'],
|
|
@@ -3862,7 +3862,7 @@ declare type DirectiveDefListOrFactory = (() => DirectiveDefList) | DirectiveDef
|
|
|
3862
3862
|
* ```
|
|
3863
3863
|
*
|
|
3864
3864
|
* Which the minifier may translate to:
|
|
3865
|
-
* ```
|
|
3865
|
+
* ```ts
|
|
3866
3866
|
* {
|
|
3867
3867
|
* minifiedPublicInput1: 'publicInput1',
|
|
3868
3868
|
* minifiedDeclaredInput2: [InputFlags.None, 'publicInput2', 'declaredInput2'],
|
|
@@ -3909,7 +3909,7 @@ declare const DISCONNECTED_NODES = "d";
|
|
|
3909
3909
|
* The example below uses `ApplicationRef.bootstrap()` to render the
|
|
3910
3910
|
* `AppComponent` on the page.
|
|
3911
3911
|
*
|
|
3912
|
-
* ```
|
|
3912
|
+
* ```ts
|
|
3913
3913
|
* class AppModule implements DoBootstrap {
|
|
3914
3914
|
* ngDoBootstrap(appRef: ApplicationRef) {
|
|
3915
3915
|
* appRef.bootstrap(AppComponent); // Or some other component
|
|
@@ -4088,7 +4088,7 @@ declare const EMBEDDED_VIEW_INJECTOR = 20;
|
|
|
4088
4088
|
* The following template breaks down into two separate `TemplateRef` instances,
|
|
4089
4089
|
* an outer one and an inner one.
|
|
4090
4090
|
*
|
|
4091
|
-
* ```
|
|
4091
|
+
* ```html
|
|
4092
4092
|
* Count: {{items.length}}
|
|
4093
4093
|
* <ul>
|
|
4094
4094
|
* <li *ngFor="let item of items">{{item}}</li>
|
|
@@ -4097,7 +4097,7 @@ declare const EMBEDDED_VIEW_INJECTOR = 20;
|
|
|
4097
4097
|
*
|
|
4098
4098
|
* This is the outer `TemplateRef`:
|
|
4099
4099
|
*
|
|
4100
|
-
* ```
|
|
4100
|
+
* ```html
|
|
4101
4101
|
* Count: {{items.length}}
|
|
4102
4102
|
* <ul>
|
|
4103
4103
|
* <ng-template ngFor let-item [ngForOf]="items"></ng-template>
|
|
@@ -4106,13 +4106,13 @@ declare const EMBEDDED_VIEW_INJECTOR = 20;
|
|
|
4106
4106
|
*
|
|
4107
4107
|
* This is the inner `TemplateRef`:
|
|
4108
4108
|
*
|
|
4109
|
-
* ```
|
|
4109
|
+
* ```html
|
|
4110
4110
|
* <li>{{item}}</li>
|
|
4111
4111
|
* ```
|
|
4112
4112
|
*
|
|
4113
4113
|
* The outer and inner `TemplateRef` instances are assembled into views as follows:
|
|
4114
4114
|
*
|
|
4115
|
-
* ```
|
|
4115
|
+
* ```html
|
|
4116
4116
|
* <!-- ViewRef: outer-0 -->
|
|
4117
4117
|
* Count: 2
|
|
4118
4118
|
* <ul>
|
|
@@ -4249,7 +4249,7 @@ export declare type EnvironmentProviders = {
|
|
|
4249
4249
|
* @usageNotes
|
|
4250
4250
|
* ### Example
|
|
4251
4251
|
*
|
|
4252
|
-
* ```
|
|
4252
|
+
* ```ts
|
|
4253
4253
|
* class MyErrorHandler implements ErrorHandler {
|
|
4254
4254
|
* handleError(error) {
|
|
4255
4255
|
* // do something with the exception
|
|
@@ -4293,7 +4293,7 @@ declare interface EventContractDetails {
|
|
|
4293
4293
|
* that create event emitters. When the title is clicked, the emitter
|
|
4294
4294
|
* emits an open or close event to toggle the current visibility state.
|
|
4295
4295
|
*
|
|
4296
|
-
* ```
|
|
4296
|
+
* ```angular-ts
|
|
4297
4297
|
* @Component({
|
|
4298
4298
|
* selector: 'zippy',
|
|
4299
4299
|
* template: `
|
|
@@ -4496,7 +4496,7 @@ declare const FLAGS = 2;
|
|
|
4496
4496
|
* {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
|
|
4497
4497
|
*
|
|
4498
4498
|
* ### Circular standalone reference import example
|
|
4499
|
-
* ```ts
|
|
4499
|
+
* ```angular-ts
|
|
4500
4500
|
* @Component({
|
|
4501
4501
|
* standalone: true,
|
|
4502
4502
|
* imports: [ChildComponent],
|
|
@@ -4841,7 +4841,7 @@ export declare const Host: HostDecorator;
|
|
|
4841
4841
|
*
|
|
4842
4842
|
* @usageNotes
|
|
4843
4843
|
* ### Injecting a tag name that is known to exist
|
|
4844
|
-
* ```
|
|
4844
|
+
* ```ts
|
|
4845
4845
|
* @Directive()
|
|
4846
4846
|
* class MyDir {
|
|
4847
4847
|
* tagName: string = inject(HOST_TAG_NAME);
|
|
@@ -4849,7 +4849,7 @@ export declare const Host: HostDecorator;
|
|
|
4849
4849
|
* ```
|
|
4850
4850
|
*
|
|
4851
4851
|
* ### Optionally injecting a tag name
|
|
4852
|
-
* ```
|
|
4852
|
+
* ```ts
|
|
4853
4853
|
* @Directive()
|
|
4854
4854
|
* class MyDir {
|
|
4855
4855
|
* tagName: string | null = inject(HOST_TAG_NAME, {optional: true});
|
|
@@ -4864,7 +4864,7 @@ export declare const HOST_TAG_NAME: InjectionToken<string>;
|
|
|
4864
4864
|
*
|
|
4865
4865
|
* @usageNotes
|
|
4866
4866
|
* ### Injecting an attribute that is known to exist
|
|
4867
|
-
* ```
|
|
4867
|
+
* ```ts
|
|
4868
4868
|
* @Directive()
|
|
4869
4869
|
* class MyDir {
|
|
4870
4870
|
* attr: string = inject(new HostAttributeToken('some-attr'));
|
|
@@ -4872,7 +4872,7 @@ export declare const HOST_TAG_NAME: InjectionToken<string>;
|
|
|
4872
4872
|
* ```
|
|
4873
4873
|
*
|
|
4874
4874
|
* ### Optionally injecting an attribute
|
|
4875
|
-
* ```
|
|
4875
|
+
* ```ts
|
|
4876
4876
|
* @Directive()
|
|
4877
4877
|
* class MyDir {
|
|
4878
4878
|
* attr: string | null = inject(new HostAttributeToken('some-attr'), {optional: true});
|
|
@@ -4924,7 +4924,7 @@ export declare interface HostBindingDecorator {
|
|
|
4924
4924
|
* The following example creates a directive that sets the `valid` and `invalid`
|
|
4925
4925
|
* class, a style color, and an id on the DOM element that has an `ngModel` directive on it.
|
|
4926
4926
|
*
|
|
4927
|
-
* ```
|
|
4927
|
+
* ```ts
|
|
4928
4928
|
* @Directive({selector: '[ngModel]'})
|
|
4929
4929
|
* class NgModelStatus {
|
|
4930
4930
|
* constructor(public control: NgModel) {}
|
|
@@ -4987,7 +4987,7 @@ export declare interface HostBindingDecorator {
|
|
|
4987
4987
|
*
|
|
4988
4988
|
* ## Example
|
|
4989
4989
|
*
|
|
4990
|
-
* ```
|
|
4990
|
+
* ```ts
|
|
4991
4991
|
* const hostBindingOpCodes = [
|
|
4992
4992
|
* ~30, // Select element 30
|
|
4993
4993
|
* 40, 45, MyDir.ɵdir.hostBindings // Invoke host bindings on MyDir on element 30;
|
|
@@ -4998,7 +4998,7 @@ export declare interface HostBindingDecorator {
|
|
|
4998
4998
|
* ```
|
|
4999
4999
|
*
|
|
5000
5000
|
* ## Pseudocode
|
|
5001
|
-
* ```
|
|
5001
|
+
* ```ts
|
|
5002
5002
|
* const hostBindingOpCodes = tView.hostBindingOpCodes;
|
|
5003
5003
|
* if (hostBindingOpCodes === null) return;
|
|
5004
5004
|
* for (let i = 0; i < hostBindingOpCodes.length; i++) {
|
|
@@ -5041,8 +5041,7 @@ export declare interface HostDecorator {
|
|
|
5041
5041
|
*
|
|
5042
5042
|
* The following shows use with the `@Optional` decorator, and allows for a `null` result.
|
|
5043
5043
|
*
|
|
5044
|
-
*
|
|
5045
|
-
* </code-example>
|
|
5044
|
+
* {@example core/di/ts/metadata_spec.ts region='Host'}
|
|
5046
5045
|
*
|
|
5047
5046
|
* For an extended example, see ["Dependency Injection
|
|
5048
5047
|
* Guide"](guide/di/di-in-action#optional).
|
|
@@ -5231,7 +5230,7 @@ declare const I18N_DATA = "l";
|
|
|
5231
5230
|
* The number is shifted and encoded according to `I18nCreateOpCode`
|
|
5232
5231
|
*
|
|
5233
5232
|
* Pseudocode:
|
|
5234
|
-
* ```
|
|
5233
|
+
* ```ts
|
|
5235
5234
|
* const i18nCreateOpCodes = [
|
|
5236
5235
|
* 10 << I18nCreateOpCode.SHIFT, "Text Node add to DOM",
|
|
5237
5236
|
* 11 << I18nCreateOpCode.SHIFT | I18nCreateOpCode.COMMENT, "Comment Node add to DOM",
|
|
@@ -5522,7 +5521,7 @@ export declare type ImportedNgModuleProviders = EnvironmentProviders;
|
|
|
5522
5521
|
* @usageNotes
|
|
5523
5522
|
* The results of the `importProvidersFrom` call can be used in the `bootstrapApplication` call:
|
|
5524
5523
|
*
|
|
5525
|
-
* ```
|
|
5524
|
+
* ```ts
|
|
5526
5525
|
* await bootstrapApplication(RootComponent, {
|
|
5527
5526
|
* providers: [
|
|
5528
5527
|
* importProvidersFrom(NgModuleOne, NgModuleTwo)
|
|
@@ -5533,7 +5532,7 @@ export declare type ImportedNgModuleProviders = EnvironmentProviders;
|
|
|
5533
5532
|
* You can also use the `importProvidersFrom` results in the `providers` field of a route, when a
|
|
5534
5533
|
* standalone component is used:
|
|
5535
5534
|
*
|
|
5536
|
-
* ```
|
|
5535
|
+
* ```ts
|
|
5537
5536
|
* export const ROUTES: Route[] = [
|
|
5538
5537
|
* {
|
|
5539
5538
|
* path: 'foo',
|
|
@@ -5747,7 +5746,7 @@ export declare interface InjectableDecorator {
|
|
|
5747
5746
|
* The following example shows how a service class is properly
|
|
5748
5747
|
* marked so that a supporting service can be injected upon creation.
|
|
5749
5748
|
*
|
|
5750
|
-
*
|
|
5749
|
+
* {@example core/di/ts/metadata_spec.ts region='Injectable'}
|
|
5751
5750
|
*
|
|
5752
5751
|
*/
|
|
5753
5752
|
(): TypeDecorator;
|
|
@@ -5800,8 +5799,7 @@ export declare interface InjectDecorator {
|
|
|
5800
5799
|
* When `@Inject()` is not present, the injector uses the type annotation of the
|
|
5801
5800
|
* parameter as the provider.
|
|
5802
5801
|
*
|
|
5803
|
-
*
|
|
5804
|
-
* </code-example>
|
|
5802
|
+
* {@example core/di/ts/metadata_spec.ts region='InjectWithoutDecorator'}
|
|
5805
5803
|
*
|
|
5806
5804
|
* @see [Dependency Injection Guide](guide/di/dependency-injection
|
|
5807
5805
|
*
|
|
@@ -5872,7 +5870,7 @@ export declare enum InjectFlags {
|
|
|
5872
5870
|
* `InjectionToken` is parameterized on `T` which is the type of object which will be returned by
|
|
5873
5871
|
* the `Injector`. This provides an additional level of type safety.
|
|
5874
5872
|
*
|
|
5875
|
-
* <div class="alert
|
|
5873
|
+
* <div class="docs-alert docs-alert-helpful">
|
|
5876
5874
|
*
|
|
5877
5875
|
* **Important Note**: Ensure that you use the same instance of the `InjectionToken` in both the
|
|
5878
5876
|
* provider and the injection call. Creating a new instance of `InjectionToken` in different places,
|
|
@@ -5881,8 +5879,7 @@ export declare enum InjectFlags {
|
|
|
5881
5879
|
*
|
|
5882
5880
|
* </div>
|
|
5883
5881
|
*
|
|
5884
|
-
*
|
|
5885
|
-
* region="InjectionToken"></code-example>
|
|
5882
|
+
* {@example injection-token/src/main.ts region='InjectionToken'}
|
|
5886
5883
|
*
|
|
5887
5884
|
* When creating an `InjectionToken`, you can optionally specify a factory function which returns
|
|
5888
5885
|
* (possibly by creating) a default value of the parameterized type `T`. This sets up the
|
|
@@ -6131,7 +6128,7 @@ export declare const Input: InputDecorator;
|
|
|
6131
6128
|
* @usageNotes
|
|
6132
6129
|
* To use signal-based inputs, import `input` from `@angular/core`.
|
|
6133
6130
|
*
|
|
6134
|
-
* ```
|
|
6131
|
+
* ```ts
|
|
6135
6132
|
* import {input} from '@angular/core`;
|
|
6136
6133
|
* ```
|
|
6137
6134
|
*
|
|
@@ -6180,7 +6177,7 @@ export declare interface InputDecorator {
|
|
|
6180
6177
|
* The following example creates a component with two input properties,
|
|
6181
6178
|
* one of which is given a special binding name.
|
|
6182
6179
|
*
|
|
6183
|
-
* ```
|
|
6180
|
+
* ```ts
|
|
6184
6181
|
* import { Component, Input, numberAttribute, booleanAttribute } from '@angular/core';
|
|
6185
6182
|
* @Component({
|
|
6186
6183
|
* selector: 'bank-account',
|
|
@@ -6858,7 +6855,7 @@ declare interface Listener {
|
|
|
6858
6855
|
* @usageNotes
|
|
6859
6856
|
* ### Example
|
|
6860
6857
|
*
|
|
6861
|
-
* ```
|
|
6858
|
+
* ```ts
|
|
6862
6859
|
* import { LOCALE_ID } from '@angular/core';
|
|
6863
6860
|
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
6864
6861
|
* import { AppModule } from './app/app.module';
|
|
@@ -7246,7 +7243,7 @@ declare const enum LViewFlags {
|
|
|
7246
7243
|
/** Whether or not this view is the root view */
|
|
7247
7244
|
IsRoot = 512,
|
|
7248
7245
|
/**
|
|
7249
|
-
* Whether this moved LView
|
|
7246
|
+
* Whether this moved LView needs to be refreshed. Similar to the Dirty flag, but used for
|
|
7250
7247
|
* transplanted and signal views where the parent/ancestor views are not marked dirty as well.
|
|
7251
7248
|
* i.e. "Refresh just this view". Used in conjunction with the HAS_CHILD_VIEWS_TO_REFRESH
|
|
7252
7249
|
* flag.
|
|
@@ -7284,7 +7281,7 @@ export declare function makeEnvironmentProviders(providers: (Provider | Environm
|
|
|
7284
7281
|
*
|
|
7285
7282
|
* Example:
|
|
7286
7283
|
*
|
|
7287
|
-
* ```
|
|
7284
|
+
* ```ts
|
|
7288
7285
|
* const COUNTER_KEY = makeStateKey<number>('counter');
|
|
7289
7286
|
* let value = 10;
|
|
7290
7287
|
*
|
|
@@ -7316,7 +7313,7 @@ export declare function mergeApplicationConfig(...configs: ApplicationConfig[]):
|
|
|
7316
7313
|
*
|
|
7317
7314
|
* @usageNotes
|
|
7318
7315
|
* ### Example
|
|
7319
|
-
* ```
|
|
7316
|
+
* ```ts
|
|
7320
7317
|
* import { MissingTranslationStrategy } from '@angular/core';
|
|
7321
7318
|
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
7322
7319
|
* import { AppModule } from './app/app.module';
|
|
@@ -7345,7 +7342,7 @@ export declare enum MissingTranslationStrategy {
|
|
|
7345
7342
|
*
|
|
7346
7343
|
* To use `model()`, import the function from `@angular/core`.
|
|
7347
7344
|
*
|
|
7348
|
-
* ```
|
|
7345
|
+
* ```ts
|
|
7349
7346
|
* import {model} from '@angular/core`;
|
|
7350
7347
|
* ```
|
|
7351
7348
|
*
|
|
@@ -7787,7 +7784,7 @@ export declare class NgProbeToken {
|
|
|
7787
7784
|
* @usageNotes
|
|
7788
7785
|
* ### Example
|
|
7789
7786
|
*
|
|
7790
|
-
* ```
|
|
7787
|
+
* ```ts
|
|
7791
7788
|
* import {Component, NgZone} from '@angular/core';
|
|
7792
7789
|
* import {NgIf} from '@angular/common';
|
|
7793
7790
|
*
|
|
@@ -7956,14 +7953,13 @@ export declare interface NgZoneOptions {
|
|
|
7956
7953
|
*
|
|
7957
7954
|
* When button is clicked, because of the event bubbling, both
|
|
7958
7955
|
* event handlers will be called and 2 change detections will be
|
|
7959
|
-
* triggered. We can coalesce such kind of events to
|
|
7956
|
+
* triggered. We can coalesce such kind of events to trigger
|
|
7960
7957
|
* change detection only once.
|
|
7961
7958
|
*
|
|
7962
|
-
* By default, this option
|
|
7963
|
-
* coalesced and
|
|
7964
|
-
*
|
|
7965
|
-
*
|
|
7966
|
-
* the change detection will only be triggered once.
|
|
7959
|
+
* By default, this option is set to false, meaning events will
|
|
7960
|
+
* not be coalesced, and change detection will be triggered multiple times.
|
|
7961
|
+
* If this option is set to true, change detection will be triggered
|
|
7962
|
+
* once in the scenario described above.
|
|
7967
7963
|
*/
|
|
7968
7964
|
eventCoalescing?: boolean;
|
|
7969
7965
|
/**
|
|
@@ -8060,7 +8056,7 @@ declare const NUM_ROOT_NODES = "r";
|
|
|
8060
8056
|
* @param fallbackValue Value to use if the provided value can't be parsed as a number.
|
|
8061
8057
|
*
|
|
8062
8058
|
* @usageNotes
|
|
8063
|
-
* ```
|
|
8059
|
+
* ```ts
|
|
8064
8060
|
* @Input({ transform: numberAttribute }) id!: number;
|
|
8065
8061
|
* ```
|
|
8066
8062
|
*
|
|
@@ -8188,8 +8184,7 @@ export declare interface OptionalDecorator {
|
|
|
8188
8184
|
*
|
|
8189
8185
|
* The following code allows the possibility of a `null` result:
|
|
8190
8186
|
*
|
|
8191
|
-
*
|
|
8192
|
-
* </code-example>
|
|
8187
|
+
* {@example core/di/ts/metadata_spec.ts region='Optional'}
|
|
8193
8188
|
*
|
|
8194
8189
|
* @see [Dependency Injection Guide](guide/di/dependency-injection.
|
|
8195
8190
|
*/
|
|
@@ -8370,7 +8365,7 @@ declare const PARENT = 3;
|
|
|
8370
8365
|
* - tests might want to delay assertions until the application becomes stable;
|
|
8371
8366
|
*
|
|
8372
8367
|
* @usageNotes
|
|
8373
|
-
* ```
|
|
8368
|
+
* ```ts
|
|
8374
8369
|
* const pendingTasks = inject(PendingTasks);
|
|
8375
8370
|
* const taskCleanup = pendingTasks.add();
|
|
8376
8371
|
* // do work that should block application's stability and then:
|
|
@@ -8484,7 +8479,7 @@ export declare interface PipeDecorator {
|
|
|
8484
8479
|
* For example, if the name is "myPipe", use a template binding expression
|
|
8485
8480
|
* such as the following:
|
|
8486
8481
|
*
|
|
8487
|
-
* ```
|
|
8482
|
+
* ```html
|
|
8488
8483
|
* {{ exp | myPipe }}
|
|
8489
8484
|
* ```
|
|
8490
8485
|
*
|
|
@@ -8600,7 +8595,7 @@ export declare class PlatformRef {
|
|
|
8600
8595
|
* @usageNotes
|
|
8601
8596
|
* ### Simple Example
|
|
8602
8597
|
*
|
|
8603
|
-
* ```
|
|
8598
|
+
* ```ts
|
|
8604
8599
|
* @NgModule({
|
|
8605
8600
|
* imports: [BrowserModule]
|
|
8606
8601
|
* })
|
|
@@ -8713,7 +8708,7 @@ declare type ProjectionSlots = (ɵCssSelectorList | '*')[];
|
|
|
8713
8708
|
* @usageNotes
|
|
8714
8709
|
* The following example illustrates how to configure an initialization function using
|
|
8715
8710
|
* `provideAppInitializer()`
|
|
8716
|
-
* ```
|
|
8711
|
+
* ```ts
|
|
8717
8712
|
* bootstrapApplication(App, {
|
|
8718
8713
|
* providers: [
|
|
8719
8714
|
* provideAppInitializer(() => {
|
|
@@ -8747,7 +8742,7 @@ export declare function provideAppInitializer(initializerFn: () => Observable<un
|
|
|
8747
8742
|
* @usageNotes
|
|
8748
8743
|
* The following example illustrates how to configure an initialization function using
|
|
8749
8744
|
* `provideEnvironmentInitializer()`
|
|
8750
|
-
* ```
|
|
8745
|
+
* ```ts
|
|
8751
8746
|
* createEnvironmentInjector(
|
|
8752
8747
|
* [
|
|
8753
8748
|
* provideEnvironmentInitializer(() => {
|
|
@@ -8813,7 +8808,7 @@ export declare function provideExperimentalCheckNoChangesForDebug(options: {
|
|
|
8813
8808
|
* - registering a render hook (templates are only refreshed if render hooks do one of the above)
|
|
8814
8809
|
*
|
|
8815
8810
|
* @usageNotes
|
|
8816
|
-
* ```
|
|
8811
|
+
* ```ts
|
|
8817
8812
|
* bootstrapApplication(MyApp, {providers: [
|
|
8818
8813
|
* provideExperimentalZonelessChangeDetection(),
|
|
8819
8814
|
* ]});
|
|
@@ -8873,7 +8868,7 @@ export declare type ProviderToken<T> = Type<T> | AbstractType<T> | InjectionToke
|
|
|
8873
8868
|
* `BootstrapOptions` instead.
|
|
8874
8869
|
*
|
|
8875
8870
|
* @usageNotes
|
|
8876
|
-
* ```
|
|
8871
|
+
* ```ts
|
|
8877
8872
|
* bootstrapApplication(MyApp, {providers: [
|
|
8878
8873
|
* provideZoneChangeDetection({eventCoalescing: true}),
|
|
8879
8874
|
* ]});
|
|
@@ -8972,7 +8967,7 @@ declare const enum QueryFlags {
|
|
|
8972
8967
|
*
|
|
8973
8968
|
* @usageNotes
|
|
8974
8969
|
* ### Example
|
|
8975
|
-
* ```
|
|
8970
|
+
* ```ts
|
|
8976
8971
|
* @Component({...})
|
|
8977
8972
|
* class Container {
|
|
8978
8973
|
* @ViewChildren(Item) items:QueryList<Item>;
|
|
@@ -9249,7 +9244,7 @@ declare interface ReactiveLViewConsumer extends ReactiveNode {
|
|
|
9249
9244
|
* The example below demonstrates how to use the function and how the fields
|
|
9250
9245
|
* of the returned object map to the component metadata.
|
|
9251
9246
|
*
|
|
9252
|
-
* ```
|
|
9247
|
+
* ```angular-ts
|
|
9253
9248
|
* @Component({
|
|
9254
9249
|
* standalone: true,
|
|
9255
9250
|
* selector: 'foo-component',
|
|
@@ -10011,8 +10006,7 @@ export declare interface SelfDecorator {
|
|
|
10011
10006
|
* by the local injector when instantiating the class itself, but not
|
|
10012
10007
|
* when instantiating a child.
|
|
10013
10008
|
*
|
|
10014
|
-
*
|
|
10015
|
-
* </code-example>
|
|
10009
|
+
* {@example core/di/ts/metadata_spec.ts region='Self'}
|
|
10016
10010
|
*
|
|
10017
10011
|
* @see {@link SkipSelf}
|
|
10018
10012
|
* @see {@link Optional}
|
|
@@ -10214,8 +10208,7 @@ export declare interface SkipSelfDecorator {
|
|
|
10214
10208
|
* In the following example, the dependency can be resolved when
|
|
10215
10209
|
* instantiating a child, but not when instantiating the class itself.
|
|
10216
10210
|
*
|
|
10217
|
-
*
|
|
10218
|
-
* </code-example>
|
|
10211
|
+
* {@example core/di/ts/metadata_spec.ts region='SkipSelf'}
|
|
10219
10212
|
*
|
|
10220
10213
|
* @see [Dependency Injection guide](guide/di/di-in-action#skip).
|
|
10221
10214
|
* @see {@link Self}
|
|
@@ -10247,7 +10240,7 @@ declare interface StandaloneCompScopeData extends ScopeData {
|
|
|
10247
10240
|
*
|
|
10248
10241
|
* Example:
|
|
10249
10242
|
*
|
|
10250
|
-
* ```
|
|
10243
|
+
* ```ts
|
|
10251
10244
|
* const COUNTER_KEY = makeStateKey<number>('counter');
|
|
10252
10245
|
* let value = 10;
|
|
10253
10246
|
*
|
|
@@ -10460,6 +10453,25 @@ declare interface TDeferBlockDetails {
|
|
|
10460
10453
|
* List of prefetch triggers for a given block
|
|
10461
10454
|
*/
|
|
10462
10455
|
prefetchTriggers: Set<DeferBlockTrigger> | null;
|
|
10456
|
+
/**
|
|
10457
|
+
* Defer block flags, which should be used for all
|
|
10458
|
+
* instances of a given defer block (the flags that should be
|
|
10459
|
+
* placed into the `TDeferDetails` at runtime).
|
|
10460
|
+
*/
|
|
10461
|
+
flags: TDeferDetailsFlags;
|
|
10462
|
+
}
|
|
10463
|
+
|
|
10464
|
+
/**
|
|
10465
|
+
* Specifies defer block flags, which should be used for all
|
|
10466
|
+
* instances of a given defer block (the flags that should be
|
|
10467
|
+
* placed into the `TDeferDetails` at runtime).
|
|
10468
|
+
*/
|
|
10469
|
+
declare const enum TDeferDetailsFlags {
|
|
10470
|
+
Default = 0,
|
|
10471
|
+
/**
|
|
10472
|
+
* Whether or not the defer block has hydrate triggers.
|
|
10473
|
+
*/
|
|
10474
|
+
HasHydrateTriggers = 1
|
|
10463
10475
|
}
|
|
10464
10476
|
|
|
10465
10477
|
/** Static data for an <ng-container> */
|
|
@@ -10552,7 +10564,7 @@ declare const TEMPLATES = "t";
|
|
|
10552
10564
|
* providers using the `provideProtractorTestingSupport()` function and adding them into the
|
|
10553
10565
|
* `options.providers` array. Example:
|
|
10554
10566
|
*
|
|
10555
|
-
* ```
|
|
10567
|
+
* ```ts
|
|
10556
10568
|
* import {provideProtractorTestingSupport} from '@angular/platform-browser';
|
|
10557
10569
|
*
|
|
10558
10570
|
* await bootstrapApplication(RootComponent, providers: [provideProtractorTestingSupport()]);
|
|
@@ -11475,7 +11487,7 @@ export declare class TransferState {
|
|
|
11475
11487
|
* @usageNotes
|
|
11476
11488
|
* ### Example
|
|
11477
11489
|
*
|
|
11478
|
-
* ```
|
|
11490
|
+
* ```ts
|
|
11479
11491
|
* import { TRANSLATIONS } from '@angular/core';
|
|
11480
11492
|
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
11481
11493
|
* import { AppModule } from './app/app.module';
|
|
@@ -11501,7 +11513,7 @@ export declare const TRANSLATIONS: InjectionToken<string>;
|
|
|
11501
11513
|
* @usageNotes
|
|
11502
11514
|
* ### Example
|
|
11503
11515
|
*
|
|
11504
|
-
* ```
|
|
11516
|
+
* ```ts
|
|
11505
11517
|
* import { TRANSLATIONS_FORMAT } from '@angular/core';
|
|
11506
11518
|
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
11507
11519
|
* import { AppModule } from './app/app.module';
|
|
@@ -11613,7 +11625,7 @@ declare type TStylingRange = number & {
|
|
|
11613
11625
|
*
|
|
11614
11626
|
* Imagine we have:
|
|
11615
11627
|
*
|
|
11616
|
-
* ```
|
|
11628
|
+
* ```angular-ts
|
|
11617
11629
|
* <div class="TEMPLATE" my-dir>
|
|
11618
11630
|
*
|
|
11619
11631
|
* @Directive({
|
|
@@ -11626,7 +11638,7 @@ declare type TStylingRange = number & {
|
|
|
11626
11638
|
*
|
|
11627
11639
|
* In the above case the linked list will contain one item:
|
|
11628
11640
|
*
|
|
11629
|
-
* ```
|
|
11641
|
+
* ```ts
|
|
11630
11642
|
* // assume binding location: 10 for `ɵɵclassProp('dynamic', ctx.exp);`
|
|
11631
11643
|
* tData[10] = <TStylingStatic>[
|
|
11632
11644
|
* '': 'dynamic', // This is the wrapped value of `TStylingKey`
|
|
@@ -11643,13 +11655,13 @@ declare type TStylingRange = number & {
|
|
|
11643
11655
|
* `dynamic` (there is not). Therefore it is safe to remove it.
|
|
11644
11656
|
*
|
|
11645
11657
|
* If setting `true` case:
|
|
11646
|
-
* ```
|
|
11658
|
+
* ```ts
|
|
11647
11659
|
* lView[10] = true; // assume `ctx.exp` is `true`
|
|
11648
11660
|
* lView[10 + 1] = true; // Just normalized `lView[10]`
|
|
11649
11661
|
* ```
|
|
11650
11662
|
* So when the function is resolving styling value, it first needs to look into the linked list
|
|
11651
11663
|
* (there is none) and than into `TNode.residualClass` (TNode.residualStyle) which contains
|
|
11652
|
-
* ```
|
|
11664
|
+
* ```ts
|
|
11653
11665
|
* tNode.residualClass = [
|
|
11654
11666
|
* 'TEMPLATE': true,
|
|
11655
11667
|
* ];
|
|
@@ -11967,7 +11979,7 @@ declare type Type_2 = Function;
|
|
|
11967
11979
|
* An interface implemented by all Angular type decorators, which allows them to be used as
|
|
11968
11980
|
* decorators as well as Angular syntax.
|
|
11969
11981
|
*
|
|
11970
|
-
* ```
|
|
11982
|
+
* ```ts
|
|
11971
11983
|
* @ng.Component({...})
|
|
11972
11984
|
* class MyClass {...}
|
|
11973
11985
|
* ```
|
|
@@ -12100,7 +12112,7 @@ export declare const ViewChild: ViewChildDecorator;
|
|
|
12100
12112
|
* Create a child query in your component by declaring a
|
|
12101
12113
|
* class field and initializing it with the `viewChild()` function.
|
|
12102
12114
|
*
|
|
12103
|
-
* ```ts
|
|
12115
|
+
* ```angular-ts
|
|
12104
12116
|
* @Component({template: '<div #el></div><my-component #cmp />'})
|
|
12105
12117
|
* export class TestComponent {
|
|
12106
12118
|
* divEl = viewChild<ElementRef>('el'); // Signal<ElementRef|undefined>
|
|
@@ -12337,7 +12349,7 @@ export declare interface ViewChildrenDecorator {
|
|
|
12337
12349
|
* Note: the example uses standalone components, but the function can also be used for
|
|
12338
12350
|
* non-standalone components (declared in an NgModule) as well.
|
|
12339
12351
|
*
|
|
12340
|
-
* ```
|
|
12352
|
+
* ```angular-ts
|
|
12341
12353
|
* @Component({
|
|
12342
12354
|
* standalone: true,
|
|
12343
12355
|
* selector: 'dynamic',
|
|
@@ -13894,7 +13906,7 @@ export declare class ɵLContext {
|
|
|
13894
13906
|
*
|
|
13895
13907
|
* Example:
|
|
13896
13908
|
*
|
|
13897
|
-
* ```
|
|
13909
|
+
* ```ts
|
|
13898
13910
|
* renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});
|
|
13899
13911
|
* ```
|
|
13900
13912
|
*/
|
|
@@ -14373,7 +14385,7 @@ export declare function ɵresetJitOptions(): void;
|
|
|
14373
14385
|
* Used to resolve resource URLs on `@Component` when used with JIT compilation.
|
|
14374
14386
|
*
|
|
14375
14387
|
* Example:
|
|
14376
|
-
* ```
|
|
14388
|
+
* ```ts
|
|
14377
14389
|
* @Component({
|
|
14378
14390
|
* selector: 'my-comp',
|
|
14379
14391
|
* templateUrl: 'my-comp.html', // This requires asynchronous resolution
|
|
@@ -14412,7 +14424,7 @@ export declare function ɵrestoreComponentResolutionQueue(queue: Map<Type<any>,
|
|
|
14412
14424
|
* Formats and outputs the error message in a consistent way.
|
|
14413
14425
|
*
|
|
14414
14426
|
* Example:
|
|
14415
|
-
* ```
|
|
14427
|
+
* ```ts
|
|
14416
14428
|
* throw new RuntimeError(
|
|
14417
14429
|
* RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED,
|
|
14418
14430
|
* ngDevMode && 'Injector has already been destroyed.');
|
|
@@ -14719,6 +14731,10 @@ export declare interface ɵTracingService<T extends ɵTracingSnapshot> {
|
|
|
14719
14731
|
* used when additional work is performed that was scheduled in this context.
|
|
14720
14732
|
*
|
|
14721
14733
|
* @param linkedSnapshot Optional snapshot to use link to the current context.
|
|
14734
|
+
* The caller is no longer responsible for calling dispose on the linkedSnapshot.
|
|
14735
|
+
*
|
|
14736
|
+
* @return The tracing snapshot. The caller is responsible for diposing of the
|
|
14737
|
+
* snapshot.
|
|
14722
14738
|
*/
|
|
14723
14739
|
snapshot(linkedSnapshot: T | null): T;
|
|
14724
14740
|
}
|
|
@@ -14726,6 +14742,8 @@ export declare interface ɵTracingService<T extends ɵTracingSnapshot> {
|
|
|
14726
14742
|
/** A single tracing snapshot. */
|
|
14727
14743
|
export declare interface ɵTracingSnapshot {
|
|
14728
14744
|
run<T>(action: ɵTracingAction, fn: () => T): T;
|
|
14745
|
+
/** Disposes of the tracing snapshot. Must be run exactly once per TracingSnapshot. */
|
|
14746
|
+
dispose(): void;
|
|
14729
14747
|
}
|
|
14730
14748
|
|
|
14731
14749
|
/**
|
|
@@ -14846,7 +14864,7 @@ export declare class ɵViewRef<T> implements EmbeddedViewRef<T>, ChangeDetectorR
|
|
|
14846
14864
|
* @usageNotes
|
|
14847
14865
|
* ### Example
|
|
14848
14866
|
*
|
|
14849
|
-
* ```
|
|
14867
|
+
* ```ts
|
|
14850
14868
|
* @Component({
|
|
14851
14869
|
* selector: 'app-root',
|
|
14852
14870
|
* template: `Number of ticks: {{numberOfTicks}}`
|
|
@@ -14886,7 +14904,7 @@ export declare class ɵViewRef<T> implements EmbeddedViewRef<T>, ChangeDetectorR
|
|
|
14886
14904
|
* we want to check and update the list every five seconds. We can do that by detaching
|
|
14887
14905
|
* the component's change detector and doing a local check every five seconds.
|
|
14888
14906
|
*
|
|
14889
|
-
* ```
|
|
14907
|
+
* ```ts
|
|
14890
14908
|
* class DataProvider {
|
|
14891
14909
|
* // in a real application the returned data will be different every time
|
|
14892
14910
|
* get data() {
|
|
@@ -14936,7 +14954,7 @@ export declare class ɵViewRef<T> implements EmbeddedViewRef<T>, ChangeDetectorR
|
|
|
14936
14954
|
* its change detector from the main change detector tree when the component's live property
|
|
14937
14955
|
* is set to false.
|
|
14938
14956
|
*
|
|
14939
|
-
* ```
|
|
14957
|
+
* ```ts
|
|
14940
14958
|
* class DataProvider {
|
|
14941
14959
|
* data = 1;
|
|
14942
14960
|
*
|
|
@@ -15012,16 +15030,6 @@ export declare class ɵViewRef<T> implements EmbeddedViewRef<T>, ChangeDetectorR
|
|
|
15012
15030
|
attachToAppRef(appRef: ApplicationRef): void;
|
|
15013
15031
|
}
|
|
15014
15032
|
|
|
15015
|
-
/**
|
|
15016
|
-
* Returns a Promise that resolves when the application becomes stable after this method is called
|
|
15017
|
-
* the first time.
|
|
15018
|
-
*
|
|
15019
|
-
* Note: this function is unused in the FW code, but it's still present since the CLI code relies
|
|
15020
|
-
* on it currently (see https://github.com/angular/angular-cli/blob/20411f696eb52c500e096e3dfc5e195185794edc/packages/angular/ssr/src/routes/ng-routes.ts#L435).
|
|
15021
|
-
* Remove this function once CLI code is updated to use `ApplicationRef.whenStable` instead.
|
|
15022
|
-
*/
|
|
15023
|
-
export declare function ɵwhenStable(applicationRef: ApplicationRef): Promise<void>;
|
|
15024
|
-
|
|
15025
15033
|
/**
|
|
15026
15034
|
* Returns a set of providers required to setup hydration support
|
|
15027
15035
|
* for an application that is server side rendered. This function is
|
|
@@ -15060,18 +15068,18 @@ export declare function ɵwithIncrementalHydration(): Provider[];
|
|
|
15060
15068
|
*
|
|
15061
15069
|
* USAGE:
|
|
15062
15070
|
* Given:
|
|
15063
|
-
* ```
|
|
15071
|
+
* ```ts
|
|
15064
15072
|
* interface Person {readonly name: string}
|
|
15065
15073
|
* ```
|
|
15066
15074
|
*
|
|
15067
15075
|
* We would like to get a read/write version of `Person`.
|
|
15068
|
-
* ```
|
|
15076
|
+
* ```ts
|
|
15069
15077
|
* const WritablePerson = Writable<Person>;
|
|
15070
15078
|
* ```
|
|
15071
15079
|
*
|
|
15072
15080
|
* The result is that you can do:
|
|
15073
15081
|
*
|
|
15074
|
-
* ```
|
|
15082
|
+
* ```ts
|
|
15075
15083
|
* const readonlyPerson: Person = {name: 'Marry'};
|
|
15076
15084
|
* readonlyPerson.name = 'John'; // TypeError
|
|
15077
15085
|
* (readonlyPerson as WritablePerson).name = 'John'; // OK
|
|
@@ -15846,10 +15854,13 @@ export declare function ɵɵdeclareLet(index: number): typeof ɵɵdeclareLet;
|
|
|
15846
15854
|
* placeholder block.
|
|
15847
15855
|
* @param enableTimerScheduling Function that enables timer-related scheduling if `after`
|
|
15848
15856
|
* or `minimum` parameters are setup on the `@loading` or `@placeholder` blocks.
|
|
15857
|
+
* @param flags A set of flags to define a particular behavior (e.g. to indicate that
|
|
15858
|
+
* hydrate triggers are present and regular triggers should be deactivated
|
|
15859
|
+
* in certain scenarios).
|
|
15849
15860
|
*
|
|
15850
15861
|
* @codeGenApi
|
|
15851
15862
|
*/
|
|
15852
|
-
export declare function ɵɵdefer(index: number, primaryTmplIndex: number, dependencyResolverFn?: DependencyResolverFn | null, loadingTmplIndex?: number | null, placeholderTmplIndex?: number | null, errorTmplIndex?: number | null, loadingConfigIndex?: number | null, placeholderConfigIndex?: number | null, enableTimerScheduling?: typeof ɵɵdeferEnableTimerScheduling): void;
|
|
15863
|
+
export declare function ɵɵdefer(index: number, primaryTmplIndex: number, dependencyResolverFn?: DependencyResolverFn | null, loadingTmplIndex?: number | null, placeholderTmplIndex?: number | null, errorTmplIndex?: number | null, loadingConfigIndex?: number | null, placeholderConfigIndex?: number | null, enableTimerScheduling?: typeof ɵɵdeferEnableTimerScheduling, flags?: TDeferDetailsFlags | null): void;
|
|
15853
15864
|
|
|
15854
15865
|
/**
|
|
15855
15866
|
* Enables timer-related scheduling if `after` or `minimum` parameters are setup
|
|
@@ -16009,7 +16020,7 @@ export declare function ɵɵdeferWhen(rawValue: unknown): void;
|
|
|
16009
16020
|
*
|
|
16010
16021
|
*
|
|
16011
16022
|
* # Example
|
|
16012
|
-
* ```
|
|
16023
|
+
* ```ts
|
|
16013
16024
|
* class MyComponent {
|
|
16014
16025
|
* // Generated by Angular Template Compiler
|
|
16015
16026
|
* // [Symbol] syntax will not be supported by TypeScript until v2.7
|
|
@@ -16113,7 +16124,7 @@ export declare function ɵɵdefineNgModule<T>(def: {
|
|
|
16113
16124
|
* Create a pipe definition object.
|
|
16114
16125
|
*
|
|
16115
16126
|
* # Example
|
|
16116
|
-
* ```
|
|
16127
|
+
* ```ts
|
|
16117
16128
|
* class MyPipe implements PipeTransform {
|
|
16118
16129
|
* // Generated by Angular Template Compiler
|
|
16119
16130
|
* static ɵpipe = definePipe({
|
|
@@ -16184,7 +16195,7 @@ export declare function ɵɵdirectiveInject<T>(token: ProviderToken<T>, flags: I
|
|
|
16184
16195
|
* Disables directive matching on element.
|
|
16185
16196
|
*
|
|
16186
16197
|
* * Example:
|
|
16187
|
-
* ```
|
|
16198
|
+
* ```html
|
|
16188
16199
|
* <my-comp my-directive>
|
|
16189
16200
|
* Should match component / directive.
|
|
16190
16201
|
* </my-comp>
|
|
@@ -16282,7 +16293,7 @@ export declare function ɵɵelementStart(index: number, name: string, attrsIndex
|
|
|
16282
16293
|
* Enables directive matching on elements.
|
|
16283
16294
|
*
|
|
16284
16295
|
* * Example:
|
|
16285
|
-
* ```
|
|
16296
|
+
* ```html
|
|
16286
16297
|
* <my-comp my-directive>
|
|
16287
16298
|
* Should match component / directive.
|
|
16288
16299
|
* </my-comp>
|
|
@@ -16789,7 +16800,7 @@ export declare type ɵɵNgModuleDeclaration<T, Declarations, Imports, Exports> =
|
|
|
16789
16800
|
*
|
|
16790
16801
|
* Example usage:
|
|
16791
16802
|
*
|
|
16792
|
-
* ```
|
|
16803
|
+
* ```ts
|
|
16793
16804
|
* static ɵcmp = defineComponent({
|
|
16794
16805
|
* ...
|
|
16795
16806
|
* inputs: {name: 'publicName'},
|
|
@@ -17663,11 +17674,11 @@ export declare function ɵɵrepeaterTrackByIndex(index: number): number;
|
|
|
17663
17674
|
* Replaces the metadata of a component type and re-renders all live instances of the component.
|
|
17664
17675
|
* @param type Class whose metadata will be replaced.
|
|
17665
17676
|
* @param applyMetadata Callback that will apply a new set of metadata on the `type` when invoked.
|
|
17666
|
-
* @param environment
|
|
17677
|
+
* @param environment Syntehtic namespace imports that need to be passed along to the callback.
|
|
17667
17678
|
* @param locals Local symbols from the source location that have to be exposed to the callback.
|
|
17668
17679
|
* @codeGenApi
|
|
17669
17680
|
*/
|
|
17670
|
-
export declare function ɵɵreplaceMetadata(type: Type<unknown>, applyMetadata: (...args: [Type<unknown>,
|
|
17681
|
+
export declare function ɵɵreplaceMetadata(type: Type<unknown>, applyMetadata: (...args: [Type<unknown>, unknown[], ...unknown[]]) => void, namespaces: unknown[], locals: unknown[]): void;
|
|
17671
17682
|
|
|
17672
17683
|
/**
|
|
17673
17684
|
* Clears the view set in `ɵɵrestoreView` from memory. Returns the passed in
|