@angular/core 19.0.2 → 19.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/core.mjs +93 -95
- 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 +10 -10
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +111 -120
- 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-a00b735e.js → checker-c58f97d2.js} +30 -30
- package/schematics/bundles/{combine_units-60865867.js → combine_units-7f681271.js} +3 -3
- package/schematics/bundles/{compiler_host-3e96c3f7.js → compiler_host-f5d588fe.js} +2 -2
- package/schematics/bundles/control-flow-migration.js +3 -3
- package/schematics/bundles/explicit-standalone-flag.js +4 -4
- package/schematics/bundles/{imports-44987700.js → imports-31a38653.js} +2 -2
- package/schematics/bundles/inject-migration.js +9 -9
- package/schematics/bundles/leading_space-6e7a8ec6.js +1 -1
- package/schematics/bundles/{migrate_ts_type_references-676612f5.js → migrate_ts_type_references-4ddf2b3b.js} +8 -8
- package/schematics/bundles/{nodes-b12e919a.js → nodes-88c2157f.js} +2 -2
- package/schematics/bundles/output-migration.js +4 -4
- package/schematics/bundles/pending-tasks.js +4 -4
- package/schematics/bundles/{program-a6be5d4a.js → program-4ee751e4.js} +18 -16
- package/schematics/bundles/project_tsconfig_paths-6c9cde78.js +1 -1
- package/schematics/bundles/provide-initializer.js +4 -4
- package/schematics/bundles/route-lazy-loading.js +3 -3
- package/schematics/bundles/signal-input-migration.js +6 -6
- package/schematics/bundles/signal-queries-migration.js +5 -5
- package/schematics/bundles/signals.js +5 -5
- package/schematics/bundles/standalone-migration.js +7 -7
- 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.4
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -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>`,
|
|
@@ -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>`,
|
|
@@ -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>`,
|
|
@@ -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>`,
|
|
@@ -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),
|
|
@@ -1277,7 +1277,7 @@ export declare interface AttributeDecorator {
|
|
|
1277
1277
|
* Intended to be used as a transform function of an input.
|
|
1278
1278
|
*
|
|
1279
1279
|
* @usageNotes
|
|
1280
|
-
* ```
|
|
1280
|
+
* ```ts
|
|
1281
1281
|
* @Input({ transform: booleanAttribute }) status!: boolean;
|
|
1282
1282
|
* ```
|
|
1283
1283
|
* @param value Value to be transformed.
|
|
@@ -1408,8 +1408,7 @@ declare type ChangeDetectionStrategy_2 = number;
|
|
|
1408
1408
|
* (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check
|
|
1409
1409
|
* after an interval.
|
|
1410
1410
|
*
|
|
1411
|
-
*
|
|
1412
|
-
* region="mark-for-check"></code-example>
|
|
1411
|
+
* {@example core/ts/change_detect/change-detection.ts region='mark-for-check'}
|
|
1413
1412
|
*
|
|
1414
1413
|
* ### Detach change detector to limit how often check occurs
|
|
1415
1414
|
*
|
|
@@ -1419,7 +1418,7 @@ declare type ChangeDetectionStrategy_2 = number;
|
|
|
1419
1418
|
* less often than the changes actually occur. To do that, we detach
|
|
1420
1419
|
* the component's change detector and perform an explicit local check every five seconds.
|
|
1421
1420
|
*
|
|
1422
|
-
*
|
|
1421
|
+
* {@example core/ts/change_detect/change-detection.ts region='detach'}
|
|
1423
1422
|
*
|
|
1424
1423
|
*
|
|
1425
1424
|
* ### Reattaching a detached component
|
|
@@ -1429,7 +1428,7 @@ declare type ChangeDetectionStrategy_2 = number;
|
|
|
1429
1428
|
* when the `live` property is set to false, and reattaches it when the property
|
|
1430
1429
|
* becomes true.
|
|
1431
1430
|
*
|
|
1432
|
-
*
|
|
1431
|
+
* {@example core/ts/change_detect/change-detection.ts region='reattach'}
|
|
1433
1432
|
*
|
|
1434
1433
|
* @publicApi
|
|
1435
1434
|
*/
|
|
@@ -1799,7 +1798,7 @@ export declare interface ComponentDecorator {
|
|
|
1799
1798
|
* The following example creates a component with two data-bound properties,
|
|
1800
1799
|
* specified by the `inputs` value.
|
|
1801
1800
|
*
|
|
1802
|
-
*
|
|
1801
|
+
* {@example core/ts/metadata/directives.ts region='component-input'}
|
|
1803
1802
|
*
|
|
1804
1803
|
*
|
|
1805
1804
|
* ### Setting component outputs
|
|
@@ -2556,7 +2555,7 @@ declare const CONTEXT = 8;
|
|
|
2556
2555
|
* Note: the example uses standalone components, but the function can also be used for
|
|
2557
2556
|
* non-standalone components (declared in an NgModule) as well.
|
|
2558
2557
|
*
|
|
2559
|
-
* ```
|
|
2558
|
+
* ```angular-ts
|
|
2560
2559
|
* @Component({
|
|
2561
2560
|
* standalone: true,
|
|
2562
2561
|
* template: `Hello {{ name }}!`
|
|
@@ -2996,7 +2995,7 @@ declare const DECLARATION_VIEW = 14;
|
|
|
2996
2995
|
* @usageNotes
|
|
2997
2996
|
* ### Example
|
|
2998
2997
|
*
|
|
2999
|
-
* ```
|
|
2998
|
+
* ```ts
|
|
3000
2999
|
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
3001
3000
|
* import { AppModule } from './app/app.module';
|
|
3002
3001
|
*
|
|
@@ -3342,7 +3341,7 @@ export declare abstract class DestroyRef {
|
|
|
3342
3341
|
*
|
|
3343
3342
|
* @usageNotes
|
|
3344
3343
|
* ### Example
|
|
3345
|
-
* ```
|
|
3344
|
+
* ```ts
|
|
3346
3345
|
* const destroyRef = inject(DestroyRef);
|
|
3347
3346
|
*
|
|
3348
3347
|
* // register a destroy callback
|
|
@@ -3412,7 +3411,7 @@ export declare interface Directive {
|
|
|
3412
3411
|
*
|
|
3413
3412
|
* The following example creates a component with two data-bound properties.
|
|
3414
3413
|
*
|
|
3415
|
-
* ```
|
|
3414
|
+
* ```ts
|
|
3416
3415
|
* @Component({
|
|
3417
3416
|
* selector: 'bank-account',
|
|
3418
3417
|
* inputs: ['bankName', {name: 'id', alias: 'account-id'}],
|
|
@@ -3448,7 +3447,7 @@ export declare interface Directive {
|
|
|
3448
3447
|
*
|
|
3449
3448
|
* @usageNotes
|
|
3450
3449
|
*
|
|
3451
|
-
* ```
|
|
3450
|
+
* ```ts
|
|
3452
3451
|
* @Component({
|
|
3453
3452
|
* selector: 'child-dir',
|
|
3454
3453
|
* outputs: [ 'bankNameChange' ],
|
|
@@ -3832,7 +3831,7 @@ declare type DirectiveDefListOrFactory = (() => DirectiveDefList) | DirectiveDef
|
|
|
3832
3831
|
* Map of inputs for a given directive/component.
|
|
3833
3832
|
*
|
|
3834
3833
|
* Given:
|
|
3835
|
-
* ```
|
|
3834
|
+
* ```ts
|
|
3836
3835
|
* class MyComponent {
|
|
3837
3836
|
* @Input()
|
|
3838
3837
|
* publicInput1: string;
|
|
@@ -3848,7 +3847,7 @@ declare type DirectiveDefListOrFactory = (() => DirectiveDefList) | DirectiveDef
|
|
|
3848
3847
|
* ```
|
|
3849
3848
|
*
|
|
3850
3849
|
* is described as:
|
|
3851
|
-
* ```
|
|
3850
|
+
* ```ts
|
|
3852
3851
|
* {
|
|
3853
3852
|
* publicInput1: 'publicInput1',
|
|
3854
3853
|
* declaredInput2: [InputFlags.None, 'declaredInput2', 'publicInput2'],
|
|
@@ -3863,7 +3862,7 @@ declare type DirectiveDefListOrFactory = (() => DirectiveDefList) | DirectiveDef
|
|
|
3863
3862
|
* ```
|
|
3864
3863
|
*
|
|
3865
3864
|
* Which the minifier may translate to:
|
|
3866
|
-
* ```
|
|
3865
|
+
* ```ts
|
|
3867
3866
|
* {
|
|
3868
3867
|
* minifiedPublicInput1: 'publicInput1',
|
|
3869
3868
|
* minifiedDeclaredInput2: [InputFlags.None, 'publicInput2', 'declaredInput2'],
|
|
@@ -3910,7 +3909,7 @@ declare const DISCONNECTED_NODES = "d";
|
|
|
3910
3909
|
* The example below uses `ApplicationRef.bootstrap()` to render the
|
|
3911
3910
|
* `AppComponent` on the page.
|
|
3912
3911
|
*
|
|
3913
|
-
* ```
|
|
3912
|
+
* ```ts
|
|
3914
3913
|
* class AppModule implements DoBootstrap {
|
|
3915
3914
|
* ngDoBootstrap(appRef: ApplicationRef) {
|
|
3916
3915
|
* appRef.bootstrap(AppComponent); // Or some other component
|
|
@@ -4089,7 +4088,7 @@ declare const EMBEDDED_VIEW_INJECTOR = 20;
|
|
|
4089
4088
|
* The following template breaks down into two separate `TemplateRef` instances,
|
|
4090
4089
|
* an outer one and an inner one.
|
|
4091
4090
|
*
|
|
4092
|
-
* ```
|
|
4091
|
+
* ```html
|
|
4093
4092
|
* Count: {{items.length}}
|
|
4094
4093
|
* <ul>
|
|
4095
4094
|
* <li *ngFor="let item of items">{{item}}</li>
|
|
@@ -4098,7 +4097,7 @@ declare const EMBEDDED_VIEW_INJECTOR = 20;
|
|
|
4098
4097
|
*
|
|
4099
4098
|
* This is the outer `TemplateRef`:
|
|
4100
4099
|
*
|
|
4101
|
-
* ```
|
|
4100
|
+
* ```html
|
|
4102
4101
|
* Count: {{items.length}}
|
|
4103
4102
|
* <ul>
|
|
4104
4103
|
* <ng-template ngFor let-item [ngForOf]="items"></ng-template>
|
|
@@ -4107,13 +4106,13 @@ declare const EMBEDDED_VIEW_INJECTOR = 20;
|
|
|
4107
4106
|
*
|
|
4108
4107
|
* This is the inner `TemplateRef`:
|
|
4109
4108
|
*
|
|
4110
|
-
* ```
|
|
4109
|
+
* ```html
|
|
4111
4110
|
* <li>{{item}}</li>
|
|
4112
4111
|
* ```
|
|
4113
4112
|
*
|
|
4114
4113
|
* The outer and inner `TemplateRef` instances are assembled into views as follows:
|
|
4115
4114
|
*
|
|
4116
|
-
* ```
|
|
4115
|
+
* ```html
|
|
4117
4116
|
* <!-- ViewRef: outer-0 -->
|
|
4118
4117
|
* Count: 2
|
|
4119
4118
|
* <ul>
|
|
@@ -4250,7 +4249,7 @@ export declare type EnvironmentProviders = {
|
|
|
4250
4249
|
* @usageNotes
|
|
4251
4250
|
* ### Example
|
|
4252
4251
|
*
|
|
4253
|
-
* ```
|
|
4252
|
+
* ```ts
|
|
4254
4253
|
* class MyErrorHandler implements ErrorHandler {
|
|
4255
4254
|
* handleError(error) {
|
|
4256
4255
|
* // do something with the exception
|
|
@@ -4294,7 +4293,7 @@ declare interface EventContractDetails {
|
|
|
4294
4293
|
* that create event emitters. When the title is clicked, the emitter
|
|
4295
4294
|
* emits an open or close event to toggle the current visibility state.
|
|
4296
4295
|
*
|
|
4297
|
-
* ```
|
|
4296
|
+
* ```angular-ts
|
|
4298
4297
|
* @Component({
|
|
4299
4298
|
* selector: 'zippy',
|
|
4300
4299
|
* template: `
|
|
@@ -4497,7 +4496,7 @@ declare const FLAGS = 2;
|
|
|
4497
4496
|
* {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
|
|
4498
4497
|
*
|
|
4499
4498
|
* ### Circular standalone reference import example
|
|
4500
|
-
* ```ts
|
|
4499
|
+
* ```angular-ts
|
|
4501
4500
|
* @Component({
|
|
4502
4501
|
* standalone: true,
|
|
4503
4502
|
* imports: [ChildComponent],
|
|
@@ -4842,7 +4841,7 @@ export declare const Host: HostDecorator;
|
|
|
4842
4841
|
*
|
|
4843
4842
|
* @usageNotes
|
|
4844
4843
|
* ### Injecting a tag name that is known to exist
|
|
4845
|
-
* ```
|
|
4844
|
+
* ```ts
|
|
4846
4845
|
* @Directive()
|
|
4847
4846
|
* class MyDir {
|
|
4848
4847
|
* tagName: string = inject(HOST_TAG_NAME);
|
|
@@ -4850,7 +4849,7 @@ export declare const Host: HostDecorator;
|
|
|
4850
4849
|
* ```
|
|
4851
4850
|
*
|
|
4852
4851
|
* ### Optionally injecting a tag name
|
|
4853
|
-
* ```
|
|
4852
|
+
* ```ts
|
|
4854
4853
|
* @Directive()
|
|
4855
4854
|
* class MyDir {
|
|
4856
4855
|
* tagName: string | null = inject(HOST_TAG_NAME, {optional: true});
|
|
@@ -4865,7 +4864,7 @@ export declare const HOST_TAG_NAME: InjectionToken<string>;
|
|
|
4865
4864
|
*
|
|
4866
4865
|
* @usageNotes
|
|
4867
4866
|
* ### Injecting an attribute that is known to exist
|
|
4868
|
-
* ```
|
|
4867
|
+
* ```ts
|
|
4869
4868
|
* @Directive()
|
|
4870
4869
|
* class MyDir {
|
|
4871
4870
|
* attr: string = inject(new HostAttributeToken('some-attr'));
|
|
@@ -4873,7 +4872,7 @@ export declare const HOST_TAG_NAME: InjectionToken<string>;
|
|
|
4873
4872
|
* ```
|
|
4874
4873
|
*
|
|
4875
4874
|
* ### Optionally injecting an attribute
|
|
4876
|
-
* ```
|
|
4875
|
+
* ```ts
|
|
4877
4876
|
* @Directive()
|
|
4878
4877
|
* class MyDir {
|
|
4879
4878
|
* attr: string | null = inject(new HostAttributeToken('some-attr'), {optional: true});
|
|
@@ -4925,7 +4924,7 @@ export declare interface HostBindingDecorator {
|
|
|
4925
4924
|
* The following example creates a directive that sets the `valid` and `invalid`
|
|
4926
4925
|
* class, a style color, and an id on the DOM element that has an `ngModel` directive on it.
|
|
4927
4926
|
*
|
|
4928
|
-
* ```
|
|
4927
|
+
* ```ts
|
|
4929
4928
|
* @Directive({selector: '[ngModel]'})
|
|
4930
4929
|
* class NgModelStatus {
|
|
4931
4930
|
* constructor(public control: NgModel) {}
|
|
@@ -4988,7 +4987,7 @@ export declare interface HostBindingDecorator {
|
|
|
4988
4987
|
*
|
|
4989
4988
|
* ## Example
|
|
4990
4989
|
*
|
|
4991
|
-
* ```
|
|
4990
|
+
* ```ts
|
|
4992
4991
|
* const hostBindingOpCodes = [
|
|
4993
4992
|
* ~30, // Select element 30
|
|
4994
4993
|
* 40, 45, MyDir.ɵdir.hostBindings // Invoke host bindings on MyDir on element 30;
|
|
@@ -4999,7 +4998,7 @@ export declare interface HostBindingDecorator {
|
|
|
4999
4998
|
* ```
|
|
5000
4999
|
*
|
|
5001
5000
|
* ## Pseudocode
|
|
5002
|
-
* ```
|
|
5001
|
+
* ```ts
|
|
5003
5002
|
* const hostBindingOpCodes = tView.hostBindingOpCodes;
|
|
5004
5003
|
* if (hostBindingOpCodes === null) return;
|
|
5005
5004
|
* for (let i = 0; i < hostBindingOpCodes.length; i++) {
|
|
@@ -5042,8 +5041,7 @@ export declare interface HostDecorator {
|
|
|
5042
5041
|
*
|
|
5043
5042
|
* The following shows use with the `@Optional` decorator, and allows for a `null` result.
|
|
5044
5043
|
*
|
|
5045
|
-
*
|
|
5046
|
-
* </code-example>
|
|
5044
|
+
* {@example core/di/ts/metadata_spec.ts region='Host'}
|
|
5047
5045
|
*
|
|
5048
5046
|
* For an extended example, see ["Dependency Injection
|
|
5049
5047
|
* Guide"](guide/di/di-in-action#optional).
|
|
@@ -5232,7 +5230,7 @@ declare const I18N_DATA = "l";
|
|
|
5232
5230
|
* The number is shifted and encoded according to `I18nCreateOpCode`
|
|
5233
5231
|
*
|
|
5234
5232
|
* Pseudocode:
|
|
5235
|
-
* ```
|
|
5233
|
+
* ```ts
|
|
5236
5234
|
* const i18nCreateOpCodes = [
|
|
5237
5235
|
* 10 << I18nCreateOpCode.SHIFT, "Text Node add to DOM",
|
|
5238
5236
|
* 11 << I18nCreateOpCode.SHIFT | I18nCreateOpCode.COMMENT, "Comment Node add to DOM",
|
|
@@ -5523,7 +5521,7 @@ export declare type ImportedNgModuleProviders = EnvironmentProviders;
|
|
|
5523
5521
|
* @usageNotes
|
|
5524
5522
|
* The results of the `importProvidersFrom` call can be used in the `bootstrapApplication` call:
|
|
5525
5523
|
*
|
|
5526
|
-
* ```
|
|
5524
|
+
* ```ts
|
|
5527
5525
|
* await bootstrapApplication(RootComponent, {
|
|
5528
5526
|
* providers: [
|
|
5529
5527
|
* importProvidersFrom(NgModuleOne, NgModuleTwo)
|
|
@@ -5534,7 +5532,7 @@ export declare type ImportedNgModuleProviders = EnvironmentProviders;
|
|
|
5534
5532
|
* You can also use the `importProvidersFrom` results in the `providers` field of a route, when a
|
|
5535
5533
|
* standalone component is used:
|
|
5536
5534
|
*
|
|
5537
|
-
* ```
|
|
5535
|
+
* ```ts
|
|
5538
5536
|
* export const ROUTES: Route[] = [
|
|
5539
5537
|
* {
|
|
5540
5538
|
* path: 'foo',
|
|
@@ -5748,7 +5746,7 @@ export declare interface InjectableDecorator {
|
|
|
5748
5746
|
* The following example shows how a service class is properly
|
|
5749
5747
|
* marked so that a supporting service can be injected upon creation.
|
|
5750
5748
|
*
|
|
5751
|
-
*
|
|
5749
|
+
* {@example core/di/ts/metadata_spec.ts region='Injectable'}
|
|
5752
5750
|
*
|
|
5753
5751
|
*/
|
|
5754
5752
|
(): TypeDecorator;
|
|
@@ -5801,8 +5799,7 @@ export declare interface InjectDecorator {
|
|
|
5801
5799
|
* When `@Inject()` is not present, the injector uses the type annotation of the
|
|
5802
5800
|
* parameter as the provider.
|
|
5803
5801
|
*
|
|
5804
|
-
*
|
|
5805
|
-
* </code-example>
|
|
5802
|
+
* {@example core/di/ts/metadata_spec.ts region='InjectWithoutDecorator'}
|
|
5806
5803
|
*
|
|
5807
5804
|
* @see [Dependency Injection Guide](guide/di/dependency-injection
|
|
5808
5805
|
*
|
|
@@ -5882,8 +5879,7 @@ export declare enum InjectFlags {
|
|
|
5882
5879
|
*
|
|
5883
5880
|
* </div>
|
|
5884
5881
|
*
|
|
5885
|
-
*
|
|
5886
|
-
* region="InjectionToken"></code-example>
|
|
5882
|
+
* {@example injection-token/src/main.ts region='InjectionToken'}
|
|
5887
5883
|
*
|
|
5888
5884
|
* When creating an `InjectionToken`, you can optionally specify a factory function which returns
|
|
5889
5885
|
* (possibly by creating) a default value of the parameterized type `T`. This sets up the
|
|
@@ -6132,7 +6128,7 @@ export declare const Input: InputDecorator;
|
|
|
6132
6128
|
* @usageNotes
|
|
6133
6129
|
* To use signal-based inputs, import `input` from `@angular/core`.
|
|
6134
6130
|
*
|
|
6135
|
-
* ```
|
|
6131
|
+
* ```ts
|
|
6136
6132
|
* import {input} from '@angular/core`;
|
|
6137
6133
|
* ```
|
|
6138
6134
|
*
|
|
@@ -6181,7 +6177,7 @@ export declare interface InputDecorator {
|
|
|
6181
6177
|
* The following example creates a component with two input properties,
|
|
6182
6178
|
* one of which is given a special binding name.
|
|
6183
6179
|
*
|
|
6184
|
-
* ```
|
|
6180
|
+
* ```ts
|
|
6185
6181
|
* import { Component, Input, numberAttribute, booleanAttribute } from '@angular/core';
|
|
6186
6182
|
* @Component({
|
|
6187
6183
|
* selector: 'bank-account',
|
|
@@ -6859,7 +6855,7 @@ declare interface Listener {
|
|
|
6859
6855
|
* @usageNotes
|
|
6860
6856
|
* ### Example
|
|
6861
6857
|
*
|
|
6862
|
-
* ```
|
|
6858
|
+
* ```ts
|
|
6863
6859
|
* import { LOCALE_ID } from '@angular/core';
|
|
6864
6860
|
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
6865
6861
|
* import { AppModule } from './app/app.module';
|
|
@@ -7285,7 +7281,7 @@ export declare function makeEnvironmentProviders(providers: (Provider | Environm
|
|
|
7285
7281
|
*
|
|
7286
7282
|
* Example:
|
|
7287
7283
|
*
|
|
7288
|
-
* ```
|
|
7284
|
+
* ```ts
|
|
7289
7285
|
* const COUNTER_KEY = makeStateKey<number>('counter');
|
|
7290
7286
|
* let value = 10;
|
|
7291
7287
|
*
|
|
@@ -7317,7 +7313,7 @@ export declare function mergeApplicationConfig(...configs: ApplicationConfig[]):
|
|
|
7317
7313
|
*
|
|
7318
7314
|
* @usageNotes
|
|
7319
7315
|
* ### Example
|
|
7320
|
-
* ```
|
|
7316
|
+
* ```ts
|
|
7321
7317
|
* import { MissingTranslationStrategy } from '@angular/core';
|
|
7322
7318
|
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
7323
7319
|
* import { AppModule } from './app/app.module';
|
|
@@ -7346,7 +7342,7 @@ export declare enum MissingTranslationStrategy {
|
|
|
7346
7342
|
*
|
|
7347
7343
|
* To use `model()`, import the function from `@angular/core`.
|
|
7348
7344
|
*
|
|
7349
|
-
* ```
|
|
7345
|
+
* ```ts
|
|
7350
7346
|
* import {model} from '@angular/core`;
|
|
7351
7347
|
* ```
|
|
7352
7348
|
*
|
|
@@ -7788,7 +7784,7 @@ export declare class NgProbeToken {
|
|
|
7788
7784
|
* @usageNotes
|
|
7789
7785
|
* ### Example
|
|
7790
7786
|
*
|
|
7791
|
-
* ```
|
|
7787
|
+
* ```ts
|
|
7792
7788
|
* import {Component, NgZone} from '@angular/core';
|
|
7793
7789
|
* import {NgIf} from '@angular/common';
|
|
7794
7790
|
*
|
|
@@ -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:
|
|
@@ -8413,24 +8408,6 @@ export declare class PendingTasks {
|
|
|
8413
8408
|
static ɵprov: unknown;
|
|
8414
8409
|
}
|
|
8415
8410
|
|
|
8416
|
-
/**
|
|
8417
|
-
* Internal implementation of the pending tasks service.
|
|
8418
|
-
*/
|
|
8419
|
-
declare class PendingTasksInternal implements OnDestroy {
|
|
8420
|
-
private taskId;
|
|
8421
|
-
private pendingTasks;
|
|
8422
|
-
private get _hasPendingTasks();
|
|
8423
|
-
hasPendingTasks: BehaviorSubject<boolean>;
|
|
8424
|
-
add(): number;
|
|
8425
|
-
has(taskId: number): boolean;
|
|
8426
|
-
remove(taskId: number): void;
|
|
8427
|
-
ngOnDestroy(): void;
|
|
8428
|
-
/** @nocollapse */
|
|
8429
|
-
static ɵprov: unknown;
|
|
8430
|
-
}
|
|
8431
|
-
export { PendingTasksInternal as ɵPendingTasks }
|
|
8432
|
-
export { PendingTasksInternal as ɵPendingTasksInternal }
|
|
8433
|
-
|
|
8434
8411
|
/**
|
|
8435
8412
|
* Type of the Pipe metadata.
|
|
8436
8413
|
*
|
|
@@ -8484,7 +8461,7 @@ export declare interface PipeDecorator {
|
|
|
8484
8461
|
* For example, if the name is "myPipe", use a template binding expression
|
|
8485
8462
|
* such as the following:
|
|
8486
8463
|
*
|
|
8487
|
-
* ```
|
|
8464
|
+
* ```html
|
|
8488
8465
|
* {{ exp | myPipe }}
|
|
8489
8466
|
* ```
|
|
8490
8467
|
*
|
|
@@ -8600,7 +8577,7 @@ export declare class PlatformRef {
|
|
|
8600
8577
|
* @usageNotes
|
|
8601
8578
|
* ### Simple Example
|
|
8602
8579
|
*
|
|
8603
|
-
* ```
|
|
8580
|
+
* ```ts
|
|
8604
8581
|
* @NgModule({
|
|
8605
8582
|
* imports: [BrowserModule]
|
|
8606
8583
|
* })
|
|
@@ -8713,7 +8690,7 @@ declare type ProjectionSlots = (ɵCssSelectorList | '*')[];
|
|
|
8713
8690
|
* @usageNotes
|
|
8714
8691
|
* The following example illustrates how to configure an initialization function using
|
|
8715
8692
|
* `provideAppInitializer()`
|
|
8716
|
-
* ```
|
|
8693
|
+
* ```ts
|
|
8717
8694
|
* bootstrapApplication(App, {
|
|
8718
8695
|
* providers: [
|
|
8719
8696
|
* provideAppInitializer(() => {
|
|
@@ -8747,7 +8724,7 @@ export declare function provideAppInitializer(initializerFn: () => Observable<un
|
|
|
8747
8724
|
* @usageNotes
|
|
8748
8725
|
* The following example illustrates how to configure an initialization function using
|
|
8749
8726
|
* `provideEnvironmentInitializer()`
|
|
8750
|
-
* ```
|
|
8727
|
+
* ```ts
|
|
8751
8728
|
* createEnvironmentInjector(
|
|
8752
8729
|
* [
|
|
8753
8730
|
* provideEnvironmentInitializer(() => {
|
|
@@ -8813,7 +8790,7 @@ export declare function provideExperimentalCheckNoChangesForDebug(options: {
|
|
|
8813
8790
|
* - registering a render hook (templates are only refreshed if render hooks do one of the above)
|
|
8814
8791
|
*
|
|
8815
8792
|
* @usageNotes
|
|
8816
|
-
* ```
|
|
8793
|
+
* ```ts
|
|
8817
8794
|
* bootstrapApplication(MyApp, {providers: [
|
|
8818
8795
|
* provideExperimentalZonelessChangeDetection(),
|
|
8819
8796
|
* ]});
|
|
@@ -8873,7 +8850,7 @@ export declare type ProviderToken<T> = Type<T> | AbstractType<T> | InjectionToke
|
|
|
8873
8850
|
* `BootstrapOptions` instead.
|
|
8874
8851
|
*
|
|
8875
8852
|
* @usageNotes
|
|
8876
|
-
* ```
|
|
8853
|
+
* ```ts
|
|
8877
8854
|
* bootstrapApplication(MyApp, {providers: [
|
|
8878
8855
|
* provideZoneChangeDetection({eventCoalescing: true}),
|
|
8879
8856
|
* ]});
|
|
@@ -8972,7 +8949,7 @@ declare const enum QueryFlags {
|
|
|
8972
8949
|
*
|
|
8973
8950
|
* @usageNotes
|
|
8974
8951
|
* ### Example
|
|
8975
|
-
* ```
|
|
8952
|
+
* ```ts
|
|
8976
8953
|
* @Component({...})
|
|
8977
8954
|
* class Container {
|
|
8978
8955
|
* @ViewChildren(Item) items:QueryList<Item>;
|
|
@@ -9249,7 +9226,7 @@ declare interface ReactiveLViewConsumer extends ReactiveNode {
|
|
|
9249
9226
|
* The example below demonstrates how to use the function and how the fields
|
|
9250
9227
|
* of the returned object map to the component metadata.
|
|
9251
9228
|
*
|
|
9252
|
-
* ```
|
|
9229
|
+
* ```angular-ts
|
|
9253
9230
|
* @Component({
|
|
9254
9231
|
* standalone: true,
|
|
9255
9232
|
* selector: 'foo-component',
|
|
@@ -10011,8 +9988,7 @@ export declare interface SelfDecorator {
|
|
|
10011
9988
|
* by the local injector when instantiating the class itself, but not
|
|
10012
9989
|
* when instantiating a child.
|
|
10013
9990
|
*
|
|
10014
|
-
*
|
|
10015
|
-
* </code-example>
|
|
9991
|
+
* {@example core/di/ts/metadata_spec.ts region='Self'}
|
|
10016
9992
|
*
|
|
10017
9993
|
* @see {@link SkipSelf}
|
|
10018
9994
|
* @see {@link Optional}
|
|
@@ -10214,8 +10190,7 @@ export declare interface SkipSelfDecorator {
|
|
|
10214
10190
|
* In the following example, the dependency can be resolved when
|
|
10215
10191
|
* instantiating a child, but not when instantiating the class itself.
|
|
10216
10192
|
*
|
|
10217
|
-
*
|
|
10218
|
-
* </code-example>
|
|
10193
|
+
* {@example core/di/ts/metadata_spec.ts region='SkipSelf'}
|
|
10219
10194
|
*
|
|
10220
10195
|
* @see [Dependency Injection guide](guide/di/di-in-action#skip).
|
|
10221
10196
|
* @see {@link Self}
|
|
@@ -10247,7 +10222,7 @@ declare interface StandaloneCompScopeData extends ScopeData {
|
|
|
10247
10222
|
*
|
|
10248
10223
|
* Example:
|
|
10249
10224
|
*
|
|
10250
|
-
* ```
|
|
10225
|
+
* ```ts
|
|
10251
10226
|
* const COUNTER_KEY = makeStateKey<number>('counter');
|
|
10252
10227
|
* let value = 10;
|
|
10253
10228
|
*
|
|
@@ -10571,7 +10546,7 @@ declare const TEMPLATES = "t";
|
|
|
10571
10546
|
* providers using the `provideProtractorTestingSupport()` function and adding them into the
|
|
10572
10547
|
* `options.providers` array. Example:
|
|
10573
10548
|
*
|
|
10574
|
-
* ```
|
|
10549
|
+
* ```ts
|
|
10575
10550
|
* import {provideProtractorTestingSupport} from '@angular/platform-browser';
|
|
10576
10551
|
*
|
|
10577
10552
|
* await bootstrapApplication(RootComponent, providers: [provideProtractorTestingSupport()]);
|
|
@@ -11494,7 +11469,7 @@ export declare class TransferState {
|
|
|
11494
11469
|
* @usageNotes
|
|
11495
11470
|
* ### Example
|
|
11496
11471
|
*
|
|
11497
|
-
* ```
|
|
11472
|
+
* ```ts
|
|
11498
11473
|
* import { TRANSLATIONS } from '@angular/core';
|
|
11499
11474
|
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
11500
11475
|
* import { AppModule } from './app/app.module';
|
|
@@ -11520,7 +11495,7 @@ export declare const TRANSLATIONS: InjectionToken<string>;
|
|
|
11520
11495
|
* @usageNotes
|
|
11521
11496
|
* ### Example
|
|
11522
11497
|
*
|
|
11523
|
-
* ```
|
|
11498
|
+
* ```ts
|
|
11524
11499
|
* import { TRANSLATIONS_FORMAT } from '@angular/core';
|
|
11525
11500
|
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
11526
11501
|
* import { AppModule } from './app/app.module';
|
|
@@ -11632,7 +11607,7 @@ declare type TStylingRange = number & {
|
|
|
11632
11607
|
*
|
|
11633
11608
|
* Imagine we have:
|
|
11634
11609
|
*
|
|
11635
|
-
* ```
|
|
11610
|
+
* ```angular-ts
|
|
11636
11611
|
* <div class="TEMPLATE" my-dir>
|
|
11637
11612
|
*
|
|
11638
11613
|
* @Directive({
|
|
@@ -11645,7 +11620,7 @@ declare type TStylingRange = number & {
|
|
|
11645
11620
|
*
|
|
11646
11621
|
* In the above case the linked list will contain one item:
|
|
11647
11622
|
*
|
|
11648
|
-
* ```
|
|
11623
|
+
* ```ts
|
|
11649
11624
|
* // assume binding location: 10 for `ɵɵclassProp('dynamic', ctx.exp);`
|
|
11650
11625
|
* tData[10] = <TStylingStatic>[
|
|
11651
11626
|
* '': 'dynamic', // This is the wrapped value of `TStylingKey`
|
|
@@ -11662,13 +11637,13 @@ declare type TStylingRange = number & {
|
|
|
11662
11637
|
* `dynamic` (there is not). Therefore it is safe to remove it.
|
|
11663
11638
|
*
|
|
11664
11639
|
* If setting `true` case:
|
|
11665
|
-
* ```
|
|
11640
|
+
* ```ts
|
|
11666
11641
|
* lView[10] = true; // assume `ctx.exp` is `true`
|
|
11667
11642
|
* lView[10 + 1] = true; // Just normalized `lView[10]`
|
|
11668
11643
|
* ```
|
|
11669
11644
|
* So when the function is resolving styling value, it first needs to look into the linked list
|
|
11670
11645
|
* (there is none) and than into `TNode.residualClass` (TNode.residualStyle) which contains
|
|
11671
|
-
* ```
|
|
11646
|
+
* ```ts
|
|
11672
11647
|
* tNode.residualClass = [
|
|
11673
11648
|
* 'TEMPLATE': true,
|
|
11674
11649
|
* ];
|
|
@@ -11986,7 +11961,7 @@ declare type Type_2 = Function;
|
|
|
11986
11961
|
* An interface implemented by all Angular type decorators, which allows them to be used as
|
|
11987
11962
|
* decorators as well as Angular syntax.
|
|
11988
11963
|
*
|
|
11989
|
-
* ```
|
|
11964
|
+
* ```ts
|
|
11990
11965
|
* @ng.Component({...})
|
|
11991
11966
|
* class MyClass {...}
|
|
11992
11967
|
* ```
|
|
@@ -12119,7 +12094,7 @@ export declare const ViewChild: ViewChildDecorator;
|
|
|
12119
12094
|
* Create a child query in your component by declaring a
|
|
12120
12095
|
* class field and initializing it with the `viewChild()` function.
|
|
12121
12096
|
*
|
|
12122
|
-
* ```ts
|
|
12097
|
+
* ```angular-ts
|
|
12123
12098
|
* @Component({template: '<div #el></div><my-component #cmp />'})
|
|
12124
12099
|
* export class TestComponent {
|
|
12125
12100
|
* divEl = viewChild<ElementRef>('el'); // Signal<ElementRef|undefined>
|
|
@@ -12356,7 +12331,7 @@ export declare interface ViewChildrenDecorator {
|
|
|
12356
12331
|
* Note: the example uses standalone components, but the function can also be used for
|
|
12357
12332
|
* non-standalone components (declared in an NgModule) as well.
|
|
12358
12333
|
*
|
|
12359
|
-
* ```
|
|
12334
|
+
* ```angular-ts
|
|
12360
12335
|
* @Component({
|
|
12361
12336
|
* standalone: true,
|
|
12362
12337
|
* selector: 'dynamic',
|
|
@@ -13913,7 +13888,7 @@ export declare class ɵLContext {
|
|
|
13913
13888
|
*
|
|
13914
13889
|
* Example:
|
|
13915
13890
|
*
|
|
13916
|
-
* ```
|
|
13891
|
+
* ```ts
|
|
13917
13892
|
* renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});
|
|
13918
13893
|
* ```
|
|
13919
13894
|
*/
|
|
@@ -14117,6 +14092,22 @@ export declare const enum ɵNotificationSource {
|
|
|
14117
14092
|
*/
|
|
14118
14093
|
export declare function ɵpatchComponentDefWithScope<C>(componentDef: ɵComponentDef<C>, transitiveScopes: ɵNgModuleTransitiveScopes): void;
|
|
14119
14094
|
|
|
14095
|
+
/**
|
|
14096
|
+
* Internal implementation of the pending tasks service.
|
|
14097
|
+
*/
|
|
14098
|
+
export declare class ɵPendingTasksInternal implements OnDestroy {
|
|
14099
|
+
private taskId;
|
|
14100
|
+
private pendingTasks;
|
|
14101
|
+
private get _hasPendingTasks();
|
|
14102
|
+
hasPendingTasks: BehaviorSubject<boolean>;
|
|
14103
|
+
add(): number;
|
|
14104
|
+
has(taskId: number): boolean;
|
|
14105
|
+
remove(taskId: number): void;
|
|
14106
|
+
ngOnDestroy(): void;
|
|
14107
|
+
/** @nocollapse */
|
|
14108
|
+
static ɵprov: unknown;
|
|
14109
|
+
}
|
|
14110
|
+
|
|
14120
14111
|
|
|
14121
14112
|
export declare const ɵPERFORMANCE_MARK_PREFIX = "\uD83C\uDD70\uFE0F";
|
|
14122
14113
|
|
|
@@ -14392,7 +14383,7 @@ export declare function ɵresetJitOptions(): void;
|
|
|
14392
14383
|
* Used to resolve resource URLs on `@Component` when used with JIT compilation.
|
|
14393
14384
|
*
|
|
14394
14385
|
* Example:
|
|
14395
|
-
* ```
|
|
14386
|
+
* ```ts
|
|
14396
14387
|
* @Component({
|
|
14397
14388
|
* selector: 'my-comp',
|
|
14398
14389
|
* templateUrl: 'my-comp.html', // This requires asynchronous resolution
|
|
@@ -14431,7 +14422,7 @@ export declare function ɵrestoreComponentResolutionQueue(queue: Map<Type<any>,
|
|
|
14431
14422
|
* Formats and outputs the error message in a consistent way.
|
|
14432
14423
|
*
|
|
14433
14424
|
* Example:
|
|
14434
|
-
* ```
|
|
14425
|
+
* ```ts
|
|
14435
14426
|
* throw new RuntimeError(
|
|
14436
14427
|
* RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED,
|
|
14437
14428
|
* ngDevMode && 'Injector has already been destroyed.');
|
|
@@ -14871,7 +14862,7 @@ export declare class ɵViewRef<T> implements EmbeddedViewRef<T>, ChangeDetectorR
|
|
|
14871
14862
|
* @usageNotes
|
|
14872
14863
|
* ### Example
|
|
14873
14864
|
*
|
|
14874
|
-
* ```
|
|
14865
|
+
* ```ts
|
|
14875
14866
|
* @Component({
|
|
14876
14867
|
* selector: 'app-root',
|
|
14877
14868
|
* template: `Number of ticks: {{numberOfTicks}}`
|
|
@@ -14911,7 +14902,7 @@ export declare class ɵViewRef<T> implements EmbeddedViewRef<T>, ChangeDetectorR
|
|
|
14911
14902
|
* we want to check and update the list every five seconds. We can do that by detaching
|
|
14912
14903
|
* the component's change detector and doing a local check every five seconds.
|
|
14913
14904
|
*
|
|
14914
|
-
* ```
|
|
14905
|
+
* ```ts
|
|
14915
14906
|
* class DataProvider {
|
|
14916
14907
|
* // in a real application the returned data will be different every time
|
|
14917
14908
|
* get data() {
|
|
@@ -14961,7 +14952,7 @@ export declare class ɵViewRef<T> implements EmbeddedViewRef<T>, ChangeDetectorR
|
|
|
14961
14952
|
* its change detector from the main change detector tree when the component's live property
|
|
14962
14953
|
* is set to false.
|
|
14963
14954
|
*
|
|
14964
|
-
* ```
|
|
14955
|
+
* ```ts
|
|
14965
14956
|
* class DataProvider {
|
|
14966
14957
|
* data = 1;
|
|
14967
14958
|
*
|
|
@@ -15075,18 +15066,18 @@ export declare function ɵwithIncrementalHydration(): Provider[];
|
|
|
15075
15066
|
*
|
|
15076
15067
|
* USAGE:
|
|
15077
15068
|
* Given:
|
|
15078
|
-
* ```
|
|
15069
|
+
* ```ts
|
|
15079
15070
|
* interface Person {readonly name: string}
|
|
15080
15071
|
* ```
|
|
15081
15072
|
*
|
|
15082
15073
|
* We would like to get a read/write version of `Person`.
|
|
15083
|
-
* ```
|
|
15074
|
+
* ```ts
|
|
15084
15075
|
* const WritablePerson = Writable<Person>;
|
|
15085
15076
|
* ```
|
|
15086
15077
|
*
|
|
15087
15078
|
* The result is that you can do:
|
|
15088
15079
|
*
|
|
15089
|
-
* ```
|
|
15080
|
+
* ```ts
|
|
15090
15081
|
* const readonlyPerson: Person = {name: 'Marry'};
|
|
15091
15082
|
* readonlyPerson.name = 'John'; // TypeError
|
|
15092
15083
|
* (readonlyPerson as WritablePerson).name = 'John'; // OK
|
|
@@ -16027,7 +16018,7 @@ export declare function ɵɵdeferWhen(rawValue: unknown): void;
|
|
|
16027
16018
|
*
|
|
16028
16019
|
*
|
|
16029
16020
|
* # Example
|
|
16030
|
-
* ```
|
|
16021
|
+
* ```ts
|
|
16031
16022
|
* class MyComponent {
|
|
16032
16023
|
* // Generated by Angular Template Compiler
|
|
16033
16024
|
* // [Symbol] syntax will not be supported by TypeScript until v2.7
|
|
@@ -16131,7 +16122,7 @@ export declare function ɵɵdefineNgModule<T>(def: {
|
|
|
16131
16122
|
* Create a pipe definition object.
|
|
16132
16123
|
*
|
|
16133
16124
|
* # Example
|
|
16134
|
-
* ```
|
|
16125
|
+
* ```ts
|
|
16135
16126
|
* class MyPipe implements PipeTransform {
|
|
16136
16127
|
* // Generated by Angular Template Compiler
|
|
16137
16128
|
* static ɵpipe = definePipe({
|
|
@@ -16202,7 +16193,7 @@ export declare function ɵɵdirectiveInject<T>(token: ProviderToken<T>, flags: I
|
|
|
16202
16193
|
* Disables directive matching on element.
|
|
16203
16194
|
*
|
|
16204
16195
|
* * Example:
|
|
16205
|
-
* ```
|
|
16196
|
+
* ```html
|
|
16206
16197
|
* <my-comp my-directive>
|
|
16207
16198
|
* Should match component / directive.
|
|
16208
16199
|
* </my-comp>
|
|
@@ -16300,7 +16291,7 @@ export declare function ɵɵelementStart(index: number, name: string, attrsIndex
|
|
|
16300
16291
|
* Enables directive matching on elements.
|
|
16301
16292
|
*
|
|
16302
16293
|
* * Example:
|
|
16303
|
-
* ```
|
|
16294
|
+
* ```html
|
|
16304
16295
|
* <my-comp my-directive>
|
|
16305
16296
|
* Should match component / directive.
|
|
16306
16297
|
* </my-comp>
|
|
@@ -16807,7 +16798,7 @@ export declare type ɵɵNgModuleDeclaration<T, Declarations, Imports, Exports> =
|
|
|
16807
16798
|
*
|
|
16808
16799
|
* Example usage:
|
|
16809
16800
|
*
|
|
16810
|
-
* ```
|
|
16801
|
+
* ```ts
|
|
16811
16802
|
* static ɵcmp = defineComponent({
|
|
16812
16803
|
* ...
|
|
16813
16804
|
* inputs: {name: 'publicName'},
|