@angular/common 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/common.mjs +159 -185
- package/fesm2022/common.mjs.map +1 -1
- package/fesm2022/http/testing.mjs +8 -8
- package/fesm2022/http.mjs +45 -45
- package/fesm2022/http.mjs.map +1 -1
- package/fesm2022/testing.mjs +16 -16
- package/fesm2022/upgrade.mjs +5 -5
- package/http/index.d.ts +11 -11
- package/http/testing/index.d.ts +1 -1
- package/index.d.ts +43 -45
- package/package.json +2 -2
- package/testing/index.d.ts +1 -1
- package/upgrade/index.d.ts +1 -1
package/fesm2022/testing.mjs
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
|
*/
|
|
@@ -14,10 +14,10 @@ import { Subject } from 'rxjs';
|
|
|
14
14
|
* implementations.
|
|
15
15
|
*/
|
|
16
16
|
class PlatformNavigation {
|
|
17
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
18
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.
|
|
17
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: PlatformNavigation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
18
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: PlatformNavigation, providedIn: 'platform', useFactory: () => window.navigation });
|
|
19
19
|
}
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: PlatformNavigation, decorators: [{
|
|
21
21
|
type: Injectable,
|
|
22
22
|
args: [{ providedIn: 'platform', useFactory: () => window.navigation }]
|
|
23
23
|
}] });
|
|
@@ -910,10 +910,10 @@ class MockPlatformLocation {
|
|
|
910
910
|
});
|
|
911
911
|
}
|
|
912
912
|
}
|
|
913
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
914
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.
|
|
913
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: MockPlatformLocation, deps: [{ token: MOCK_PLATFORM_LOCATION_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
914
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: MockPlatformLocation });
|
|
915
915
|
}
|
|
916
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
916
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: MockPlatformLocation, decorators: [{
|
|
917
917
|
type: Injectable
|
|
918
918
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
919
919
|
type: Inject,
|
|
@@ -984,10 +984,10 @@ class FakeNavigationPlatformLocation {
|
|
|
984
984
|
getState() {
|
|
985
985
|
return this._platformNavigation.currentEntry.getHistoryState();
|
|
986
986
|
}
|
|
987
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
988
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.
|
|
987
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: FakeNavigationPlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
988
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: FakeNavigationPlatformLocation });
|
|
989
989
|
}
|
|
990
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
990
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: FakeNavigationPlatformLocation, decorators: [{
|
|
991
991
|
type: Injectable
|
|
992
992
|
}], ctorParameters: () => [] });
|
|
993
993
|
|
|
@@ -1161,10 +1161,10 @@ class SpyLocation {
|
|
|
1161
1161
|
this._history.push(new LocationState(path, query, state));
|
|
1162
1162
|
this._historyIndex = this._history.length - 1;
|
|
1163
1163
|
}
|
|
1164
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
1165
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.
|
|
1164
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: SpyLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1165
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: SpyLocation });
|
|
1166
1166
|
}
|
|
1167
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
1167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: SpyLocation, decorators: [{
|
|
1168
1168
|
type: Injectable
|
|
1169
1169
|
}] });
|
|
1170
1170
|
class LocationState {
|
|
@@ -1246,10 +1246,10 @@ class MockLocationStrategy extends LocationStrategy {
|
|
|
1246
1246
|
getState() {
|
|
1247
1247
|
return this.stateChanges[(this.stateChanges.length || 1) - 1];
|
|
1248
1248
|
}
|
|
1249
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
1250
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.
|
|
1249
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: MockLocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1250
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: MockLocationStrategy });
|
|
1251
1251
|
}
|
|
1252
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
1252
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: MockLocationStrategy, decorators: [{
|
|
1253
1253
|
type: Injectable
|
|
1254
1254
|
}], ctorParameters: () => [] });
|
|
1255
1255
|
class _MockPopStateEvent {
|
package/fesm2022/upgrade.mjs
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
|
*/
|
|
@@ -854,11 +854,11 @@ class LocationUpgradeModule {
|
|
|
854
854
|
],
|
|
855
855
|
};
|
|
856
856
|
}
|
|
857
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
858
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.
|
|
859
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.
|
|
857
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: LocationUpgradeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
858
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: LocationUpgradeModule, imports: [CommonModule] });
|
|
859
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: LocationUpgradeModule, imports: [CommonModule] });
|
|
860
860
|
}
|
|
861
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
861
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: LocationUpgradeModule, decorators: [{
|
|
862
862
|
type: NgModule,
|
|
863
863
|
args: [{ imports: [CommonModule] }]
|
|
864
864
|
}] });
|
package/http/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
|
*/
|
|
@@ -59,7 +59,7 @@ export declare const HTTP_INTERCEPTORS: InjectionToken<readonly HttpInterceptor[
|
|
|
59
59
|
*
|
|
60
60
|
* When the same API endpoint is accessed via `http://internal-domain.com:8080` on the server and
|
|
61
61
|
* via `https://external-domain.com` on the client, you can use the following configuration:
|
|
62
|
-
* ```
|
|
62
|
+
* ```ts
|
|
63
63
|
* // in app.server.config.ts
|
|
64
64
|
* {
|
|
65
65
|
* provide: HTTP_TRANSFER_CACHE_ORIGIN_MAP,
|
|
@@ -103,7 +103,7 @@ export declare abstract class HttpBackend implements HttpHandler {
|
|
|
103
103
|
*
|
|
104
104
|
* ### HTTP Request Example
|
|
105
105
|
*
|
|
106
|
-
* ```
|
|
106
|
+
* ```ts
|
|
107
107
|
* // GET heroes whose name contains search term
|
|
108
108
|
* searchHeroes(term: string): observable<Hero[]>{
|
|
109
109
|
*
|
|
@@ -114,20 +114,20 @@ export declare abstract class HttpBackend implements HttpHandler {
|
|
|
114
114
|
*
|
|
115
115
|
* Alternatively, the parameter string can be used without invoking HttpParams
|
|
116
116
|
* by directly joining to the URL.
|
|
117
|
-
* ```
|
|
117
|
+
* ```ts
|
|
118
118
|
* this.httpClient.request('GET', this.heroesUrl + '?' + 'name=term', {responseType:'json'});
|
|
119
119
|
* ```
|
|
120
120
|
*
|
|
121
121
|
*
|
|
122
122
|
* ### JSONP Example
|
|
123
|
-
* ```
|
|
123
|
+
* ```ts
|
|
124
124
|
* requestJsonp(url, callback = 'callback') {
|
|
125
125
|
* return this.httpClient.jsonp(this.heroesURL, callback);
|
|
126
126
|
* }
|
|
127
127
|
* ```
|
|
128
128
|
*
|
|
129
129
|
* ### PATCH Example
|
|
130
|
-
* ```
|
|
130
|
+
* ```ts
|
|
131
131
|
* // PATCH one of the heroes' name
|
|
132
132
|
* patchHero (id: number, heroName: string): Observable<{}> {
|
|
133
133
|
* const url = `${this.heroesUrl}/${id}`; // PATCH api/heroes/42
|
|
@@ -3261,7 +3261,7 @@ export declare class HttpClientXsrfModule {
|
|
|
3261
3261
|
*
|
|
3262
3262
|
* ### Usage Example
|
|
3263
3263
|
*
|
|
3264
|
-
* ```
|
|
3264
|
+
* ```ts
|
|
3265
3265
|
* // inside cache.interceptors.ts
|
|
3266
3266
|
* export const IS_CACHE_ENABLED = new HttpContextToken<boolean>(() => false);
|
|
3267
3267
|
*
|
|
@@ -3676,7 +3676,7 @@ export declare interface HttpInterceptor {
|
|
|
3676
3676
|
*
|
|
3677
3677
|
* @usageNotes
|
|
3678
3678
|
* Here is a noop interceptor that passes the request through without modifying it:
|
|
3679
|
-
* ```
|
|
3679
|
+
* ```ts
|
|
3680
3680
|
* export const noopInterceptor: HttpInterceptorFn = (req: HttpRequest<unknown>, next:
|
|
3681
3681
|
* HttpHandlerFn) => {
|
|
3682
3682
|
* return next(modifiedReq);
|
|
@@ -3687,7 +3687,7 @@ export declare interface HttpInterceptor {
|
|
|
3687
3687
|
* `next()` handler function.
|
|
3688
3688
|
*
|
|
3689
3689
|
* Here is a basic interceptor that adds a bearer token to the headers
|
|
3690
|
-
* ```
|
|
3690
|
+
* ```ts
|
|
3691
3691
|
* export const authenticationInterceptor: HttpInterceptorFn = (req: HttpRequest<unknown>, next:
|
|
3692
3692
|
* HttpHandlerFn) => {
|
|
3693
3693
|
* const userToken = 'MY_TOKEN'; const modifiedReq = req.clone({
|
|
@@ -4408,14 +4408,14 @@ export declare class JsonpInterceptor {
|
|
|
4408
4408
|
* feature functions to `provideHttpClient`. For example, HTTP interceptors can be added using the
|
|
4409
4409
|
* `withInterceptors(...)` feature.
|
|
4410
4410
|
*
|
|
4411
|
-
* <div class="alert
|
|
4411
|
+
* <div class="docs-alert docs-alert-helpful">
|
|
4412
4412
|
*
|
|
4413
4413
|
* It's strongly recommended to enable
|
|
4414
4414
|
* [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) for applications that use
|
|
4415
4415
|
* Server-Side Rendering for better performance and compatibility. To enable `fetch`, add
|
|
4416
4416
|
* `withFetch()` feature to the `provideHttpClient()` call at the root of the application:
|
|
4417
4417
|
*
|
|
4418
|
-
* ```
|
|
4418
|
+
* ```ts
|
|
4419
4419
|
* provideHttpClient(withFetch());
|
|
4420
4420
|
* ```
|
|
4421
4421
|
*
|
package/http/testing/index.d.ts
CHANGED
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
|
*/
|
|
@@ -44,7 +44,7 @@ import { ViewContainerRef } from '@angular/core';
|
|
|
44
44
|
* The following example shows how to use this token to configure the root app injector
|
|
45
45
|
* with a base href value, so that the DI framework can supply the dependency anywhere in the app.
|
|
46
46
|
*
|
|
47
|
-
* ```
|
|
47
|
+
* ```ts
|
|
48
48
|
* import {NgModule} from '@angular/core';
|
|
49
49
|
* import {APP_BASE_HREF} from '@angular/common';
|
|
50
50
|
*
|
|
@@ -170,7 +170,7 @@ export declare class CommonModule {
|
|
|
170
170
|
* into text strings, according to various format specifications,
|
|
171
171
|
* where the caller's default locale is `en-US`.
|
|
172
172
|
*
|
|
173
|
-
*
|
|
173
|
+
* {@example common/pipes/ts/currency_pipe.ts region='CurrencyPipe'}
|
|
174
174
|
*
|
|
175
175
|
* @publicApi
|
|
176
176
|
*/
|
|
@@ -236,14 +236,14 @@ export declare class CurrencyPipe implements PipeTransform {
|
|
|
236
236
|
* For example:
|
|
237
237
|
*
|
|
238
238
|
* Override the default date format by providing a value using the token:
|
|
239
|
-
* ```
|
|
239
|
+
* ```ts
|
|
240
240
|
* providers: [
|
|
241
241
|
* {provide: DATE_PIPE_DEFAULT_OPTIONS, useValue: {dateFormat: 'shortDate'}}
|
|
242
242
|
* ]
|
|
243
243
|
* ```
|
|
244
244
|
*
|
|
245
245
|
* Override the default timezone by providing a value using the token:
|
|
246
|
-
* ```
|
|
246
|
+
* ```ts
|
|
247
247
|
* providers: [
|
|
248
248
|
* {provide: DATE_PIPE_DEFAULT_OPTIONS, useValue: {timezone: '-1200'}}
|
|
249
249
|
* ]
|
|
@@ -400,7 +400,7 @@ export declare const DATE_PIPE_DEFAULT_TIMEZONE: InjectionToken<string>;
|
|
|
400
400
|
*
|
|
401
401
|
* The following component uses a date pipe to display the current date in different formats.
|
|
402
402
|
*
|
|
403
|
-
* ```
|
|
403
|
+
* ```angular-ts
|
|
404
404
|
* @Component({
|
|
405
405
|
* selector: 'date-pipe',
|
|
406
406
|
* template: `<div>
|
|
@@ -521,7 +521,7 @@ export declare interface DatePipeConfig {
|
|
|
521
521
|
* according to various format specifications,
|
|
522
522
|
* where the caller's default locale is `en-US`.
|
|
523
523
|
*
|
|
524
|
-
*
|
|
524
|
+
* {@example common/pipes/ts/number_pipe.ts region='NumberPipe'}
|
|
525
525
|
*
|
|
526
526
|
* @publicApi
|
|
527
527
|
*/
|
|
@@ -1449,8 +1449,7 @@ export declare class KeyValuePipe implements PipeTransform {
|
|
|
1449
1449
|
*
|
|
1450
1450
|
* ### Example
|
|
1451
1451
|
*
|
|
1452
|
-
*
|
|
1453
|
-
* region='LocationComponent'></code-example>
|
|
1452
|
+
* {@example common/location/ts/path_location_component.ts region='LocationComponent'}
|
|
1454
1453
|
*
|
|
1455
1454
|
* @publicApi
|
|
1456
1455
|
*/
|
|
@@ -1663,7 +1662,7 @@ export declare abstract class LocationStrategy {
|
|
|
1663
1662
|
* The following example defines a view that allows the user to enter
|
|
1664
1663
|
* text, and then uses the pipe to convert the input text to all lower case.
|
|
1665
1664
|
*
|
|
1666
|
-
*
|
|
1665
|
+
* {@example common/pipes/ts/lowerupper_pipe.ts region='LowerUpperPipe'}
|
|
1667
1666
|
*
|
|
1668
1667
|
* @ngModule CommonModule
|
|
1669
1668
|
* @publicApi
|
|
@@ -1814,7 +1813,7 @@ declare interface NavigationUpdateCurrentEntryOptions {
|
|
|
1814
1813
|
* @ngModule CommonModule
|
|
1815
1814
|
*
|
|
1816
1815
|
* @usageNotes
|
|
1817
|
-
* ```
|
|
1816
|
+
* ```html
|
|
1818
1817
|
* <some-element [ngClass]="'first second'">...</some-element>
|
|
1819
1818
|
*
|
|
1820
1819
|
* <some-element [ngClass]="['first', 'second']">...</some-element>
|
|
@@ -1889,19 +1888,19 @@ export declare class NgClass implements DoCheck {
|
|
|
1889
1888
|
* ### Syntax
|
|
1890
1889
|
*
|
|
1891
1890
|
* Simple
|
|
1892
|
-
* ```
|
|
1891
|
+
* ```html
|
|
1893
1892
|
* <ng-container *ngComponentOutlet="componentTypeExpression"></ng-container>
|
|
1894
1893
|
* ```
|
|
1895
1894
|
*
|
|
1896
1895
|
* With inputs
|
|
1897
|
-
* ```
|
|
1896
|
+
* ```html
|
|
1898
1897
|
* <ng-container *ngComponentOutlet="componentTypeExpression;
|
|
1899
1898
|
* inputs: inputsExpression;">
|
|
1900
1899
|
* </ng-container>
|
|
1901
1900
|
* ```
|
|
1902
1901
|
*
|
|
1903
1902
|
* Customized injector/content
|
|
1904
|
-
* ```
|
|
1903
|
+
* ```html
|
|
1905
1904
|
* <ng-container *ngComponentOutlet="componentTypeExpression;
|
|
1906
1905
|
* injector: injectorExpression;
|
|
1907
1906
|
* content: contentNodesExpression;">
|
|
@@ -1909,7 +1908,7 @@ export declare class NgClass implements DoCheck {
|
|
|
1909
1908
|
* ```
|
|
1910
1909
|
*
|
|
1911
1910
|
* Customized NgModule reference
|
|
1912
|
-
* ```
|
|
1911
|
+
* ```html
|
|
1913
1912
|
* <ng-container *ngComponentOutlet="componentTypeExpression;
|
|
1914
1913
|
* ngModule: ngModuleClass;">
|
|
1915
1914
|
* </ng-container>
|
|
@@ -1973,7 +1972,7 @@ export declare class NgComponentOutlet implements OnChanges, DoCheck, OnDestroy
|
|
|
1973
1972
|
* The following example shows the shorthand syntax with some options,
|
|
1974
1973
|
* contained in an `<li>` element.
|
|
1975
1974
|
*
|
|
1976
|
-
* ```
|
|
1975
|
+
* ```html
|
|
1977
1976
|
* <li *ngFor="let item of items; index as i; trackBy: trackByFn">...</li>
|
|
1978
1977
|
* ```
|
|
1979
1978
|
*
|
|
@@ -1984,7 +1983,7 @@ export declare class NgComponentOutlet implements OnChanges, DoCheck, OnDestroy
|
|
|
1984
1983
|
*
|
|
1985
1984
|
* Here is the expanded version of the short-form example.
|
|
1986
1985
|
*
|
|
1987
|
-
* ```
|
|
1986
|
+
* ```html
|
|
1988
1987
|
* <ng-template ngFor let-item [ngForOf]="items" let-i="index" [ngForTrackBy]="trackByFn">
|
|
1989
1988
|
* <li>...</li>
|
|
1990
1989
|
* </ng-template>
|
|
@@ -2008,7 +2007,7 @@ export declare class NgComponentOutlet implements OnChanges, DoCheck, OnDestroy
|
|
|
2008
2007
|
* `NgForOf` provides exported values that can be aliased to local variables.
|
|
2009
2008
|
* For example:
|
|
2010
2009
|
*
|
|
2011
|
-
* ```
|
|
2010
|
+
* ```html
|
|
2012
2011
|
* <li *ngFor="let user of users; index as i; first as isFirst">
|
|
2013
2012
|
* {{i}}/{{users.length}}. {{user}} <span *ngIf="isFirst">default</span>
|
|
2014
2013
|
* </li>
|
|
@@ -2166,27 +2165,27 @@ export declare class NgForOfContext<T, U extends NgIterable<T> = NgIterable<T>>
|
|
|
2166
2165
|
*
|
|
2167
2166
|
* Simple form with shorthand syntax:
|
|
2168
2167
|
*
|
|
2169
|
-
* ```
|
|
2168
|
+
* ```html
|
|
2170
2169
|
* <div *ngIf="condition">Content to render when condition is true.</div>
|
|
2171
2170
|
* ```
|
|
2172
2171
|
*
|
|
2173
2172
|
* Simple form with expanded syntax:
|
|
2174
2173
|
*
|
|
2175
|
-
* ```
|
|
2174
|
+
* ```html
|
|
2176
2175
|
* <ng-template [ngIf]="condition"><div>Content to render when condition is
|
|
2177
2176
|
* true.</div></ng-template>
|
|
2178
2177
|
* ```
|
|
2179
2178
|
*
|
|
2180
2179
|
* Form with an "else" block:
|
|
2181
2180
|
*
|
|
2182
|
-
* ```
|
|
2181
|
+
* ```html
|
|
2183
2182
|
* <div *ngIf="condition; else elseBlock">Content to render when condition is true.</div>
|
|
2184
2183
|
* <ng-template #elseBlock>Content to render when condition is false.</ng-template>
|
|
2185
2184
|
* ```
|
|
2186
2185
|
*
|
|
2187
2186
|
* Shorthand form with "then" and "else" blocks:
|
|
2188
2187
|
*
|
|
2189
|
-
* ```
|
|
2188
|
+
* ```html
|
|
2190
2189
|
* <div *ngIf="condition; then thenBlock else elseBlock"></div>
|
|
2191
2190
|
* <ng-template #thenBlock>Content to render when condition is true.</ng-template>
|
|
2192
2191
|
* <ng-template #elseBlock>Content to render when condition is false.</ng-template>
|
|
@@ -2194,7 +2193,7 @@ export declare class NgForOfContext<T, U extends NgIterable<T> = NgIterable<T>>
|
|
|
2194
2193
|
*
|
|
2195
2194
|
* Form with storing the value locally:
|
|
2196
2195
|
*
|
|
2197
|
-
* ```
|
|
2196
|
+
* ```html
|
|
2198
2197
|
* <div *ngIf="condition as value; else elseBlock">{{value}}</div>
|
|
2199
2198
|
* <ng-template #elseBlock>Content to render when value is null.</ng-template>
|
|
2200
2199
|
* ```
|
|
@@ -2251,7 +2250,7 @@ export declare class NgForOfContext<T, U extends NgIterable<T> = NgIterable<T>>
|
|
|
2251
2250
|
* for the "then" and "else" clauses. For example, consider the following shorthand statement,
|
|
2252
2251
|
* that is meant to show a loading page while waiting for data to be loaded.
|
|
2253
2252
|
*
|
|
2254
|
-
* ```
|
|
2253
|
+
* ```html
|
|
2255
2254
|
* <div class="hero-list" *ngIf="heroes else loading">
|
|
2256
2255
|
* ...
|
|
2257
2256
|
* </div>
|
|
@@ -2270,7 +2269,7 @@ export declare class NgForOfContext<T, U extends NgIterable<T> = NgIterable<T>>
|
|
|
2270
2269
|
* The anchor element containing the template for the "then" clause becomes
|
|
2271
2270
|
* the content of this unlabeled `<ng-template>` tag.
|
|
2272
2271
|
*
|
|
2273
|
-
* ```
|
|
2272
|
+
* ```html
|
|
2274
2273
|
* <ng-template [ngIf]="heroes" [ngIfElse]="loading">
|
|
2275
2274
|
* <div class="hero-list">
|
|
2276
2275
|
* ...
|
|
@@ -2389,7 +2388,7 @@ export declare abstract class NgLocalization {
|
|
|
2389
2388
|
*
|
|
2390
2389
|
* Step 1: import the `NgOptimizedImage` directive.
|
|
2391
2390
|
*
|
|
2392
|
-
* ```
|
|
2391
|
+
* ```ts
|
|
2393
2392
|
* import { NgOptimizedImage } from '@angular/common';
|
|
2394
2393
|
*
|
|
2395
2394
|
* // Include it into the necessary NgModule
|
|
@@ -2400,7 +2399,6 @@ export declare abstract class NgLocalization {
|
|
|
2400
2399
|
*
|
|
2401
2400
|
* // ... or a standalone Component
|
|
2402
2401
|
* @Component({
|
|
2403
|
-
* standalone: true
|
|
2404
2402
|
* imports: [NgOptimizedImage],
|
|
2405
2403
|
* })
|
|
2406
2404
|
* class MyStandaloneComponent {}
|
|
@@ -2415,7 +2413,7 @@ export declare abstract class NgLocalization {
|
|
|
2415
2413
|
* To use an existing loader for a **third-party image service**: add the provider factory for your
|
|
2416
2414
|
* chosen service to the `providers` array. In the example below, the Imgix loader is used:
|
|
2417
2415
|
*
|
|
2418
|
-
* ```
|
|
2416
|
+
* ```ts
|
|
2419
2417
|
* import {provideImgixLoader} from '@angular/common';
|
|
2420
2418
|
*
|
|
2421
2419
|
* // Call the function and add the result to the `providers` array:
|
|
@@ -2436,7 +2434,7 @@ export declare abstract class NgLocalization {
|
|
|
2436
2434
|
* To use a **custom loader**: provide your loader function as a value for the `IMAGE_LOADER` DI
|
|
2437
2435
|
* token.
|
|
2438
2436
|
*
|
|
2439
|
-
* ```
|
|
2437
|
+
* ```ts
|
|
2440
2438
|
* import {IMAGE_LOADER, ImageLoaderConfig} from '@angular/common';
|
|
2441
2439
|
*
|
|
2442
2440
|
* // Configure the loader using the `IMAGE_LOADER` token.
|
|
@@ -2452,7 +2450,7 @@ export declare abstract class NgLocalization {
|
|
|
2452
2450
|
*
|
|
2453
2451
|
* Step 3: update `<img>` tags in templates to use `ngSrc` instead of `src`.
|
|
2454
2452
|
*
|
|
2455
|
-
* ```
|
|
2453
|
+
* ```html
|
|
2456
2454
|
* <img ngSrc="logo.png" width="200" height="100">
|
|
2457
2455
|
* ```
|
|
2458
2456
|
*
|
|
@@ -2589,7 +2587,7 @@ export declare class NgOptimizedImage implements OnInit, OnChanges, OnDestroy {
|
|
|
2589
2587
|
* @ngModule CommonModule
|
|
2590
2588
|
*
|
|
2591
2589
|
* @usageNotes
|
|
2592
|
-
* ```
|
|
2590
|
+
* ```html
|
|
2593
2591
|
* <some-element [ngPlural]="value">
|
|
2594
2592
|
* <ng-template ngPluralCase="=0">there is nothing</ng-template>
|
|
2595
2593
|
* <ng-template ngPluralCase="=1">there is one</ng-template>
|
|
@@ -2639,7 +2637,7 @@ export declare class NgPlural {
|
|
|
2639
2637
|
* given expression matches the plural expression according to CLDR rules.
|
|
2640
2638
|
*
|
|
2641
2639
|
* @usageNotes
|
|
2642
|
-
* ```
|
|
2640
|
+
* ```html
|
|
2643
2641
|
* <some-element [ngPlural]="value">
|
|
2644
2642
|
* <ng-template ngPluralCase="=0">...</ng-template>
|
|
2645
2643
|
* <ng-template ngPluralCase="other">...</ng-template>
|
|
@@ -2664,19 +2662,19 @@ export declare class NgPluralCase {
|
|
|
2664
2662
|
*
|
|
2665
2663
|
* Set the font of the containing element to the result of an expression.
|
|
2666
2664
|
*
|
|
2667
|
-
* ```
|
|
2665
|
+
* ```html
|
|
2668
2666
|
* <some-element [ngStyle]="{'font-style': styleExp}">...</some-element>
|
|
2669
2667
|
* ```
|
|
2670
2668
|
*
|
|
2671
2669
|
* Set the width of the containing element to a pixel value returned by an expression.
|
|
2672
2670
|
*
|
|
2673
|
-
* ```
|
|
2671
|
+
* ```html
|
|
2674
2672
|
* <some-element [ngStyle]="{'max-width.px': widthExp}">...</some-element>
|
|
2675
2673
|
* ```
|
|
2676
2674
|
*
|
|
2677
2675
|
* Set a collection of style values using an expression that returns key-value pairs.
|
|
2678
2676
|
*
|
|
2679
|
-
* ```
|
|
2677
|
+
* ```html
|
|
2680
2678
|
* <some-element [ngStyle]="objExp">...</some-element>
|
|
2681
2679
|
* ```
|
|
2682
2680
|
*
|
|
@@ -2725,14 +2723,14 @@ export declare class NgStyle implements DoCheck {
|
|
|
2725
2723
|
* Define a container element for the directive, and specify the switch expression
|
|
2726
2724
|
* to match against as an attribute:
|
|
2727
2725
|
*
|
|
2728
|
-
* ```
|
|
2726
|
+
* ```html
|
|
2729
2727
|
* <container-element [ngSwitch]="switch_expression">
|
|
2730
2728
|
* ```
|
|
2731
2729
|
*
|
|
2732
2730
|
* Within the container, `*ngSwitchCase` statements specify the match expressions
|
|
2733
2731
|
* as attributes. Include `*ngSwitchDefault` as the final case.
|
|
2734
2732
|
*
|
|
2735
|
-
* ```
|
|
2733
|
+
* ```html
|
|
2736
2734
|
* <container-element [ngSwitch]="switch_expression">
|
|
2737
2735
|
* <some-element *ngSwitchCase="match_expression_1">...</some-element>
|
|
2738
2736
|
* ...
|
|
@@ -2744,7 +2742,7 @@ export declare class NgStyle implements DoCheck {
|
|
|
2744
2742
|
*
|
|
2745
2743
|
* The following example shows how to use more than one case to display the same view:
|
|
2746
2744
|
*
|
|
2747
|
-
* ```
|
|
2745
|
+
* ```html
|
|
2748
2746
|
* <container-element [ngSwitch]="switch_expression">
|
|
2749
2747
|
* <!-- the same view can be shown in more than one case -->
|
|
2750
2748
|
* <some-element *ngSwitchCase="match_expression_1">...</some-element>
|
|
@@ -2756,7 +2754,7 @@ export declare class NgStyle implements DoCheck {
|
|
|
2756
2754
|
* ```
|
|
2757
2755
|
*
|
|
2758
2756
|
* The following example shows how cases can be nested:
|
|
2759
|
-
* ```
|
|
2757
|
+
* ```html
|
|
2760
2758
|
* <container-element [ngSwitch]="switch_expression">
|
|
2761
2759
|
* <some-element *ngSwitchCase="match_expression_1">...</some-element>
|
|
2762
2760
|
* <some-element *ngSwitchCase="match_expression_2">...</some-element>
|
|
@@ -2802,7 +2800,7 @@ export declare class NgSwitch {
|
|
|
2802
2800
|
* Within a switch container, `*ngSwitchCase` statements specify the match expressions
|
|
2803
2801
|
* as attributes. Include `*ngSwitchDefault` as the final case.
|
|
2804
2802
|
*
|
|
2805
|
-
* ```
|
|
2803
|
+
* ```html
|
|
2806
2804
|
* <container-element [ngSwitch]="switch_expression">
|
|
2807
2805
|
* <some-element *ngSwitchCase="match_expression_1">...</some-element>
|
|
2808
2806
|
* ...
|
|
@@ -2871,7 +2869,7 @@ export declare class NgSwitchDefault {
|
|
|
2871
2869
|
* by the local template `let` declarations.
|
|
2872
2870
|
*
|
|
2873
2871
|
* @usageNotes
|
|
2874
|
-
* ```
|
|
2872
|
+
* ```html
|
|
2875
2873
|
* <ng-container *ngTemplateOutlet="templateRefExp; context: contextExp"></ng-container>
|
|
2876
2874
|
* ```
|
|
2877
2875
|
*
|
|
@@ -3092,7 +3090,7 @@ export declare class PathLocationStrategy extends LocationStrategy implements On
|
|
|
3092
3090
|
* into text strings, according to various format specifications,
|
|
3093
3091
|
* where the caller's default locale is `en-US`.
|
|
3094
3092
|
*
|
|
3095
|
-
*
|
|
3093
|
+
* {@example common/pipes/ts/percent_pipe.ts region='PercentPipe'}
|
|
3096
3094
|
*
|
|
3097
3095
|
* @publicApi
|
|
3098
3096
|
*/
|
|
@@ -3189,13 +3187,13 @@ export { PopStateEvent_2 as PopStateEvent }
|
|
|
3189
3187
|
* from the preconnect checks. It can either be a single string or an array of strings
|
|
3190
3188
|
* to represent a group of origins, for example:
|
|
3191
3189
|
*
|
|
3192
|
-
* ```
|
|
3190
|
+
* ```ts
|
|
3193
3191
|
* {provide: PRECONNECT_CHECK_BLOCKLIST, useValue: 'https://your-domain.com'}
|
|
3194
3192
|
* ```
|
|
3195
3193
|
*
|
|
3196
3194
|
* or:
|
|
3197
3195
|
*
|
|
3198
|
-
* ```
|
|
3196
|
+
* ```ts
|
|
3199
3197
|
* {provide: PRECONNECT_CHECK_BLOCKLIST,
|
|
3200
3198
|
* useValue: ['https://your-domain-1.com', 'https://your-domain-2.com']}
|
|
3201
3199
|
* ```
|
|
@@ -3372,7 +3370,7 @@ export declare type Time = {
|
|
|
3372
3370
|
* @usageNotes
|
|
3373
3371
|
* The following example shows the result of transforming various strings into title case.
|
|
3374
3372
|
*
|
|
3375
|
-
*
|
|
3373
|
+
* {@example common/pipes/ts/titlecase_pipe.ts region='TitleCasePipe'}
|
|
3376
3374
|
*
|
|
3377
3375
|
* @ngModule CommonModule
|
|
3378
3376
|
* @publicApi
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/common",
|
|
3
|
-
"version": "19.0.
|
|
3
|
+
"version": "19.0.3",
|
|
4
4
|
"description": "Angular - commonly needed directives and services",
|
|
5
5
|
"author": "angular",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@angular/core": "19.0.
|
|
47
|
+
"@angular/core": "19.0.3",
|
|
48
48
|
"rxjs": "^6.5.3 || ^7.4.0"
|
|
49
49
|
},
|
|
50
50
|
"repository": {
|
package/testing/index.d.ts
CHANGED
package/upgrade/index.d.ts
CHANGED