UNPKG

143 kBTypeScriptView Raw
1/**
2 * @license Angular v19.0.5
3 * (c) 2010-2024 Google LLC. https://angular.io/
4 * License: MIT
5 */
6
7
8import { ChangeDetectorRef } from '@angular/core';
9import { DoCheck } from '@angular/core';
10import { ElementRef } from '@angular/core';
11import * as i0 from '@angular/core';
12import { ɵIMAGE_CONFIG as IMAGE_CONFIG } from '@angular/core';
13import { ɵImageConfig as ImageConfig } from '@angular/core';
14import { InjectionToken } from '@angular/core';
15import { Injector } from '@angular/core';
16import { IterableDiffers } from '@angular/core';
17import { KeyValueDiffers } from '@angular/core';
18import { NgIterable } from '@angular/core';
19import { NgModuleFactory } from '@angular/core';
20import { Observable } from 'rxjs';
21import { OnChanges } from '@angular/core';
22import { OnDestroy } from '@angular/core';
23import { OnInit } from '@angular/core';
24import { PipeTransform } from '@angular/core';
25import { Provider } from '@angular/core';
26import { Renderer2 } from '@angular/core';
27import { SimpleChanges } from '@angular/core';
28import { Subscribable } from 'rxjs';
29import { SubscriptionLike } from 'rxjs';
30import { TemplateRef } from '@angular/core';
31import { TrackByFunction } from '@angular/core';
32import { Type } from '@angular/core';
33import { Version } from '@angular/core';
34import { ViewContainerRef } from '@angular/core';
35
36/**
37 * A predefined DI token for the base href
38 * to be used with the `PathLocationStrategy`.
39 * The base href is the URL prefix that should be preserved when generating
40 * and recognizing URLs.
41 *
42 * @usageNotes
43 *
44 * The following example shows how to use this token to configure the root app injector
45 * with a base href value, so that the DI framework can supply the dependency anywhere in the app.
46 *
47 * ```ts
48 * import {NgModule} from '@angular/core';
49 * import {APP_BASE_HREF} from '@angular/common';
50 *
51 * @NgModule({
52 * providers: [{provide: APP_BASE_HREF, useValue: '/my/app'}]
53 * })
54 * class AppModule {}
55 * ```
56 *
57 * @publicApi
58 */
59export declare const APP_BASE_HREF: InjectionToken<string>;
60
61/**
62 * @ngModule CommonModule
63 * @description
64 *
65 * Unwraps a value from an asynchronous primitive.
66 *
67 * The `async` pipe subscribes to an `Observable` or `Promise` and returns the latest value it has
68 * emitted. When a new value is emitted, the `async` pipe marks the component to be checked for
69 * changes. When the component gets destroyed, the `async` pipe unsubscribes automatically to avoid
70 * potential memory leaks. When the reference of the expression changes, the `async` pipe
71 * automatically unsubscribes from the old `Observable` or `Promise` and subscribes to the new one.
72 *
73 * @usageNotes
74 *
75 * ### Examples
76 *
77 * This example binds a `Promise` to the view. Clicking the `Resolve` button resolves the
78 * promise.
79 *
80 * {@example common/pipes/ts/async_pipe.ts region='AsyncPipePromise'}
81 *
82 * It's also possible to use `async` with Observables. The example below binds the `time` Observable
83 * to the view. The Observable continuously updates the view with the current time.
84 *
85 * {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'}
86 *
87 * @publicApi
88 */
89export declare class AsyncPipe implements OnDestroy, PipeTransform {
90 private _ref;
91 private _latestValue;
92 private markForCheckOnValueUpdate;
93 private _subscription;
94 private _obj;
95 private _strategy;
96 constructor(ref: ChangeDetectorRef);
97 ngOnDestroy(): void;
98 transform<T>(obj: Observable<T> | Subscribable<T> | Promise<T>): T | null;
99 transform<T>(obj: null | undefined): null;
100 transform<T>(obj: Observable<T> | Subscribable<T> | Promise<T> | null | undefined): T | null;
101 private _subscribe;
102 private _selectStrategy;
103 private _dispose;
104 private _updateLatestValue;
105 static ɵfac: i0.ɵɵFactoryDeclaration<AsyncPipe, never>;
106 static ɵpipe: i0.ɵɵPipeDeclaration<AsyncPipe, "async", true>;
107}
108
109/**
110 * `PlatformLocation` encapsulates all of the direct calls to platform APIs.
111 * This class should not be used directly by an application developer. Instead, use
112 * {@link Location}.
113 *
114 * @publicApi
115 */
116export declare class BrowserPlatformLocation extends PlatformLocation {
117 private _location;
118 private _history;
119 private _doc;
120 constructor();
121 getBaseHrefFromDOM(): string;
122 onPopState(fn: LocationChangeListener): VoidFunction;
123 onHashChange(fn: LocationChangeListener): VoidFunction;
124 get href(): string;
125 get protocol(): string;
126 get hostname(): string;
127 get port(): string;
128 get pathname(): string;
129 get search(): string;
130 get hash(): string;
131 set pathname(newPath: string);
132 pushState(state: any, title: string, url: string): void;
133 replaceState(state: any, title: string, url: string): void;
134 forward(): void;
135 back(): void;
136 historyGo(relativePosition?: number): void;
137 getState(): unknown;
138 static ɵfac: i0.ɵɵFactoryDeclaration<BrowserPlatformLocation, never>;
139 static ɵprov: i0.ɵɵInjectableDeclaration<BrowserPlatformLocation>;
140}
141
142/**
143 * Exports all the basic Angular directives and pipes,
144 * such as `NgIf`, `NgForOf`, `DecimalPipe`, and so on.
145 * Re-exported by `BrowserModule`, which is included automatically in the root
146 * `AppModule` when you create a new app with the CLI `new` command.
147 *
148 * @publicApi
149 */
150export declare class CommonModule {
151 static ɵfac: i0.ɵɵFactoryDeclaration<CommonModule, never>;
152 static ɵmod: i0.ɵɵNgModuleDeclaration<CommonModule, never, [typeof i1.NgClass, typeof i2.NgComponentOutlet, typeof i3.NgForOf, typeof i4.NgIf, typeof i5.NgTemplateOutlet, typeof i6.NgStyle, typeof i7.NgSwitch, typeof i7.NgSwitchCase, typeof i7.NgSwitchDefault, typeof i8.NgPlural, typeof i8.NgPluralCase, typeof i9.AsyncPipe, typeof i10.UpperCasePipe, typeof i10.LowerCasePipe, typeof i11.JsonPipe, typeof i12.SlicePipe, typeof i13.DecimalPipe, typeof i13.PercentPipe, typeof i10.TitleCasePipe, typeof i13.CurrencyPipe, typeof i14.DatePipe, typeof i15.I18nPluralPipe, typeof i16.I18nSelectPipe, typeof i17.KeyValuePipe], [typeof i1.NgClass, typeof i2.NgComponentOutlet, typeof i3.NgForOf, typeof i4.NgIf, typeof i5.NgTemplateOutlet, typeof i6.NgStyle, typeof i7.NgSwitch, typeof i7.NgSwitchCase, typeof i7.NgSwitchDefault, typeof i8.NgPlural, typeof i8.NgPluralCase, typeof i9.AsyncPipe, typeof i10.UpperCasePipe, typeof i10.LowerCasePipe, typeof i11.JsonPipe, typeof i12.SlicePipe, typeof i13.DecimalPipe, typeof i13.PercentPipe, typeof i10.TitleCasePipe, typeof i13.CurrencyPipe, typeof i14.DatePipe, typeof i15.I18nPluralPipe, typeof i16.I18nSelectPipe, typeof i17.KeyValuePipe]>;
153 static ɵinj: i0.ɵɵInjectorDeclaration<CommonModule>;
154}
155
156/**
157 * @ngModule CommonModule
158 * @description
159 *
160 * Transforms a number to a currency string, formatted according to locale rules
161 * that determine group sizing and separator, decimal-point character,
162 * and other locale-specific configurations.
163 *
164 *
165 * @see {@link getCurrencySymbol}
166 * @see {@link formatCurrency}
167 *
168 * @usageNotes
169 * The following code shows how the pipe transforms numbers
170 * into text strings, according to various format specifications,
171 * where the caller's default locale is `en-US`.
172 *
173 * {@example common/pipes/ts/currency_pipe.ts region='CurrencyPipe'}
174 *
175 * @publicApi
176 */
177export declare class CurrencyPipe implements PipeTransform {
178 private _locale;
179 private _defaultCurrencyCode;
180 constructor(_locale: string, _defaultCurrencyCode?: string);
181 /**
182 *
183 * @param value The number to be formatted as currency.
184 * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code,
185 * such as `USD` for the US dollar and `EUR` for the euro. The default currency code can be
186 * configured using the `DEFAULT_CURRENCY_CODE` injection token.
187 * @param display The format for the currency indicator. One of the following:
188 * - `code`: Show the code (such as `USD`).
189 * - `symbol`(default): Show the symbol (such as `$`).
190 * - `symbol-narrow`: Use the narrow symbol for locales that have two symbols for their
191 * currency.
192 * For example, the Canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`. If the
193 * locale has no narrow symbol, uses the standard symbol for the locale.
194 * - String: Use the given string value instead of a code or a symbol.
195 * For example, an empty string will suppress the currency & symbol.
196 * - Boolean (marked deprecated in v5): `true` for symbol and false for `code`.
197 *
198 * @param digitsInfo Decimal representation options, specified by a string
199 * in the following format:<br>
200 * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.
201 * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.
202 * Default is `1`.
203 * - `minFractionDigits`: The minimum number of digits after the decimal point.
204 * Default is `2`.
205 * - `maxFractionDigits`: The maximum number of digits after the decimal point.
206 * Default is `2`.
207 * If not provided, the number will be formatted with the proper amount of digits,
208 * depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies.
209 * For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none.
210 * @param locale A locale code for the locale format rules to use.
211 * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.
212 * See [Setting your app locale](guide/i18n/locale-id).
213 */
214 transform(value: number | string, currencyCode?: string, display?: 'code' | 'symbol' | 'symbol-narrow' | string | boolean, digitsInfo?: string, locale?: string): string | null;
215 transform(value: null | undefined, currencyCode?: string, display?: 'code' | 'symbol' | 'symbol-narrow' | string | boolean, digitsInfo?: string, locale?: string): null;
216 transform(value: number | string | null | undefined, currencyCode?: string, display?: 'code' | 'symbol' | 'symbol-narrow' | string | boolean, digitsInfo?: string, locale?: string): string | null;
217 static ɵfac: i0.ɵɵFactoryDeclaration<CurrencyPipe, never>;
218 static ɵpipe: i0.ɵɵPipeDeclaration<CurrencyPipe, "currency", true>;
219}
220
221/**
222 * DI token that allows to provide default configuration for the `DatePipe` instances in an
223 * application. The value is an object which can include the following fields:
224 * - `dateFormat`: configures the default date format. If not provided, the `DatePipe`
225 * will use the 'mediumDate' as a value.
226 * - `timezone`: configures the default timezone. If not provided, the `DatePipe` will
227 * use the end-user's local system timezone.
228 *
229 * @see {@link DatePipeConfig}
230 *
231 * @usageNotes
232 *
233 * Various date pipe default values can be overwritten by providing this token with
234 * the value that has this interface.
235 *
236 * For example:
237 *
238 * Override the default date format by providing a value using the token:
239 * ```ts
240 * providers: [
241 * {provide: DATE_PIPE_DEFAULT_OPTIONS, useValue: {dateFormat: 'shortDate'}}
242 * ]
243 * ```
244 *
245 * Override the default timezone by providing a value using the token:
246 * ```ts
247 * providers: [
248 * {provide: DATE_PIPE_DEFAULT_OPTIONS, useValue: {timezone: '-1200'}}
249 * ]
250 * ```
251 */
252export declare const DATE_PIPE_DEFAULT_OPTIONS: InjectionToken<DatePipeConfig>;
253
254/**
255 * Optionally-provided default timezone to use for all instances of `DatePipe` (such as `'+0430'`).
256 * If the value isn't provided, the `DatePipe` will use the end-user's local system timezone.
257 *
258 * @deprecated use DATE_PIPE_DEFAULT_OPTIONS token to configure DatePipe
259 */
260export declare const DATE_PIPE_DEFAULT_TIMEZONE: InjectionToken<string>;
261
262/**
263 * @ngModule CommonModule
264 * @description
265 *
266 * Formats a date value according to locale rules.
267 *
268 * `DatePipe` is executed only when it detects a pure change to the input value.
269 * A pure change is either a change to a primitive input value
270 * (such as `String`, `Number`, `Boolean`, or `Symbol`),
271 * or a changed object reference (such as `Date`, `Array`, `Function`, or `Object`).
272 *
273 * Note that mutating a `Date` object does not cause the pipe to be rendered again.
274 * To ensure that the pipe is executed, you must create a new `Date` object.
275 *
276 * Only the `en-US` locale data comes with Angular. To localize dates
277 * in another language, you must import the corresponding locale data.
278 * See the [I18n guide](guide/i18n/format-data-locale) for more information.
279 *
280 * The time zone of the formatted value can be specified either by passing it in as the second
281 * parameter of the pipe, or by setting the default through the `DATE_PIPE_DEFAULT_OPTIONS`
282 * injection token. The value that is passed in as the second parameter takes precedence over
283 * the one defined using the injection token.
284 *
285 * @see {@link formatDate}
286 *
287 *
288 * @usageNotes
289 *
290 * The result of this pipe is not reevaluated when the input is mutated. To avoid the need to
291 * reformat the date on every change-detection cycle, treat the date as an immutable object
292 * and change the reference when the pipe needs to run again.
293 *
294 * ### Pre-defined format options
295 *
296 * | Option | Equivalent to | Examples (given in `en-US` locale) |
297 * |---------------|-------------------------------------|-------------------------------------------------|
298 * | `'short'` | `'M/d/yy, h:mm a'` | `6/15/15, 9:03 AM` |
299 * | `'medium'` | `'MMM d, y, h:mm:ss a'` | `Jun 15, 2015, 9:03:01 AM` |
300 * | `'long'` | `'MMMM d, y, h:mm:ss a z'` | `June 15, 2015 at 9:03:01 AM GMT+1` |
301 * | `'full'` | `'EEEE, MMMM d, y, h:mm:ss a zzzz'` | `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00` |
302 * | `'shortDate'` | `'M/d/yy'` | `6/15/15` |
303 * | `'mediumDate'`| `'MMM d, y'` | `Jun 15, 2015` |
304 * | `'longDate'` | `'MMMM d, y'` | `June 15, 2015` |
305 * | `'fullDate'` | `'EEEE, MMMM d, y'` | `Monday, June 15, 2015` |
306 * | `'shortTime'` | `'h:mm a'` | `9:03 AM` |
307 * | `'mediumTime'`| `'h:mm:ss a'` | `9:03:01 AM` |
308 * | `'longTime'` | `'h:mm:ss a z'` | `9:03:01 AM GMT+1` |
309 * | `'fullTime'` | `'h:mm:ss a zzzz'` | `9:03:01 AM GMT+01:00` |
310 *
311 * ### Custom format options
312 *
313 * You can construct a format string using symbols to specify the components
314 * of a date-time value, as described in the following table.
315 * Format details depend on the locale.
316 * Fields marked with (*) are only available in the extra data set for the given locale.
317 *
318 * | Field type | Format | Description | Example Value |
319 * |-------------------------|-------------|---------------------------------------------------------------|------------------------------------------------------------|
320 * | Era | G, GG & GGG | Abbreviated | AD |
321 * | | GGGG | Wide | Anno Domini |
322 * | | GGGGG | Narrow | A |
323 * | Year | y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 |
324 * | | yy | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 |
325 * | | yyy | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 |
326 * | | yyyy | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 |
327 * | ISO Week-numbering year | Y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 |
328 * | | YY | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 |
329 * | | YYY | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 |
330 * | | YYYY | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 |
331 * | Month | M | Numeric: 1 digit | 9, 12 |
332 * | | MM | Numeric: 2 digits + zero padded | 09, 12 |
333 * | | MMM | Abbreviated | Sep |
334 * | | MMMM | Wide | September |
335 * | | MMMMM | Narrow | S |
336 * | Month standalone | L | Numeric: 1 digit | 9, 12 |
337 * | | LL | Numeric: 2 digits + zero padded | 09, 12 |
338 * | | LLL | Abbreviated | Sep |
339 * | | LLLL | Wide | September |
340 * | | LLLLL | Narrow | S |
341 * | ISO Week of year | w | Numeric: minimum digits | 1... 53 |
342 * | | ww | Numeric: 2 digits + zero padded | 01... 53 |
343 * | Week of month | W | Numeric: 1 digit | 1... 5 |
344 * | Day of month | d | Numeric: minimum digits | 1 |
345 * | | dd | Numeric: 2 digits + zero padded | 01 |
346 * | Week day | E, EE & EEE | Abbreviated | Tue |
347 * | | EEEE | Wide | Tuesday |
348 * | | EEEEE | Narrow | T |
349 * | | EEEEEE | Short | Tu |
350 * | Week day standalone | c, cc | Numeric: 1 digit | 2 |
351 * | | ccc | Abbreviated | Tue |
352 * | | cccc | Wide | Tuesday |
353 * | | ccccc | Narrow | T |
354 * | | cccccc | Short | Tu |
355 * | Period | a, aa & aaa | Abbreviated | am/pm or AM/PM |
356 * | | aaaa | Wide (fallback to `a` when missing) | ante meridiem/post meridiem |
357 * | | aaaaa | Narrow | a/p |
358 * | Period* | B, BB & BBB | Abbreviated | mid. |
359 * | | BBBB | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |
360 * | | BBBBB | Narrow | md |
361 * | Period standalone* | b, bb & bbb | Abbreviated | mid. |
362 * | | bbbb | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |
363 * | | bbbbb | Narrow | md |
364 * | Hour 1-12 | h | Numeric: minimum digits | 1, 12 |
365 * | | hh | Numeric: 2 digits + zero padded | 01, 12 |
366 * | Hour 0-23 | H | Numeric: minimum digits | 0, 23 |
367 * | | HH | Numeric: 2 digits + zero padded | 00, 23 |
368 * | Minute | m | Numeric: minimum digits | 8, 59 |
369 * | | mm | Numeric: 2 digits + zero padded | 08, 59 |
370 * | Second | s | Numeric: minimum digits | 0... 59 |
371 * | | ss | Numeric: 2 digits + zero padded | 00... 59 |
372 * | Fractional seconds | S | Numeric: 1 digit | 0... 9 |
373 * | | SS | Numeric: 2 digits + zero padded | 00... 99 |
374 * | | SSS | Numeric: 3 digits + zero padded (= milliseconds) | 000... 999 |
375 * | Zone | z, zz & zzz | Short specific non location format (fallback to O) | GMT-8 |
376 * | | zzzz | Long specific non location format (fallback to OOOO) | GMT-08:00 |
377 * | | Z, ZZ & ZZZ | ISO8601 basic format | -0800 |
378 * | | ZZZZ | Long localized GMT format | GMT-8:00 |
379 * | | ZZZZZ | ISO8601 extended format + Z indicator for offset 0 (= XXXXX) | -08:00 |
380 * | | O, OO & OOO | Short localized GMT format | GMT-8 |
381 * | | OOOO | Long localized GMT format | GMT-08:00 |
382 *
383 *
384 * ### Format examples
385 *
386 * These examples transform a date into various formats,
387 * assuming that `dateObj` is a JavaScript `Date` object for
388 * year: 2015, month: 6, day: 15, hour: 21, minute: 43, second: 11,
389 * given in the local time for the `en-US` locale.
390 *
391 * ```
392 * {{ dateObj | date }} // output is 'Jun 15, 2015'
393 * {{ dateObj | date:'medium' }} // output is 'Jun 15, 2015, 9:43:11 PM'
394 * {{ dateObj | date:'shortTime' }} // output is '9:43 PM'
395 * {{ dateObj | date:'mm:ss' }} // output is '43:11'
396 * {{ dateObj | date:"MMM dd, yyyy 'at' hh:mm a" }} // output is 'Jun 15, 2015 at 09:43 PM'
397 * ```
398 *
399 * ### Usage example
400 *
401 * The following component uses a date pipe to display the current date in different formats.
402 *
403 * ```angular-ts
404 * @Component({
405 * selector: 'date-pipe',
406 * template: `<div>
407 * <p>Today is {{today | date}}</p>
408 * <p>Or if you prefer, {{today | date:'fullDate'}}</p>
409 * <p>The time is {{today | date:'h:mm a z'}}</p>
410 * </div>`
411 * })
412 * // Get the current date and time as a date-time value.
413 * export class DatePipeComponent {
414 * today: number = Date.now();
415 * }
416 * ```
417 *
418 * @publicApi
419 */
420export declare class DatePipe implements PipeTransform {
421 private locale;
422 private defaultTimezone?;
423 private defaultOptions?;
424 constructor(locale: string, defaultTimezone?: (string | null) | undefined, defaultOptions?: (DatePipeConfig | null) | undefined);
425 /**
426 * @param value The date expression: a `Date` object, a number
427 * (milliseconds since UTC epoch), or an ISO string (https://www.w3.org/TR/NOTE-datetime).
428 * @param format The date/time components to include, using predefined options or a
429 * custom format string. When not provided, the `DatePipe` looks for the value using the
430 * `DATE_PIPE_DEFAULT_OPTIONS` injection token (and reads the `dateFormat` property).
431 * If the token is not configured, the `mediumDate` is used as a value.
432 * @param timezone A timezone offset (such as `'+0430'`). When not provided, the `DatePipe`
433 * looks for the value using the `DATE_PIPE_DEFAULT_OPTIONS` injection token (and reads
434 * the `timezone` property). If the token is not configured, the end-user's local system
435 * timezone is used as a value.
436 * @param locale A locale code for the locale format rules to use.
437 * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.
438 * See [Setting your app locale](guide/i18n/locale-id).
439 *
440 * @see {@link DATE_PIPE_DEFAULT_OPTIONS}
441 *
442 * @returns A date string in the desired format.
443 */
444 transform(value: Date | string | number, format?: string, timezone?: string, locale?: string): string | null;
445 transform(value: null | undefined, format?: string, timezone?: string, locale?: string): null;
446 transform(value: Date | string | number | null | undefined, format?: string, timezone?: string, locale?: string): string | null;
447 static ɵfac: i0.ɵɵFactoryDeclaration<DatePipe, [null, { optional: true; }, { optional: true; }]>;
448 static ɵpipe: i0.ɵɵPipeDeclaration<DatePipe, "date", true>;
449}
450
451
452/**
453 * An interface that describes the date pipe configuration, which can be provided using the
454 * `DATE_PIPE_DEFAULT_OPTIONS` token.
455 *
456 * @see {@link DATE_PIPE_DEFAULT_OPTIONS}
457 *
458 * @publicApi
459 */
460export declare interface DatePipeConfig {
461 dateFormat?: string;
462 timezone?: string;
463}
464
465/**
466 * @ngModule CommonModule
467 * @description
468 *
469 * Formats a value according to digit options and locale rules.
470 * Locale determines group sizing and separator,
471 * decimal point character, and other locale-specific configurations.
472 *
473 * @see {@link formatNumber}
474 *
475 * @usageNotes
476 *
477 * ### digitsInfo
478 *
479 * The value's decimal representation is specified by the `digitsInfo`
480 * parameter, written in the following format:<br>
481 *
482 * ```
483 * {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}
484 * ```
485 *
486 * - `minIntegerDigits`:
487 * The minimum number of integer digits before the decimal point.
488 * Default is 1.
489 *
490 * - `minFractionDigits`:
491 * The minimum number of digits after the decimal point.
492 * Default is 0.
493 *
494 * - `maxFractionDigits`:
495 * The maximum number of digits after the decimal point.
496 * Default is 3.
497 *
498 * If the formatted value is truncated it will be rounded using the "to-nearest" method:
499 *
500 * ```
501 * {{3.6 | number: '1.0-0'}}
502 * <!--will output '4'-->
503 *
504 * {{-3.6 | number:'1.0-0'}}
505 * <!--will output '-4'-->
506 * ```
507 *
508 * ### locale
509 *
510 * `locale` will format a value according to locale rules.
511 * Locale determines group sizing and separator,
512 * decimal point character, and other locale-specific configurations.
513 *
514 * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.
515 *
516 * See [Setting your app locale](guide/i18n/locale-id).
517 *
518 * ### Example
519 *
520 * The following code shows how the pipe transforms values
521 * according to various format specifications,
522 * where the caller's default locale is `en-US`.
523 *
524 * {@example common/pipes/ts/number_pipe.ts region='NumberPipe'}
525 *
526 * @publicApi
527 */
528export declare class DecimalPipe implements PipeTransform {
529 private _locale;
530 constructor(_locale: string);
531 /**
532 * @param value The value to be formatted.
533 * @param digitsInfo Sets digit and decimal representation.
534 * [See more](#digitsinfo).
535 * @param locale Specifies what locale format rules to use.
536 * [See more](#locale).
537 */
538 transform(value: number | string, digitsInfo?: string, locale?: string): string | null;
539 transform(value: null | undefined, digitsInfo?: string, locale?: string): null;
540 transform(value: number | string | null | undefined, digitsInfo?: string, locale?: string): string | null;
541 static ɵfac: i0.ɵɵFactoryDeclaration<DecimalPipe, never>;
542 static ɵpipe: i0.ɵɵPipeDeclaration<DecimalPipe, "number", true>;
543}
544
545declare function defaultComparator<K, V>(keyValueA: KeyValue<K, V>, keyValueB: KeyValue<K, V>): number;
546
547/**
548 * A DI Token representing the main rendering context.
549 * In a browser and SSR this is the DOM Document.
550 * When using SSR, that document is created by [Domino](https://github.com/angular/domino).
551 *
552 * @publicApi
553 */
554export declare const DOCUMENT: InjectionToken<Document>;
555
556/**
557 * @ngModule CommonModule
558 * @description
559 *
560 * Formats a number as currency using locale rules.
561 *
562 * @param value The number to format.
563 * @param locale A locale code for the locale format rules to use.
564 * @param currency A string containing the currency symbol or its name,
565 * such as "$" or "Canadian Dollar". Used in output string, but does not affect the operation
566 * of the function.
567 * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)
568 * currency code, such as `USD` for the US dollar and `EUR` for the euro.
569 * Used to determine the number of digits in the decimal part.
570 * @param digitsInfo Decimal representation options, specified by a string in the following format:
571 * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.
572 *
573 * @returns The formatted currency value.
574 *
575 * @see {@link formatNumber}
576 * @see {@link DecimalPipe}
577 * @see [Internationalization (i18n) Guide](guide/i18n)
578 *
579 * @publicApi
580 */
581export declare function formatCurrency(value: number, locale: string, currency: string, currencyCode?: string, digitsInfo?: string): string;
582
583/**
584 * @ngModule CommonModule
585 * @description
586 *
587 * Formats a date according to locale rules.
588 *
589 * @param value The date to format, as a Date, or a number (milliseconds since UTC epoch)
590 * or an [ISO date-time string](https://www.w3.org/TR/NOTE-datetime).
591 * @param format The date-time components to include. See `DatePipe` for details.
592 * @param locale A locale code for the locale format rules to use.
593 * @param timezone The time zone. A time zone offset from GMT (such as `'+0430'`).
594 * If not specified, uses host system settings.
595 *
596 * @returns The formatted date string.
597 *
598 * @see {@link DatePipe}
599 * @see [Internationalization (i18n) Guide](guide/i18n)
600 *
601 * @publicApi
602 */
603export declare function formatDate(value: string | number | Date, format: string, locale: string, timezone?: string): string;
604
605/**
606 * @ngModule CommonModule
607 * @description
608 *
609 * Formats a number as text, with group sizing, separator, and other
610 * parameters based on the locale.
611 *
612 * @param value The number to format.
613 * @param locale A locale code for the locale format rules to use.
614 * @param digitsInfo Decimal representation options, specified by a string in the following format:
615 * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.
616 *
617 * @returns The formatted text string.
618 * @see [Internationalization (i18n) Guide](guide/i18n)
619 *
620 * @publicApi
621 */
622export declare function formatNumber(value: number, locale: string, digitsInfo?: string): string;
623
624/**
625 * @ngModule CommonModule
626 * @description
627 *
628 * Formats a number as a percentage according to locale rules.
629 *
630 * @param value The number to format.
631 * @param locale A locale code for the locale format rules to use.
632 * @param digitsInfo Decimal representation options, specified by a string in the following format:
633 * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.
634 *
635 * @returns The formatted percentage value.
636 *
637 * @see {@link formatNumber}
638 * @see {@link DecimalPipe}
639 * @see [Internationalization (i18n) Guide](guide/i18n)
640 * @publicApi
641 *
642 */
643export declare function formatPercent(value: number, locale: string, digitsInfo?: string): string;
644
645/**
646 * String widths available for date-time formats.
647 * The specific character widths are locale-specific.
648 * Examples are given for `en-US`.
649 *
650 * @see {@link getLocaleDateFormat}
651 * @see {@link getLocaleTimeFormat}
652 * @see {@link getLocaleDateTimeFormat}
653 * @see [Internationalization (i18n) Guide](guide/i18n)
654 * @publicApi
655 *
656 * @deprecated Date locale data getters are deprecated
657 */
658export declare enum FormatWidth {
659 /**
660 * For `en-US`, `'M/d/yy, h:mm a'`
661 * (Example: `6/15/15, 9:03 AM`)
662 */
663 Short = 0,
664 /**
665 * For `en-US`, `'MMM d, y, h:mm:ss a'`
666 * (Example: `Jun 15, 2015, 9:03:01 AM`)
667 */
668 Medium = 1,
669 /**
670 * For `en-US`, `'MMMM d, y, h:mm:ss a z'`
671 * (Example: `June 15, 2015 at 9:03:01 AM GMT+1`)
672 */
673 Long = 2,
674 /**
675 * For `en-US`, `'EEEE, MMMM d, y, h:mm:ss a zzzz'`
676 * (Example: `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00`)
677 */
678 Full = 3
679}
680
681/**
682 * Context-dependant translation forms for strings.
683 * Typically the standalone version is for the nominative form of the word,
684 * and the format version is used for the genitive case.
685 * @see [CLDR website](http://cldr.unicode.org/translation/date-time-1/date-time#TOC-Standalone-vs.-Format-Styles)
686 * @see [Internationalization (i18n) Guide](guide/i18n)
687 *
688 * @publicApi
689 *
690 * @deprecated locale data getters are deprecated
691 */
692export declare enum FormStyle {
693 Format = 0,
694 Standalone = 1
695}
696
697/**
698 * Retrieves the currency symbol for a given currency code.
699 *
700 * For example, for the default `en-US` locale, the code `USD` can
701 * be represented by the narrow symbol `$` or the wide symbol `US$`.
702 *
703 * @param code The currency code.
704 * @param format The format, `wide` or `narrow`.
705 * @param locale A locale code for the locale format rules to use.
706 *
707 * @returns The symbol, or the currency code if no symbol is available.
708 * @see [Internationalization (i18n) Guide](guide/i18n)
709 *
710 * @publicApi
711 *
712 * @deprecated Angular recommends relying on the `Intl` API for i18n.
713 * You can use `Intl.NumberFormat().formatToParts()` to extract the currency symbol.
714 * For example: `Intl.NumberFormat('en', {style:'currency', currency: 'USD'}).formatToParts().find(part => part.type === 'currency').value`
715 * returns `$` for USD currency code in the `en` locale.
716 * Note: `US$` is a currency symbol for the `en-ca` locale but not the `en-us` locale.
717 */
718export declare function getCurrencySymbol(code: string, format: 'wide' | 'narrow', locale?: string): string;
719
720/**
721 * Retrieves the default currency code for the given locale.
722 *
723 * The default is defined as the first currency which is still in use.
724 *
725 * @param locale The code of the locale whose currency code we want.
726 * @returns The code of the default currency for the given locale.
727 *
728 * @publicApi
729 *
730 * @deprecated We recommend you create a map of locale to ISO 4217 currency codes.
731 * Time relative currency data is provided by the CLDR project. See https://www.unicode.org/cldr/charts/44/supplemental/detailed_territory_currency_information.html
732 */
733export declare function getLocaleCurrencyCode(locale: string): string | null;
734
735/**
736 * Retrieves the name of the currency for the main country corresponding
737 * to a given locale. For example, 'US Dollar' for `en-US`.
738 * @param locale A locale code for the locale format rules to use.
739 * @returns The currency name,
740 * or `null` if the main country cannot be determined.
741 * @see [Internationalization (i18n) Guide](guide/i18n)
742 *
743 * @publicApi
744 *
745 * @deprecated Use the `Intl` API to format a currency with from currency code
746 */
747export declare function getLocaleCurrencyName(locale: string): string | null;
748
749/**
750 * Retrieves the symbol used to represent the currency for the main country
751 * corresponding to a given locale. For example, '$' for `en-US`.
752 *
753 * @param locale A locale code for the locale format rules to use.
754 * @returns The localized symbol character,
755 * or `null` if the main country cannot be determined.
756 * @see [Internationalization (i18n) Guide](guide/i18n)
757 *
758 * @publicApi
759 *
760 * @deprecated Use the `Intl` API to format a currency with from currency code
761 */
762export declare function getLocaleCurrencySymbol(locale: string): string | null;
763
764/**
765 * Retrieves a localized date-value formatting string.
766 *
767 * @param locale A locale code for the locale format rules to use.
768 * @param width The format type.
769 * @returns The localized formatting string.
770 * @see {@link FormatWidth}
771 * @see [Internationalization (i18n) Guide](guide/i18n)
772 *
773 * @publicApi
774 *
775 * @deprecated Angular recommends relying on the `Intl` API for i18n.
776 * Use `Intl.DateTimeFormat` for date formating instead.
777 */
778export declare function getLocaleDateFormat(locale: string, width: FormatWidth): string;
779
780/**
781 * Retrieves a localized date-time formatting string.
782 *
783 * @param locale A locale code for the locale format rules to use.
784 * @param width The format type.
785 * @returns The localized formatting string.
786 * @see {@link FormatWidth}
787 * @see [Internationalization (i18n) Guide](guide/i18n)
788 *
789 * @publicApi
790 *
791 * @deprecated Angular recommends relying on the `Intl` API for i18n.
792 * Use `Intl.DateTimeFormat` for date formating instead.
793 */
794export declare function getLocaleDateTimeFormat(locale: string, width: FormatWidth): string;
795
796/**
797 * Retrieves days of the week for the given locale, using the Gregorian calendar.
798 *
799 * @param locale A locale code for the locale format rules to use.
800 * @param formStyle The required grammatical form.
801 * @param width The required character width.
802 * @returns An array of localized name strings.
803 * For example,`[Sunday, Monday, ... Saturday]` for `en-US`.
804 * @see [Internationalization (i18n) Guide](guide/i18n)
805 *
806 * @publicApi
807 *
808 * @deprecated Angular recommends relying on the `Intl` API for i18n.
809 * Use `Intl.DateTimeFormat` for date formating instead.
810 */
811export declare function getLocaleDayNames(locale: string, formStyle: FormStyle, width: TranslationWidth): ReadonlyArray<string>;
812
813/**
814 * Retrieves day period strings for the given locale.
815 *
816 * @param locale A locale code for the locale format rules to use.
817 * @param formStyle The required grammatical form.
818 * @param width The required character width.
819 * @returns An array of localized period strings. For example, `[AM, PM]` for `en-US`.
820 * @see [Internationalization (i18n) Guide](guide/i18n)
821 *
822 * @publicApi
823 *
824 * @deprecated Angular recommends relying on the `Intl` API for i18n.
825 * Use `Intl.DateTimeFormat` for date formating instead.
826 */
827export declare function getLocaleDayPeriods(locale: string, formStyle: FormStyle, width: TranslationWidth): Readonly<[string, string]>;
828
829/**
830 * Retrieves the writing direction of a specified locale
831 * @param locale A locale code for the locale format rules to use.
832 * @publicApi
833 * @returns 'rtl' or 'ltr'
834 * @see [Internationalization (i18n) Guide](guide/i18n)
835 *
836 * @deprecated Angular recommends relying on the `Intl` API for i18n.
837 * For dates and numbers, let `Intl.DateTimeFormat()` and `Intl.NumberFormat()` determine the writing direction.
838 * The `Intl` alternative [`getTextInfo`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo).
839 * has only partial support (Chromium M99 & Safari 17).
840 * 3rd party alternatives like [`rtl-detect`](https://www.npmjs.com/package/rtl-detect) can work around this issue.
841 */
842export declare function getLocaleDirection(locale: string): 'ltr' | 'rtl';
843
844/**
845 * Retrieves Gregorian-calendar eras for the given locale.
846 * @param locale A locale code for the locale format rules to use.
847 * @param width The required character width.
848
849 * @returns An array of localized era strings.
850 * For example, `[AD, BC]` for `en-US`.
851 * @see [Internationalization (i18n) Guide](guide/i18n)
852 *
853 * @publicApi
854 *
855 * @deprecated Angular recommends relying on the `Intl` API for i18n.
856 * Use `Intl.DateTimeFormat` for date formating instead.
857 */
858export declare function getLocaleEraNames(locale: string, width: TranslationWidth): Readonly<[string, string]>;
859
860/**
861 * Retrieves locale-specific rules used to determine which day period to use
862 * when more than one period is defined for a locale.
863 *
864 * There is a rule for each defined day period. The
865 * first rule is applied to the first day period and so on.
866 * Fall back to AM/PM when no rules are available.
867 *
868 * A rule can specify a period as time range, or as a single time value.
869 *
870 * This functionality is only available when you have loaded the full locale data.
871 * See the ["I18n guide"](guide/i18n/format-data-locale).
872 *
873 * @param locale A locale code for the locale format rules to use.
874 * @returns The rules for the locale, a single time value or array of *from-time, to-time*,
875 * or null if no periods are available.
876 *
877 * @see {@link getLocaleExtraDayPeriods}
878 * @see [Internationalization (i18n) Guide](guide/i18n)
879 *
880 * @publicApi
881 *
882 * @deprecated Angular recommends relying on the `Intl` API for i18n.
883 * Let `Intl.DateTimeFormat` determine the day period instead.
884 */
885export declare function getLocaleExtraDayPeriodRules(locale: string): (Time | [Time, Time])[];
886
887/**
888 * Retrieves locale-specific day periods, which indicate roughly how a day is broken up
889 * in different languages.
890 * For example, for `en-US`, periods are morning, noon, afternoon, evening, and midnight.
891 *
892 * This functionality is only available when you have loaded the full locale data.
893 * See the ["I18n guide"](guide/i18n/format-data-locale).
894 *
895 * @param locale A locale code for the locale format rules to use.
896 * @param formStyle The required grammatical form.
897 * @param width The required character width.
898 * @returns The translated day-period strings.
899 * @see {@link getLocaleExtraDayPeriodRules}
900 * @see [Internationalization (i18n) Guide](guide/i18n)
901 *
902 * @publicApi
903 *
904 * @deprecated Angular recommends relying on the `Intl` API for i18n.
905 * To extract a day period use `Intl.DateTimeFormat` with the `dayPeriod` option instead.
906 */
907export declare function getLocaleExtraDayPeriods(locale: string, formStyle: FormStyle, width: TranslationWidth): string[];
908
909/**
910 * Retrieves the first day of the week for the given locale.
911 *
912 * @param locale A locale code for the locale format rules to use.
913 * @returns A day index number, using the 0-based week-day index for `en-US`
914 * (Sunday = 0, Monday = 1, ...).
915 * For example, for `fr-FR`, returns 1 to indicate that the first day is Monday.
916 * @see [Internationalization (i18n) Guide](guide/i18n)
917 *
918 * @publicApi
919 *
920 * @deprecated Angular recommends relying on the `Intl` API for i18n.
921 * Intl's [`getWeekInfo`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo) has partial support (Chromium M99 & Safari 17).
922 * You may want to rely on the following alternatives:
923 * - Libraries like [`Luxon`](https://moment.github.io/luxon/#/) rely on `Intl` but fallback on the ISO 8601 definition (monday) if `getWeekInfo` is not supported.
924 * - Other librairies like [`date-fns`](https://date-fns.org/), [`day.js`](https://day.js.org/en/) or [`weekstart`](https://www.npmjs.com/package/weekstart) library provide their own locale based data for the first day of the week.
925 */
926export declare function getLocaleFirstDayOfWeek(locale: string): WeekDay;
927
928/**
929 * Retrieves the locale ID from the currently loaded locale.
930 * The loaded locale could be, for example, a global one rather than a regional one.
931 * @param locale A locale code, such as `fr-FR`.
932 * @returns The locale code. For example, `fr`.
933 * @see [Internationalization (i18n) Guide](guide/i18n)
934 *
935 * @publicApi
936 *
937 * @deprecated Angular recommends relying on the `Intl` API for i18n.
938 * This function serves no purpose when relying on the `Intl` API.
939 */
940export declare function getLocaleId(locale: string): string;
941
942/**
943 * Retrieves months of the year for the given locale, using the Gregorian calendar.
944 *
945 * @param locale A locale code for the locale format rules to use.
946 * @param formStyle The required grammatical form.
947 * @param width The required character width.
948 * @returns An array of localized name strings.
949 * For example, `[January, February, ...]` for `en-US`.
950 * @see [Internationalization (i18n) Guide](guide/i18n)
951 *
952 * @publicApi
953 *
954 * @deprecated Angular recommends relying on the `Intl` API for i18n.
955 * Use `Intl.DateTimeFormat` for date formating instead.
956 */
957export declare function getLocaleMonthNames(locale: string, formStyle: FormStyle, width: TranslationWidth): ReadonlyArray<string>;
958
959/**
960 * Retrieves a number format for a given locale.
961 *
962 * Numbers are formatted using patterns, like `#,###.00`. For example, the pattern `#,###.00`
963 * when used to format the number 12345.678 could result in "12'345,678". That would happen if the
964 * grouping separator for your language is an apostrophe, and the decimal separator is a comma.
965 *
966 * <b>Important:</b> The characters `.` `,` `0` `#` (and others below) are special placeholders
967 * that stand for the decimal separator, and so on, and are NOT real characters.
968 * You must NOT "translate" the placeholders. For example, don't change `.` to `,` even though in
969 * your language the decimal point is written with a comma. The symbols should be replaced by the
970 * local equivalents, using the appropriate `NumberSymbol` for your language.
971 *
972 * Here are the special characters used in number patterns:
973 *
974 * | Symbol | Meaning |
975 * |--------|---------|
976 * | . | Replaced automatically by the character used for the decimal point. |
977 * | , | Replaced by the "grouping" (thousands) separator. |
978 * | 0 | Replaced by a digit (or zero if there aren't enough digits). |
979 * | # | Replaced by a digit (or nothing if there aren't enough). |
980 * | ¤ | Replaced by a currency symbol, such as $ or USD. |
981 * | % | Marks a percent format. The % symbol may change position, but must be retained. |
982 * | E | Marks a scientific format. The E symbol may change position, but must be retained. |
983 * | ' | Special characters used as literal characters are quoted with ASCII single quotes. |
984 *
985 * @param locale A locale code for the locale format rules to use.
986 * @param type The type of numeric value to be formatted (such as `Decimal` or `Currency`.)
987 * @returns The localized format string.
988 * @see {@link NumberFormatStyle}
989 * @see [CLDR website](http://cldr.unicode.org/translation/number-patterns)
990 * @see [Internationalization (i18n) Guide](guide/i18n)
991 *
992 * @publicApi
993 *
994 * @deprecated Angular recommends relying on the `Intl` API for i18n.
995 * Let `Intl.NumberFormat` determine the number format instead
996 */
997export declare function getLocaleNumberFormat(locale: string, type: NumberFormatStyle): string;
998
999/**
1000 * Retrieves a localized number symbol that can be used to replace placeholders in number formats.
1001 * @param locale The locale code.
1002 * @param symbol The symbol to localize. Must be one of `NumberSymbol`.
1003 * @returns The character for the localized symbol.
1004 * @see {@link NumberSymbol}
1005 * @see [Internationalization (i18n) Guide](guide/i18n)
1006 *
1007 * @publicApi
1008 *
1009 * @deprecated Angular recommends relying on the `Intl` API for i18n.
1010 * Use `Intl.NumberFormat` to format numbers instead.
1011 */
1012export declare function getLocaleNumberSymbol(locale: string, symbol: NumberSymbol): string;
1013
1014/**
1015 * @publicApi
1016 *
1017 * @deprecated Angular recommends relying on the `Intl` API for i18n.
1018 * Use `Intl.PluralRules` instead
1019 */
1020export declare const getLocalePluralCase: (locale: string) => (value: number) => Plural;
1021
1022/**
1023 * Retrieves a localized time-value formatting string.
1024 *
1025 * @param locale A locale code for the locale format rules to use.
1026 * @param width The format type.
1027 * @returns The localized formatting string.
1028 * @see {@link FormatWidth}
1029 * @see [Internationalization (i18n) Guide](guide/i18n)
1030
1031 * @publicApi
1032 * @deprecated Angular recommends relying on the `Intl` API for i18n.
1033 * Use `Intl.DateTimeFormat` for date formating instead.
1034 */
1035export declare function getLocaleTimeFormat(locale: string, width: FormatWidth): string;
1036
1037/**
1038 * Range of week days that are considered the week-end for the given locale.
1039 *
1040 * @param locale A locale code for the locale format rules to use.
1041 * @returns The range of day values, `[startDay, endDay]`.
1042 * @see [Internationalization (i18n) Guide](guide/i18n)
1043 *
1044 * @publicApi
1045 *
1046 * @deprecated Angular recommends relying on the `Intl` API for i18n.
1047 * Intl's [`getWeekInfo`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo) has partial support (Chromium M99 & Safari 17).
1048 * Libraries like [`Luxon`](https://moment.github.io/luxon/#/) rely on `Intl` but fallback on the ISO 8601 definition (Saturday+Sunday) if `getWeekInfo` is not supported .
1049 */
1050export declare function getLocaleWeekEndRange(locale: string): [WeekDay, WeekDay];
1051
1052/**
1053 * Reports the number of decimal digits for a given currency.
1054 * The value depends upon the presence of cents in that particular currency.
1055 *
1056 * @param code The currency code.
1057 * @returns The number of decimal digits, typically 0 or 2.
1058 * @see [Internationalization (i18n) Guide](guide/i18n)
1059 *
1060 * @publicApi
1061 *
1062 * @deprecated Angular recommends relying on the `Intl` API for i18n.
1063 * This function should not be used anymore. Let `Intl.NumberFormat` determine the number of digits to display for the currency
1064 */
1065export declare function getNumberOfCurrencyDigits(code: string): number;
1066
1067/**
1068 * @description
1069 * A {@link LocationStrategy} used to configure the {@link Location} service to
1070 * represent its state in the
1071 * [hash fragment](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax)
1072 * of the browser's URL.
1073 *
1074 * For instance, if you call `location.go('/foo')`, the browser's URL will become
1075 * `example.com#/foo`.
1076 *
1077 * @usageNotes
1078 *
1079 * ### Example
1080 *
1081 * {@example common/location/ts/hash_location_component.ts region='LocationComponent'}
1082 *
1083 * @publicApi
1084 */
1085export declare class HashLocationStrategy extends LocationStrategy implements OnDestroy {
1086 private _platformLocation;
1087 private _baseHref;
1088 private _removeListenerFns;
1089 constructor(_platformLocation: PlatformLocation, _baseHref?: string);
1090 /** @nodoc */
1091 ngOnDestroy(): void;
1092 onPopState(fn: LocationChangeListener): void;
1093 getBaseHref(): string;
1094 path(includeHash?: boolean): string;
1095 prepareExternalUrl(internal: string): string;
1096 pushState(state: any, title: string, path: string, queryParams: string): void;
1097 replaceState(state: any, title: string, path: string, queryParams: string): void;
1098 forward(): void;
1099 back(): void;
1100 getState(): unknown;
1101 historyGo(relativePosition?: number): void;
1102 static ɵfac: i0.ɵɵFactoryDeclaration<HashLocationStrategy, [null, { optional: true; }]>;
1103 static ɵprov: i0.ɵɵInjectableDeclaration<HashLocationStrategy>;
1104}
1105
1106declare namespace i1 {
1107 export {
1108 NgClass
1109 }
1110}
1111
1112declare namespace i10 {
1113 export {
1114 LowerCasePipe,
1115 TitleCasePipe,
1116 UpperCasePipe
1117 }
1118}
1119
1120declare namespace i11 {
1121 export {
1122 JsonPipe
1123 }
1124}
1125
1126declare namespace i12 {
1127 export {
1128 SlicePipe
1129 }
1130}
1131
1132declare namespace i13 {
1133 export {
1134 DecimalPipe,
1135 PercentPipe,
1136 CurrencyPipe
1137 }
1138}
1139
1140declare namespace i14 {
1141 export {
1142 DATE_PIPE_DEFAULT_TIMEZONE,
1143 DATE_PIPE_DEFAULT_OPTIONS,
1144 DatePipe
1145 }
1146}
1147
1148declare namespace i15 {
1149 export {
1150 I18nPluralPipe
1151 }
1152}
1153
1154declare namespace i16 {
1155 export {
1156 I18nSelectPipe
1157 }
1158}
1159
1160declare namespace i17 {
1161 export {
1162 defaultComparator,
1163 KeyValue,
1164 KeyValuePipe
1165 }
1166}
1167
1168/**
1169 * @ngModule CommonModule
1170 * @description
1171 *
1172 * Maps a value to a string that pluralizes the value according to locale rules.
1173 *
1174 * @usageNotes
1175 *
1176 * ### Example
1177 *
1178 * {@example common/pipes/ts/i18n_pipe.ts region='I18nPluralPipeComponent'}
1179 *
1180 * @publicApi
1181 */
1182export declare class I18nPluralPipe implements PipeTransform {
1183 private _localization;
1184 constructor(_localization: NgLocalization);
1185 /**
1186 * @param value the number to be formatted
1187 * @param pluralMap an object that mimics the ICU format, see
1188 * https://unicode-org.github.io/icu/userguide/format_parse/messages/.
1189 * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by
1190 * default).
1191 */
1192 transform(value: number | null | undefined, pluralMap: {
1193 [count: string]: string;
1194 }, locale?: string): string;
1195 static ɵfac: i0.ɵɵFactoryDeclaration<I18nPluralPipe, never>;
1196 static ɵpipe: i0.ɵɵPipeDeclaration<I18nPluralPipe, "i18nPlural", true>;
1197}
1198
1199/**
1200 * @ngModule CommonModule
1201 * @description
1202 *
1203 * Generic selector that displays the string that matches the current value.
1204 *
1205 * If none of the keys of the `mapping` match the `value`, then the content
1206 * of the `other` key is returned when present, otherwise an empty string is returned.
1207 *
1208 * @usageNotes
1209 *
1210 * ### Example
1211 *
1212 * {@example common/pipes/ts/i18n_pipe.ts region='I18nSelectPipeComponent'}
1213 *
1214 * @publicApi
1215 */
1216export declare class I18nSelectPipe implements PipeTransform {
1217 /**
1218 * @param value a string to be internationalized.
1219 * @param mapping an object that indicates the text that should be displayed
1220 * for different values of the provided `value`.
1221 */
1222 transform(value: string | null | undefined, mapping: {
1223 [key: string]: string;
1224 }): string;
1225 static ɵfac: i0.ɵɵFactoryDeclaration<I18nSelectPipe, never>;
1226 static ɵpipe: i0.ɵɵPipeDeclaration<I18nSelectPipe, "i18nSelect", true>;
1227}
1228
1229declare namespace i2 {
1230 export {
1231 NgComponentOutlet
1232 }
1233}
1234
1235declare namespace i3 {
1236 export {
1237 NgForOfContext,
1238 NgForOf,
1239 NgForOf as NgFor
1240 }
1241}
1242
1243declare namespace i4 {
1244 export {
1245 NgIf,
1246 NgIfContext
1247 }
1248}
1249
1250declare namespace i5 {
1251 export {
1252 NgTemplateOutlet
1253 }
1254}
1255
1256declare namespace i6 {
1257 export {
1258 NgStyle
1259 }
1260}
1261
1262declare namespace i7 {
1263 export {
1264 SwitchView,
1265 NgSwitch,
1266 NgSwitchCase,
1267 NgSwitchDefault
1268 }
1269}
1270
1271declare namespace i8 {
1272 export {
1273 NgPlural,
1274 NgPluralCase
1275 }
1276}
1277
1278declare namespace i9 {
1279 export {
1280 AsyncPipe
1281 }
1282}
1283
1284export { IMAGE_CONFIG }
1285
1286/**
1287 * Injection token that configures the image loader function.
1288 *
1289 * @see {@link ImageLoader}
1290 * @see {@link NgOptimizedImage}
1291 * @publicApi
1292 */
1293export declare const IMAGE_LOADER: InjectionToken<ImageLoader>;
1294
1295export { ImageConfig }
1296
1297/**
1298 * Represents an image loader function. Image loader functions are used by the
1299 * NgOptimizedImage directive to produce full image URL based on the image name and its width.
1300 *
1301 * @publicApi
1302 */
1303export declare type ImageLoader = (config: ImageLoaderConfig) => string;
1304
1305/**
1306 * Config options recognized by the image loader function.
1307 *
1308 * @see {@link ImageLoader}
1309 * @see {@link NgOptimizedImage}
1310 * @publicApi
1311 */
1312export declare interface ImageLoaderConfig {
1313 /**
1314 * Image file name to be added to the image request URL.
1315 */
1316 src: string;
1317 /**
1318 * Width of the requested image (to be used when generating srcset).
1319 */
1320 width?: number;
1321 /**
1322 * Whether the loader should generate a URL for a small image placeholder instead of a full-sized
1323 * image.
1324 */
1325 isPlaceholder?: boolean;
1326 /**
1327 * Additional user-provided parameters for use by the ImageLoader.
1328 */
1329 loaderParams?: {
1330 [key: string]: any;
1331 };
1332}
1333
1334/**
1335 * Config options used in rendering placeholder images.
1336 *
1337 * @see {@link NgOptimizedImage}
1338 * @publicApi
1339 */
1340export declare interface ImagePlaceholderConfig {
1341 blur?: boolean;
1342}
1343
1344/**
1345 * Returns whether a platform id represents a browser platform.
1346 * @publicApi
1347 */
1348export declare function isPlatformBrowser(platformId: Object): boolean;
1349
1350/**
1351 * Returns whether a platform id represents a server platform.
1352 * @publicApi
1353 */
1354export declare function isPlatformServer(platformId: Object): boolean;
1355
1356/**
1357 * @ngModule CommonModule
1358 * @description
1359 *
1360 * Converts a value into its JSON-format representation. Useful for debugging.
1361 *
1362 * @usageNotes
1363 *
1364 * The following component uses a JSON pipe to convert an object
1365 * to JSON format, and displays the string in both formats for comparison.
1366 *
1367 * {@example common/pipes/ts/json_pipe.ts region='JsonPipe'}
1368 *
1369 * @publicApi
1370 */
1371export declare class JsonPipe implements PipeTransform {
1372 /**
1373 * @param value A value of any type to convert into a JSON-format string.
1374 */
1375 transform(value: any): string;
1376 static ɵfac: i0.ɵɵFactoryDeclaration<JsonPipe, never>;
1377 static ɵpipe: i0.ɵɵPipeDeclaration<JsonPipe, "json", true>;
1378}
1379
1380/**
1381 * A key value pair.
1382 * Usually used to represent the key value pairs from a Map or Object.
1383 *
1384 * @publicApi
1385 */
1386export declare interface KeyValue<K, V> {
1387 key: K;
1388 value: V;
1389}
1390
1391/**
1392 * @ngModule CommonModule
1393 * @description
1394 *
1395 * Transforms Object or Map into an array of key value pairs.
1396 *
1397 * The output array will be ordered by keys.
1398 * By default the comparator will be by Unicode point value.
1399 * You can optionally pass a compareFn if your keys are complex types.
1400 * Passing `null` as the compareFn will use natural ordering of the input.
1401 *
1402 * @usageNotes
1403 * ### Examples
1404 *
1405 * This examples show how an Object or a Map can be iterated by ngFor with the use of this
1406 * keyvalue pipe.
1407 *
1408 * {@example common/pipes/ts/keyvalue_pipe.ts region='KeyValuePipe'}
1409 *
1410 * @publicApi
1411 */
1412export declare class KeyValuePipe implements PipeTransform {
1413 private readonly differs;
1414 constructor(differs: KeyValueDiffers);
1415 private differ;
1416 private keyValues;
1417 private compareFn;
1418 transform<K, V>(input: ReadonlyMap<K, V>, compareFn?: ((a: KeyValue<K, V>, b: KeyValue<K, V>) => number) | null): Array<KeyValue<K, V>>;
1419 transform<K extends number, V>(input: Record<K, V>, compareFn?: ((a: KeyValue<string, V>, b: KeyValue<string, V>) => number) | null): Array<KeyValue<string, V>>;
1420 transform<K extends string, V>(input: Record<K, V> | ReadonlyMap<K, V>, compareFn?: ((a: KeyValue<K, V>, b: KeyValue<K, V>) => number) | null): Array<KeyValue<K, V>>;
1421 transform(input: null | undefined, compareFn?: ((a: KeyValue<unknown, unknown>, b: KeyValue<unknown, unknown>) => number) | null): null;
1422 transform<K, V>(input: ReadonlyMap<K, V> | null | undefined, compareFn?: ((a: KeyValue<K, V>, b: KeyValue<K, V>) => number) | null): Array<KeyValue<K, V>> | null;
1423 transform<K extends number, V>(input: Record<K, V> | null | undefined, compareFn?: ((a: KeyValue<string, V>, b: KeyValue<string, V>) => number) | null): Array<KeyValue<string, V>> | null;
1424 transform<K extends string, V>(input: Record<K, V> | ReadonlyMap<K, V> | null | undefined, compareFn?: ((a: KeyValue<K, V>, b: KeyValue<K, V>) => number) | null): Array<KeyValue<K, V>> | null;
1425 static ɵfac: i0.ɵɵFactoryDeclaration<KeyValuePipe, never>;
1426 static ɵpipe: i0.ɵɵPipeDeclaration<KeyValuePipe, "keyvalue", true>;
1427}
1428
1429/**
1430 * @description
1431 *
1432 * A service that applications can use to interact with a browser's URL.
1433 *
1434 * Depending on the `LocationStrategy` used, `Location` persists
1435 * to the URL's path or the URL's hash segment.
1436 *
1437 * @usageNotes
1438 *
1439 * It's better to use the `Router.navigate()` service to trigger route changes. Use
1440 * `Location` only if you need to interact with or create normalized URLs outside of
1441 * routing.
1442 *
1443 * `Location` is responsible for normalizing the URL against the application's base href.
1444 * A normalized URL is absolute from the URL host, includes the application's base href, and has no
1445 * trailing slash:
1446 * - `/my/app/user/123` is normalized
1447 * - `my/app/user/123` **is not** normalized
1448 * - `/my/app/user/123/` **is not** normalized
1449 *
1450 * ### Example
1451 *
1452 * {@example common/location/ts/path_location_component.ts region='LocationComponent'}
1453 *
1454 * @publicApi
1455 */
1456declare class Location_2 implements OnDestroy {
1457 constructor(locationStrategy: LocationStrategy);
1458 /** @nodoc */
1459 ngOnDestroy(): void;
1460 /**
1461 * Normalizes the URL path for this location.
1462 *
1463 * @param includeHash True to include an anchor fragment in the path.
1464 *
1465 * @returns The normalized URL path.
1466 */
1467 path(includeHash?: boolean): string;
1468 /**
1469 * Reports the current state of the location history.
1470 * @returns The current value of the `history.state` object.
1471 */
1472 getState(): unknown;
1473 /**
1474 * Normalizes the given path and compares to the current normalized path.
1475 *
1476 * @param path The given URL path.
1477 * @param query Query parameters.
1478 *
1479 * @returns True if the given URL path is equal to the current normalized path, false
1480 * otherwise.
1481 */
1482 isCurrentPathEqualTo(path: string, query?: string): boolean;
1483 /**
1484 * Normalizes a URL path by stripping any trailing slashes.
1485 *
1486 * @param url String representing a URL.
1487 *
1488 * @returns The normalized URL string.
1489 */
1490 normalize(url: string): string;
1491 /**
1492 * Normalizes an external URL path.
1493 * If the given URL doesn't begin with a leading slash (`'/'`), adds one
1494 * before normalizing. Adds a hash if `HashLocationStrategy` is
1495 * in use, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use.
1496 *
1497 * @param url String representing a URL.
1498 *
1499 * @returns A normalized platform-specific URL.
1500 */
1501 prepareExternalUrl(url: string): string;
1502 /**
1503 * Changes the browser's URL to a normalized version of a given URL, and pushes a
1504 * new item onto the platform's history.
1505 *
1506 * @param path URL path to normalize.
1507 * @param query Query parameters.
1508 * @param state Location history state.
1509 *
1510 */
1511 go(path: string, query?: string, state?: any): void;
1512 /**
1513 * Changes the browser's URL to a normalized version of the given URL, and replaces
1514 * the top item on the platform's history stack.
1515 *
1516 * @param path URL path to normalize.
1517 * @param query Query parameters.
1518 * @param state Location history state.
1519 */
1520 replaceState(path: string, query?: string, state?: any): void;
1521 /**
1522 * Navigates forward in the platform's history.
1523 */
1524 forward(): void;
1525 /**
1526 * Navigates back in the platform's history.
1527 */
1528 back(): void;
1529 /**
1530 * Navigate to a specific page from session history, identified by its relative position to the
1531 * current page.
1532 *
1533 * @param relativePosition Position of the target page in the history relative to the current
1534 * page.
1535 * A negative value moves backwards, a positive value moves forwards, e.g. `location.historyGo(2)`
1536 * moves forward two pages and `location.historyGo(-2)` moves back two pages. When we try to go
1537 * beyond what's stored in the history session, we stay in the current page. Same behaviour occurs
1538 * when `relativePosition` equals 0.
1539 * @see https://developer.mozilla.org/en-US/docs/Web/API/History_API#Moving_to_a_specific_point_in_history
1540 */
1541 historyGo(relativePosition?: number): void;
1542 /**
1543 * Registers a URL change listener. Use to catch updates performed by the Angular
1544 * framework that are not detectible through "popstate" or "hashchange" events.
1545 *
1546 * @param fn The change handler function, which take a URL and a location history state.
1547 * @returns A function that, when executed, unregisters a URL change listener.
1548 */
1549 onUrlChange(fn: (url: string, state: unknown) => void): VoidFunction;
1550 /**
1551 * Subscribes to the platform's `popState` events.
1552 *
1553 * Note: `Location.go()` does not trigger the `popState` event in the browser. Use
1554 * `Location.onUrlChange()` to subscribe to URL changes instead.
1555 *
1556 * @param value Event that is triggered when the state history changes.
1557 * @param exception The exception to throw.
1558 *
1559 * @see [onpopstate](https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate)
1560 *
1561 * @returns Subscribed events.
1562 */
1563 subscribe(onNext: (value: PopStateEvent_2) => void, onThrow?: ((exception: any) => void) | null, onReturn?: (() => void) | null): SubscriptionLike;
1564 /**
1565 * Normalizes URL parameters by prepending with `?` if needed.
1566 *
1567 * @param params String of URL parameters.
1568 *
1569 * @returns The normalized URL parameters string.
1570 */
1571 static normalizeQueryParams: (params: string) => string;
1572 /**
1573 * Joins two parts of a URL with a slash if needed.
1574 *
1575 * @param start URL string
1576 * @param end URL string
1577 *
1578 *
1579 * @returns The joined URL string.
1580 */
1581 static joinWithSlash: (start: string, end: string) => string;
1582 /**
1583 * Removes a trailing slash from a URL string if needed.
1584 * Looks for the first occurrence of either `#`, `?`, or the end of the
1585 * line as `/` characters and removes the trailing slash if one exists.
1586 *
1587 * @param url URL string.
1588 *
1589 * @returns The URL string, modified if needed.
1590 */
1591 static stripTrailingSlash: (url: string) => string;
1592 static ɵfac: i0.ɵɵFactoryDeclaration<Location_2, never>;
1593 static ɵprov: i0.ɵɵInjectableDeclaration<Location_2>;
1594}
1595export { Location_2 as Location }
1596
1597/**
1598 * @description
1599 * Indicates when a location is initialized.
1600 *
1601 * @publicApi
1602 */
1603export declare const LOCATION_INITIALIZED: InjectionToken<Promise<any>>;
1604
1605/**
1606 * @description
1607 * A serializable version of the event from `onPopState` or `onHashChange`
1608 *
1609 * @publicApi
1610 */
1611export declare interface LocationChangeEvent {
1612 type: string;
1613 state: any;
1614}
1615
1616/**
1617 * @publicApi
1618 */
1619export declare interface LocationChangeListener {
1620 (event: LocationChangeEvent): any;
1621}
1622
1623/**
1624 * Enables the `Location` service to read route state from the browser's URL.
1625 * Angular provides two strategies:
1626 * `HashLocationStrategy` and `PathLocationStrategy`.
1627 *
1628 * Applications should use the `Router` or `Location` services to
1629 * interact with application route state.
1630 *
1631 * For instance, `HashLocationStrategy` produces URLs like
1632 * <code class="no-auto-link">http://example.com/#/foo</code>,
1633 * and `PathLocationStrategy` produces
1634 * <code class="no-auto-link">http://example.com/foo</code> as an equivalent URL.
1635 *
1636 * See these two classes for more.
1637 *
1638 * @publicApi
1639 */
1640export declare abstract class LocationStrategy {
1641 abstract path(includeHash?: boolean): string;
1642 abstract prepareExternalUrl(internal: string): string;
1643 abstract getState(): unknown;
1644 abstract pushState(state: any, title: string, url: string, queryParams: string): void;
1645 abstract replaceState(state: any, title: string, url: string, queryParams: string): void;
1646 abstract forward(): void;
1647 abstract back(): void;
1648 historyGo?(relativePosition: number): void;
1649 abstract onPopState(fn: LocationChangeListener): void;
1650 abstract getBaseHref(): string;
1651 static ɵfac: i0.ɵɵFactoryDeclaration<LocationStrategy, never>;
1652 static ɵprov: i0.ɵɵInjectableDeclaration<LocationStrategy>;
1653}
1654
1655/**
1656 * Transforms text to all lower case.
1657 *
1658 * @see {@link UpperCasePipe}
1659 * @see {@link TitleCasePipe}
1660 * @usageNotes
1661 *
1662 * The following example defines a view that allows the user to enter
1663 * text, and then uses the pipe to convert the input text to all lower case.
1664 *
1665 * {@example common/pipes/ts/lowerupper_pipe.ts region='LowerUpperPipe'}
1666 *
1667 * @ngModule CommonModule
1668 * @publicApi
1669 */
1670export declare class LowerCasePipe implements PipeTransform {
1671 /**
1672 * @param value The string to transform to lower case.
1673 */
1674 transform(value: string): string;
1675 transform(value: null | undefined): null;
1676 transform(value: string | null | undefined): string | null;
1677 static ɵfac: i0.ɵɵFactoryDeclaration<LowerCasePipe, never>;
1678 static ɵpipe: i0.ɵɵPipeDeclaration<LowerCasePipe, "lowercase", true>;
1679}
1680
1681declare class NavigateEvent extends Event {
1682 constructor(type: string, eventInit?: NavigateEventInit);
1683 readonly navigationType: NavigationTypeString;
1684 readonly canIntercept: boolean;
1685 readonly userInitiated: boolean;
1686 readonly hashChange: boolean;
1687 readonly destination: NavigationDestination;
1688 readonly signal: AbortSignal;
1689 readonly formData: FormData | null;
1690 readonly downloadRequest: string | null;
1691 readonly info?: unknown;
1692 intercept(options?: NavigationInterceptOptions): void;
1693 scroll(): void;
1694}
1695
1696declare interface NavigateEventInit extends EventInit {
1697 navigationType?: NavigationTypeString;
1698 canIntercept?: boolean;
1699 userInitiated?: boolean;
1700 hashChange?: boolean;
1701 destination: NavigationDestination;
1702 signal: AbortSignal;
1703 formData?: FormData | null;
1704 downloadRequest?: string | null;
1705 info?: unknown;
1706}
1707
1708declare class Navigation extends EventTarget {
1709 entries(): NavigationHistoryEntry[];
1710 readonly currentEntry: NavigationHistoryEntry | null;
1711 updateCurrentEntry(options: NavigationUpdateCurrentEntryOptions): void;
1712 readonly transition: NavigationTransition | null;
1713 readonly canGoBack: boolean;
1714 readonly canGoForward: boolean;
1715 navigate(url: string, options?: NavigationNavigateOptions): NavigationResult;
1716 reload(options?: NavigationReloadOptions): NavigationResult;
1717 traverseTo(key: string, options?: NavigationOptions): NavigationResult;
1718 back(options?: NavigationOptions): NavigationResult;
1719 forward(options?: NavigationOptions): NavigationResult;
1720 onnavigate: ((this: Navigation, ev: NavigateEvent) => any) | null;
1721 onnavigatesuccess: ((this: Navigation, ev: Event) => any) | null;
1722 onnavigateerror: ((this: Navigation, ev: ErrorEvent) => any) | null;
1723 oncurrententrychange: ((this: Navigation, ev: NavigationCurrentEntryChangeEvent) => any) | null;
1724 addEventListener<K extends keyof NavigationEventMap>(type: K, listener: (this: Navigation, ev: NavigationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1725 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1726 removeEventListener<K extends keyof NavigationEventMap>(type: K, listener: (this: Navigation, ev: NavigationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1727 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1728}
1729
1730declare class NavigationCurrentEntryChangeEvent extends Event {
1731 constructor(type: string, eventInit?: NavigationCurrentEntryChangeEventInit);
1732 readonly navigationType: NavigationTypeString | null;
1733 readonly from: NavigationHistoryEntry;
1734}
1735
1736declare interface NavigationCurrentEntryChangeEventInit extends EventInit {
1737 navigationType?: NavigationTypeString | null;
1738 from: NavigationHistoryEntry;
1739}
1740
1741declare class NavigationDestination {
1742 readonly url: string;
1743 readonly key: string | null;
1744 readonly id: string | null;
1745 readonly index: number;
1746 readonly sameDocument: boolean;
1747 getState(): unknown;
1748}
1749
1750
1751declare interface NavigationEventMap {
1752 navigate: NavigateEvent;
1753 navigatesuccess: Event;
1754 navigateerror: ErrorEvent;
1755 currententrychange: NavigationCurrentEntryChangeEvent;
1756}
1757
1758declare class NavigationHistoryEntry extends EventTarget {
1759 readonly key: string;
1760 readonly id: string;
1761 readonly url: string | null;
1762 readonly index: number;
1763 readonly sameDocument: boolean;
1764 getState(): unknown;
1765 ondispose: ((this: NavigationHistoryEntry, ev: Event) => any) | null;
1766 addEventListener<K extends keyof NavigationHistoryEntryEventMap>(type: K, listener: (this: NavigationHistoryEntry, ev: NavigationHistoryEntryEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1767 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1768 removeEventListener<K extends keyof NavigationHistoryEntryEventMap>(type: K, listener: (this: NavigationHistoryEntry, ev: NavigationHistoryEntryEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1769 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1770}
1771
1772declare interface NavigationHistoryEntryEventMap {
1773 dispose: Event;
1774}
1775
1776declare interface NavigationInterceptOptions {
1777 handler?: () => Promise<void>;
1778 focusReset?: 'after-transition' | 'manual';
1779 scroll?: 'after-transition' | 'manual';
1780}
1781
1782declare interface NavigationNavigateOptions extends NavigationOptions {
1783 state?: unknown;
1784 history?: 'auto' | 'push' | 'replace';
1785}
1786
1787declare interface NavigationOptions {
1788 info?: unknown;
1789}
1790
1791declare interface NavigationReloadOptions extends NavigationOptions {
1792 state?: unknown;
1793}
1794
1795declare interface NavigationResult {
1796 committed: Promise<NavigationHistoryEntry>;
1797 finished: Promise<NavigationHistoryEntry>;
1798}
1799
1800declare class NavigationTransition {
1801 readonly navigationType: NavigationTypeString;
1802 readonly from: NavigationHistoryEntry;
1803 readonly finished: Promise<void>;
1804}
1805
1806declare type NavigationTypeString = 'reload' | 'push' | 'replace' | 'traverse';
1807
1808declare interface NavigationUpdateCurrentEntryOptions {
1809 state: unknown;
1810}
1811
1812/**
1813 * @ngModule CommonModule
1814 *
1815 * @usageNotes
1816 * ```html
1817 * <some-element [ngClass]="'first second'">...</some-element>
1818 *
1819 * <some-element [ngClass]="['first', 'second']">...</some-element>
1820 *
1821 * <some-element [ngClass]="{'first': true, 'second': true, 'third': false}">...</some-element>
1822 *
1823 * <some-element [ngClass]="stringExp|arrayExp|objExp">...</some-element>
1824 *
1825 * <some-element [ngClass]="{'class1 class2 class3' : true}">...</some-element>
1826 * ```
1827 *
1828 * @description
1829 *
1830 * Adds and removes CSS classes on an HTML element.
1831 *
1832 * The CSS classes are updated as follows, depending on the type of the expression evaluation:
1833 * - `string` - the CSS classes listed in the string (space delimited) are added,
1834 * - `Array` - the CSS classes declared as Array elements are added,
1835 * - `Object` - keys are CSS classes that get added when the expression given in the value
1836 * evaluates to a truthy value, otherwise they are removed.
1837 *
1838 * @publicApi
1839 */
1840export declare class NgClass implements DoCheck {
1841 private _ngEl;
1842 private _renderer;
1843 private initialClasses;
1844 private rawClass;
1845 private stateMap;
1846 constructor(_ngEl: ElementRef, _renderer: Renderer2);
1847 set klass(value: string);
1848 set ngClass(value: string | string[] | Set<string> | {
1849 [klass: string]: any;
1850 } | null | undefined);
1851 ngDoCheck(): void;
1852 private _updateState;
1853 private _applyStateDiff;
1854 private _toggleClass;
1855 static ɵfac: i0.ɵɵFactoryDeclaration<NgClass, never>;
1856 static ɵdir: i0.ɵɵDirectiveDeclaration<NgClass, "[ngClass]", never, { "klass": { "alias": "class"; "required": false; }; "ngClass": { "alias": "ngClass"; "required": false; }; }, {}, never, never, true, never>;
1857}
1858
1859/**
1860 * Instantiates a {@link Component} type and inserts its Host View into the current View.
1861 * `NgComponentOutlet` provides a declarative approach for dynamic component creation.
1862 *
1863 * `NgComponentOutlet` requires a component type, if a falsy value is set the view will clear and
1864 * any existing component will be destroyed.
1865 *
1866 * @usageNotes
1867 *
1868 * ### Fine tune control
1869 *
1870 * You can control the component creation process by using the following optional attributes:
1871 *
1872 * * `ngComponentOutletInputs`: Optional component inputs object, which will be bind to the
1873 * component.
1874 *
1875 * * `ngComponentOutletInjector`: Optional custom {@link Injector} that will be used as parent for
1876 * the Component. Defaults to the injector of the current view container.
1877 *
1878 * * `ngComponentOutletContent`: Optional list of projectable nodes to insert into the content
1879 * section of the component, if it exists.
1880 *
1881 * * `ngComponentOutletNgModule`: Optional NgModule class reference to allow loading another
1882 * module dynamically, then loading a component from that module.
1883 *
1884 * * `ngComponentOutletNgModuleFactory`: Deprecated config option that allows providing optional
1885 * NgModule factory to allow loading another module dynamically, then loading a component from that
1886 * module. Use `ngComponentOutletNgModule` instead.
1887 *
1888 * ### Syntax
1889 *
1890 * Simple
1891 * ```html
1892 * <ng-container *ngComponentOutlet="componentTypeExpression"></ng-container>
1893 * ```
1894 *
1895 * With inputs
1896 * ```html
1897 * <ng-container *ngComponentOutlet="componentTypeExpression;
1898 * inputs: inputsExpression;">
1899 * </ng-container>
1900 * ```
1901 *
1902 * Customized injector/content
1903 * ```html
1904 * <ng-container *ngComponentOutlet="componentTypeExpression;
1905 * injector: injectorExpression;
1906 * content: contentNodesExpression;">
1907 * </ng-container>
1908 * ```
1909 *
1910 * Customized NgModule reference
1911 * ```html
1912 * <ng-container *ngComponentOutlet="componentTypeExpression;
1913 * ngModule: ngModuleClass;">
1914 * </ng-container>
1915 * ```
1916 *
1917 * ### A simple example
1918 *
1919 * {@example common/ngComponentOutlet/ts/module.ts region='SimpleExample'}
1920 *
1921 * A more complete example with additional options:
1922 *
1923 * {@example common/ngComponentOutlet/ts/module.ts region='CompleteExample'}
1924 *
1925 * @publicApi
1926 * @ngModule CommonModule
1927 */
1928export declare class NgComponentOutlet implements OnChanges, DoCheck, OnDestroy {
1929 private _viewContainerRef;
1930 ngComponentOutlet: Type<any> | null;
1931 ngComponentOutletInputs?: Record<string, unknown>;
1932 ngComponentOutletInjector?: Injector;
1933 ngComponentOutletContent?: any[][];
1934 ngComponentOutletNgModule?: Type<any>;
1935 /**
1936 * @deprecated This input is deprecated, use `ngComponentOutletNgModule` instead.
1937 */
1938 ngComponentOutletNgModuleFactory?: NgModuleFactory<any>;
1939 private _componentRef;
1940 private _moduleRef;
1941 /**
1942 * A helper data structure that allows us to track inputs that were part of the
1943 * ngComponentOutletInputs expression. Tracking inputs is necessary for proper removal of ones
1944 * that are no longer referenced.
1945 */
1946 private _inputsUsed;
1947 constructor(_viewContainerRef: ViewContainerRef);
1948 private _needToReCreateNgModuleInstance;
1949 private _needToReCreateComponentInstance;
1950 /** @nodoc */
1951 ngOnChanges(changes: SimpleChanges): void;
1952 /** @nodoc */
1953 ngDoCheck(): void;
1954 /** @nodoc */
1955 ngOnDestroy(): void;
1956 private _applyInputStateDiff;
1957 static ɵfac: i0.ɵɵFactoryDeclaration<NgComponentOutlet, never>;
1958 static ɵdir: i0.ɵɵDirectiveDeclaration<NgComponentOutlet, "[ngComponentOutlet]", never, { "ngComponentOutlet": { "alias": "ngComponentOutlet"; "required": false; }; "ngComponentOutletInputs": { "alias": "ngComponentOutletInputs"; "required": false; }; "ngComponentOutletInjector": { "alias": "ngComponentOutletInjector"; "required": false; }; "ngComponentOutletContent": { "alias": "ngComponentOutletContent"; "required": false; }; "ngComponentOutletNgModule": { "alias": "ngComponentOutletNgModule"; "required": false; }; "ngComponentOutletNgModuleFactory": { "alias": "ngComponentOutletNgModuleFactory"; "required": false; }; }, {}, never, never, true, never>;
1959}
1960
1961/**
1962 * A [structural directive](guide/directives/structural-directives) that renders
1963 * a template for each item in a collection.
1964 * The directive is placed on an element, which becomes the parent
1965 * of the cloned templates.
1966 *
1967 * The `ngForOf` directive is generally used in the
1968 * [shorthand form](guide/directives/structural-directives#asterisk) `*ngFor`.
1969 * In this form, the template to be rendered for each iteration is the content
1970 * of an anchor element containing the directive.
1971 *
1972 * The following example shows the shorthand syntax with some options,
1973 * contained in an `<li>` element.
1974 *
1975 * ```html
1976 * <li *ngFor="let item of items; index as i; trackBy: trackByFn">...</li>
1977 * ```
1978 *
1979 * The shorthand form expands into a long form that uses the `ngForOf` selector
1980 * on an `<ng-template>` element.
1981 * The content of the `<ng-template>` element is the `<li>` element that held the
1982 * short-form directive.
1983 *
1984 * Here is the expanded version of the short-form example.
1985 *
1986 * ```html
1987 * <ng-template ngFor let-item [ngForOf]="items" let-i="index" [ngForTrackBy]="trackByFn">
1988 * <li>...</li>
1989 * </ng-template>
1990 * ```
1991 *
1992 * Angular automatically expands the shorthand syntax as it compiles the template.
1993 * The context for each embedded view is logically merged to the current component
1994 * context according to its lexical position.
1995 *
1996 * When using the shorthand syntax, Angular allows only [one structural directive
1997 * on an element](guide/directives/structural-directives#one-per-element).
1998 * If you want to iterate conditionally, for example,
1999 * put the `*ngIf` on a container element that wraps the `*ngFor` element.
2000 * For further discussion, see
2001 * [Structural Directives](guide/directives/structural-directives#one-per-element).
2002 *
2003 * @usageNotes
2004 *
2005 * ### Local variables
2006 *
2007 * `NgForOf` provides exported values that can be aliased to local variables.
2008 * For example:
2009 *
2010 * ```html
2011 * <li *ngFor="let user of users; index as i; first as isFirst">
2012 * {{i}}/{{users.length}}. {{user}} <span *ngIf="isFirst">default</span>
2013 * </li>
2014 * ```
2015 *
2016 * The following exported values can be aliased to local variables:
2017 *
2018 * - `$implicit: T`: The value of the individual items in the iterable (`ngForOf`).
2019 * - `ngForOf: NgIterable<T>`: The value of the iterable expression. Useful when the expression is
2020 * more complex then a property access, for example when using the async pipe (`userStreams |
2021 * async`).
2022 * - `index: number`: The index of the current item in the iterable.
2023 * - `count: number`: The length of the iterable.
2024 * - `first: boolean`: True when the item is the first item in the iterable.
2025 * - `last: boolean`: True when the item is the last item in the iterable.
2026 * - `even: boolean`: True when the item has an even index in the iterable.
2027 * - `odd: boolean`: True when the item has an odd index in the iterable.
2028 *
2029 * ### Change propagation
2030 *
2031 * When the contents of the iterator changes, `NgForOf` makes the corresponding changes to the DOM:
2032 *
2033 * * When an item is added, a new instance of the template is added to the DOM.
2034 * * When an item is removed, its template instance is removed from the DOM.
2035 * * When items are reordered, their respective templates are reordered in the DOM.
2036 *
2037 * Angular uses object identity to track insertions and deletions within the iterator and reproduce
2038 * those changes in the DOM. This has important implications for animations and any stateful
2039 * controls that are present, such as `<input>` elements that accept user input. Inserted rows can
2040 * be animated in, deleted rows can be animated out, and unchanged rows retain any unsaved state
2041 * such as user input.
2042 * For more on animations, see [Transitions and Triggers](guide/animations/transition-and-triggers).
2043 *
2044 * The identities of elements in the iterator can change while the data does not.
2045 * This can happen, for example, if the iterator is produced from an RPC to the server, and that
2046 * RPC is re-run. Even if the data hasn't changed, the second response produces objects with
2047 * different identities, and Angular must tear down the entire DOM and rebuild it (as if all old
2048 * elements were deleted and all new elements inserted).
2049 *
2050 * To avoid this expensive operation, you can customize the default tracking algorithm.
2051 * by supplying the `trackBy` option to `NgForOf`.
2052 * `trackBy` takes a function that has two arguments: `index` and `item`.
2053 * If `trackBy` is given, Angular tracks changes by the return value of the function.
2054 *
2055 * @see [Structural Directives](guide/directives/structural-directives)
2056 * @ngModule CommonModule
2057 * @publicApi
2058 */
2059declare class NgForOf<T, U extends NgIterable<T> = NgIterable<T>> implements DoCheck {
2060 private _viewContainer;
2061 private _template;
2062 private _differs;
2063 /**
2064 * The value of the iterable expression, which can be used as a
2065 * [template input variable](guide/directives/structural-directives#shorthand).
2066 */
2067 set ngForOf(ngForOf: (U & NgIterable<T>) | undefined | null);
2068 /**
2069 * Specifies a custom `TrackByFunction` to compute the identity of items in an iterable.
2070 *
2071 * If a custom `TrackByFunction` is not provided, `NgForOf` will use the item's [object
2072 * identity](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is)
2073 * as the key.
2074 *
2075 * `NgForOf` uses the computed key to associate items in an iterable with DOM elements
2076 * it produces for these items.
2077 *
2078 * A custom `TrackByFunction` is useful to provide good user experience in cases when items in an
2079 * iterable rendered using `NgForOf` have a natural identifier (for example, custom ID or a
2080 * primary key), and this iterable could be updated with new object instances that still
2081 * represent the same underlying entity (for example, when data is re-fetched from the server,
2082 * and the iterable is recreated and re-rendered, but most of the data is still the same).
2083 *
2084 * @see {@link TrackByFunction}
2085 */
2086 set ngForTrackBy(fn: TrackByFunction<T>);
2087 get ngForTrackBy(): TrackByFunction<T>;
2088 private _ngForOf;
2089 private _ngForOfDirty;
2090 private _differ;
2091 private _trackByFn;
2092 constructor(_viewContainer: ViewContainerRef, _template: TemplateRef<NgForOfContext<T, U>>, _differs: IterableDiffers);
2093 /**
2094 * A reference to the template that is stamped out for each item in the iterable.
2095 * @see [template reference variable](guide/templates/variables#template-reference-variables)
2096 */
2097 set ngForTemplate(value: TemplateRef<NgForOfContext<T, U>>);
2098 /**
2099 * Applies the changes when needed.
2100 * @nodoc
2101 */
2102 ngDoCheck(): void;
2103 private _applyChanges;
2104 /**
2105 * Asserts the correct type of the context for the template that `NgForOf` will render.
2106 *
2107 * The presence of this method is a signal to the Ivy template type-check compiler that the
2108 * `NgForOf` structural directive renders its template with a specific context type.
2109 */
2110 static ngTemplateContextGuard<T, U extends NgIterable<T>>(dir: NgForOf<T, U>, ctx: any): ctx is NgForOfContext<T, U>;
2111 static ɵfac: i0.ɵɵFactoryDeclaration<NgForOf<any, any>, never>;
2112 static ɵdir: i0.ɵɵDirectiveDeclaration<NgForOf<any, any>, "[ngFor][ngForOf]", never, { "ngForOf": { "alias": "ngForOf"; "required": false; }; "ngForTrackBy": { "alias": "ngForTrackBy"; "required": false; }; "ngForTemplate": { "alias": "ngForTemplate"; "required": false; }; }, {}, never, never, true, never>;
2113}
2114export { NgForOf as NgFor }
2115export { NgForOf }
2116
2117/**
2118 * @publicApi
2119 */
2120export declare class NgForOfContext<T, U extends NgIterable<T> = NgIterable<T>> {
2121 /** Reference to the current item from the collection. */
2122 $implicit: T;
2123 /**
2124 * The value of the iterable expression. Useful when the expression is
2125 * more complex then a property access, for example when using the async pipe
2126 * (`userStreams | async`).
2127 */
2128 ngForOf: U;
2129 /** Returns an index of the current item in the collection. */
2130 index: number;
2131 /** Returns total amount of items in the collection. */
2132 count: number;
2133 constructor(
2134 /** Reference to the current item from the collection. */
2135 $implicit: T,
2136 /**
2137 * The value of the iterable expression. Useful when the expression is
2138 * more complex then a property access, for example when using the async pipe
2139 * (`userStreams | async`).
2140 */
2141 ngForOf: U,
2142 /** Returns an index of the current item in the collection. */
2143 index: number,
2144 /** Returns total amount of items in the collection. */
2145 count: number);
2146 get first(): boolean;
2147 get last(): boolean;
2148 get even(): boolean;
2149 get odd(): boolean;
2150}
2151
2152/**
2153 * A structural directive that conditionally includes a template based on the value of
2154 * an expression coerced to Boolean.
2155 * When the expression evaluates to true, Angular renders the template
2156 * provided in a `then` clause, and when false or null,
2157 * Angular renders the template provided in an optional `else` clause. The default
2158 * template for the `else` clause is blank.
2159 *
2160 * A [shorthand form](guide/directives/structural-directives#asterisk) of the directive,
2161 * `*ngIf="condition"`, is generally used, provided
2162 * as an attribute of the anchor element for the inserted template.
2163 * Angular expands this into a more explicit version, in which the anchor element
2164 * is contained in an `<ng-template>` element.
2165 *
2166 * Simple form with shorthand syntax:
2167 *
2168 * ```html
2169 * <div *ngIf="condition">Content to render when condition is true.</div>
2170 * ```
2171 *
2172 * Simple form with expanded syntax:
2173 *
2174 * ```html
2175 * <ng-template [ngIf]="condition"><div>Content to render when condition is
2176 * true.</div></ng-template>
2177 * ```
2178 *
2179 * Form with an "else" block:
2180 *
2181 * ```html
2182 * <div *ngIf="condition; else elseBlock">Content to render when condition is true.</div>
2183 * <ng-template #elseBlock>Content to render when condition is false.</ng-template>
2184 * ```
2185 *
2186 * Shorthand form with "then" and "else" blocks:
2187 *
2188 * ```html
2189 * <div *ngIf="condition; then thenBlock else elseBlock"></div>
2190 * <ng-template #thenBlock>Content to render when condition is true.</ng-template>
2191 * <ng-template #elseBlock>Content to render when condition is false.</ng-template>
2192 * ```
2193 *
2194 * Form with storing the value locally:
2195 *
2196 * ```html
2197 * <div *ngIf="condition as value; else elseBlock">{{value}}</div>
2198 * <ng-template #elseBlock>Content to render when value is null.</ng-template>
2199 * ```
2200 *
2201 * @usageNotes
2202 *
2203 * The `*ngIf` directive is most commonly used to conditionally show an inline template,
2204 * as seen in the following example.
2205 * The default `else` template is blank.
2206 *
2207 * {@example common/ngIf/ts/module.ts region='NgIfSimple'}
2208 *
2209 * ### Showing an alternative template using `else`
2210 *
2211 * To display a template when `expression` evaluates to false, use an `else` template
2212 * binding as shown in the following example.
2213 * The `else` binding points to an `<ng-template>` element labeled `#elseBlock`.
2214 * The template can be defined anywhere in the component view, but is typically placed right after
2215 * `ngIf` for readability.
2216 *
2217 * {@example common/ngIf/ts/module.ts region='NgIfElse'}
2218 *
2219 * ### Using an external `then` template
2220 *
2221 * In the previous example, the then-clause template is specified inline, as the content of the
2222 * tag that contains the `ngIf` directive. You can also specify a template that is defined
2223 * externally, by referencing a labeled `<ng-template>` element. When you do this, you can
2224 * change which template to use at runtime, as shown in the following example.
2225 *
2226 * {@example common/ngIf/ts/module.ts region='NgIfThenElse'}
2227 *
2228 * ### Storing a conditional result in a variable
2229 *
2230 * You might want to show a set of properties from the same object. If you are waiting
2231 * for asynchronous data, the object can be undefined.
2232 * In this case, you can use `ngIf` and store the result of the condition in a local
2233 * variable as shown in the following example.
2234 *
2235 * {@example common/ngIf/ts/module.ts region='NgIfAs'}
2236 *
2237 * This code uses only one `AsyncPipe`, so only one subscription is created.
2238 * The conditional statement stores the result of `userStream|async` in the local variable `user`.
2239 * You can then bind the local `user` repeatedly.
2240 *
2241 * The conditional displays the data only if `userStream` returns a value,
2242 * so you don't need to use the
2243 * safe-navigation-operator (`?.`)
2244 * to guard against null values when accessing properties.
2245 * You can display an alternative template while waiting for the data.
2246 *
2247 * ### Shorthand syntax
2248 *
2249 * The shorthand syntax `*ngIf` expands into two separate template specifications
2250 * for the "then" and "else" clauses. For example, consider the following shorthand statement,
2251 * that is meant to show a loading page while waiting for data to be loaded.
2252 *
2253 * ```html
2254 * <div class="hero-list" *ngIf="heroes else loading">
2255 * ...
2256 * </div>
2257 *
2258 * <ng-template #loading>
2259 * <div>Loading...</div>
2260 * </ng-template>
2261 * ```
2262 *
2263 * You can see that the "else" clause references the `<ng-template>`
2264 * with the `#loading` label, and the template for the "then" clause
2265 * is provided as the content of the anchor element.
2266 *
2267 * However, when Angular expands the shorthand syntax, it creates
2268 * another `<ng-template>` tag, with `ngIf` and `ngIfElse` directives.
2269 * The anchor element containing the template for the "then" clause becomes
2270 * the content of this unlabeled `<ng-template>` tag.
2271 *
2272 * ```html
2273 * <ng-template [ngIf]="heroes" [ngIfElse]="loading">
2274 * <div class="hero-list">
2275 * ...
2276 * </div>
2277 * </ng-template>
2278 *
2279 * <ng-template #loading>
2280 * <div>Loading...</div>
2281 * </ng-template>
2282 * ```
2283 *
2284 * The presence of the implicit template object has implications for the nesting of
2285 * structural directives. For more on this subject, see
2286 * [Structural Directives](guide/directives/structural-directives#one-per-element).
2287 *
2288 * @ngModule CommonModule
2289 * @publicApi
2290 */
2291export declare class NgIf<T = unknown> {
2292 private _viewContainer;
2293 private _context;
2294 private _thenTemplateRef;
2295 private _elseTemplateRef;
2296 private _thenViewRef;
2297 private _elseViewRef;
2298 constructor(_viewContainer: ViewContainerRef, templateRef: TemplateRef<NgIfContext<T>>);
2299 /**
2300 * The Boolean expression to evaluate as the condition for showing a template.
2301 */
2302 set ngIf(condition: T);
2303 /**
2304 * A template to show if the condition expression evaluates to true.
2305 */
2306 set ngIfThen(templateRef: TemplateRef<NgIfContext<T>> | null);
2307 /**
2308 * A template to show if the condition expression evaluates to false.
2309 */
2310 set ngIfElse(templateRef: TemplateRef<NgIfContext<T>> | null);
2311 private _updateView;
2312 /**
2313 * Assert the correct type of the expression bound to the `ngIf` input within the template.
2314 *
2315 * The presence of this static field is a signal to the Ivy template type check compiler that
2316 * when the `NgIf` structural directive renders its template, the type of the expression bound
2317 * to `ngIf` should be narrowed in some way. For `NgIf`, the binding expression itself is used to
2318 * narrow its type, which allows the strictNullChecks feature of TypeScript to work with `NgIf`.
2319 */
2320 static ngTemplateGuard_ngIf: 'binding';
2321 /**
2322 * Asserts the correct type of the context for the template that `NgIf` will render.
2323 *
2324 * The presence of this method is a signal to the Ivy template type-check compiler that the
2325 * `NgIf` structural directive renders its template with a specific context type.
2326 */
2327 static ngTemplateContextGuard<T>(dir: NgIf<T>, ctx: any): ctx is NgIfContext<Exclude<T, false | 0 | '' | null | undefined>>;
2328 static ɵfac: i0.ɵɵFactoryDeclaration<NgIf<any>, never>;
2329 static ɵdir: i0.ɵɵDirectiveDeclaration<NgIf<any>, "[ngIf]", never, { "ngIf": { "alias": "ngIf"; "required": false; }; "ngIfThen": { "alias": "ngIfThen"; "required": false; }; "ngIfElse": { "alias": "ngIfElse"; "required": false; }; }, {}, never, never, true, never>;
2330}
2331
2332/**
2333 * @publicApi
2334 */
2335export declare class NgIfContext<T = unknown> {
2336 $implicit: T;
2337 ngIf: T;
2338}
2339
2340/**
2341 * Returns the plural case based on the locale
2342 *
2343 * @publicApi
2344 */
2345export declare class NgLocaleLocalization extends NgLocalization {
2346 protected locale: string;
2347 constructor(locale: string);
2348 getPluralCategory(value: any, locale?: string): string;
2349 static ɵfac: i0.ɵɵFactoryDeclaration<NgLocaleLocalization, never>;
2350 static ɵprov: i0.ɵɵInjectableDeclaration<NgLocaleLocalization>;
2351}
2352
2353/**
2354 * @publicApi
2355 */
2356export declare abstract class NgLocalization {
2357 abstract getPluralCategory(value: any, locale?: string): string;
2358 static ɵfac: i0.ɵɵFactoryDeclaration<NgLocalization, never>;
2359 static ɵprov: i0.ɵɵInjectableDeclaration<NgLocalization>;
2360}
2361
2362/**
2363 * Directive that improves image loading performance by enforcing best practices.
2364 *
2365 * `NgOptimizedImage` ensures that the loading of the Largest Contentful Paint (LCP) image is
2366 * prioritized by:
2367 * - Automatically setting the `fetchpriority` attribute on the `<img>` tag
2368 * - Lazy loading non-priority images by default
2369 * - Automatically generating a preconnect link tag in the document head
2370 *
2371 * In addition, the directive:
2372 * - Generates appropriate asset URLs if a corresponding `ImageLoader` function is provided
2373 * - Automatically generates a srcset
2374 * - Requires that `width` and `height` are set
2375 * - Warns if `width` or `height` have been set incorrectly
2376 * - Warns if the image will be visually distorted when rendered
2377 *
2378 * @usageNotes
2379 * The `NgOptimizedImage` directive is marked as [standalone](guide/components/importing) and can
2380 * be imported directly.
2381 *
2382 * Follow the steps below to enable and use the directive:
2383 * 1. Import it into the necessary NgModule or a standalone Component.
2384 * 2. Optionally provide an `ImageLoader` if you use an image hosting service.
2385 * 3. Update the necessary `<img>` tags in templates and replace `src` attributes with `ngSrc`.
2386 * Using a `ngSrc` allows the directive to control when the `src` gets set, which triggers an image
2387 * download.
2388 *
2389 * Step 1: import the `NgOptimizedImage` directive.
2390 *
2391 * ```ts
2392 * import { NgOptimizedImage } from '@angular/common';
2393 *
2394 * // Include it into the necessary NgModule
2395 * @NgModule({
2396 * imports: [NgOptimizedImage],
2397 * })
2398 * class AppModule {}
2399 *
2400 * // ... or a standalone Component
2401 * @Component({
2402 * imports: [NgOptimizedImage],
2403 * })
2404 * class MyStandaloneComponent {}
2405 * ```
2406 *
2407 * Step 2: configure a loader.
2408 *
2409 * To use the **default loader**: no additional code changes are necessary. The URL returned by the
2410 * generic loader will always match the value of "src". In other words, this loader applies no
2411 * transformations to the resource URL and the value of the `ngSrc` attribute will be used as is.
2412 *
2413 * To use an existing loader for a **third-party image service**: add the provider factory for your
2414 * chosen service to the `providers` array. In the example below, the Imgix loader is used:
2415 *
2416 * ```ts
2417 * import {provideImgixLoader} from '@angular/common';
2418 *
2419 * // Call the function and add the result to the `providers` array:
2420 * providers: [
2421 * provideImgixLoader("https://my.base.url/"),
2422 * ],
2423 * ```
2424 *
2425 * The `NgOptimizedImage` directive provides the following functions:
2426 * - `provideCloudflareLoader`
2427 * - `provideCloudinaryLoader`
2428 * - `provideImageKitLoader`
2429 * - `provideImgixLoader`
2430 *
2431 * If you use a different image provider, you can create a custom loader function as described
2432 * below.
2433 *
2434 * To use a **custom loader**: provide your loader function as a value for the `IMAGE_LOADER` DI
2435 * token.
2436 *
2437 * ```ts
2438 * import {IMAGE_LOADER, ImageLoaderConfig} from '@angular/common';
2439 *
2440 * // Configure the loader using the `IMAGE_LOADER` token.
2441 * providers: [
2442 * {
2443 * provide: IMAGE_LOADER,
2444 * useValue: (config: ImageLoaderConfig) => {
2445 * return `https://example.com/${config.src}-${config.width}.jpg`;
2446 * }
2447 * },
2448 * ],
2449 * ```
2450 *
2451 * Step 3: update `<img>` tags in templates to use `ngSrc` instead of `src`.
2452 *
2453 * ```html
2454 * <img ngSrc="logo.png" width="200" height="100">
2455 * ```
2456 *
2457 * @publicApi
2458 */
2459export declare class NgOptimizedImage implements OnInit, OnChanges, OnDestroy {
2460 private imageLoader;
2461 private config;
2462 private renderer;
2463 private imgElement;
2464 private injector;
2465 private readonly isServer;
2466 private readonly preloadLinkCreator;
2467 private lcpObserver;
2468 /**
2469 * Calculate the rewritten `src` once and store it.
2470 * This is needed to avoid repetitive calculations and make sure the directive cleanup in the
2471 * `ngOnDestroy` does not rely on the `IMAGE_LOADER` logic (which in turn can rely on some other
2472 * instance that might be already destroyed).
2473 */
2474 private _renderedSrc;
2475 /**
2476 * Name of the source image.
2477 * Image name will be processed by the image loader and the final URL will be applied as the `src`
2478 * property of the image.
2479 */
2480 ngSrc: string;
2481 /**
2482 * A comma separated list of width or density descriptors.
2483 * The image name will be taken from `ngSrc` and combined with the list of width or density
2484 * descriptors to generate the final `srcset` property of the image.
2485 *
2486 * Example:
2487 * ```
2488 * <img ngSrc="hello.jpg" ngSrcset="100w, 200w" /> =>
2489 * <img src="path/hello.jpg" srcset="path/hello.jpg?w=100 100w, path/hello.jpg?w=200 200w" />
2490 * ```
2491 */
2492 ngSrcset: string;
2493 /**
2494 * The base `sizes` attribute passed through to the `<img>` element.
2495 * Providing sizes causes the image to create an automatic responsive srcset.
2496 */
2497 sizes?: string;
2498 /**
2499 * For responsive images: the intrinsic width of the image in pixels.
2500 * For fixed size images: the desired rendered width of the image in pixels.
2501 */
2502 width: number | undefined;
2503 /**
2504 * For responsive images: the intrinsic height of the image in pixels.
2505 * For fixed size images: the desired rendered height of the image in pixels.
2506 */
2507 height: number | undefined;
2508 /**
2509 * The desired loading behavior (lazy, eager, or auto). Defaults to `lazy`,
2510 * which is recommended for most images.
2511 *
2512 * Warning: Setting images as loading="eager" or loading="auto" marks them
2513 * as non-priority images and can hurt loading performance. For images which
2514 * may be the LCP element, use the `priority` attribute instead of `loading`.
2515 */
2516 loading?: 'lazy' | 'eager' | 'auto';
2517 /**
2518 * Indicates whether this image should have a high priority.
2519 */
2520 priority: boolean;
2521 /**
2522 * Data to pass through to custom loaders.
2523 */
2524 loaderParams?: {
2525 [key: string]: any;
2526 };
2527 /**
2528 * Disables automatic srcset generation for this image.
2529 */
2530 disableOptimizedSrcset: boolean;
2531 /**
2532 * Sets the image to "fill mode", which eliminates the height/width requirement and adds
2533 * styles such that the image fills its containing element.
2534 */
2535 fill: boolean;
2536 /**
2537 * A URL or data URL for an image to be used as a placeholder while this image loads.
2538 */
2539 placeholder?: string | boolean;
2540 /**
2541 * Configuration object for placeholder settings. Options:
2542 * * blur: Setting this to false disables the automatic CSS blur.
2543 */
2544 placeholderConfig?: ImagePlaceholderConfig;
2545 /** @nodoc */
2546 ngOnInit(): void;
2547 private setHostAttributes;
2548 /** @nodoc */
2549 ngOnChanges(changes: SimpleChanges): void;
2550 private callImageLoader;
2551 private getLoadingBehavior;
2552 private getFetchPriority;
2553 private getRewrittenSrc;
2554 private getRewrittenSrcset;
2555 private getAutomaticSrcset;
2556 private getResponsiveSrcset;
2557 private updateSrcAndSrcset;
2558 private getFixedSrcset;
2559 private shouldGenerateAutomaticSrcset;
2560 /**
2561 * Returns an image url formatted for use with the CSS background-image property. Expects one of:
2562 * * A base64 encoded image, which is wrapped and passed through.
2563 * * A boolean. If true, calls the image loader to generate a small placeholder url.
2564 */
2565 private generatePlaceholder;
2566 /**
2567 * Determines if blur should be applied, based on an optional boolean
2568 * property `blur` within the optional configuration object `placeholderConfig`.
2569 */
2570 private shouldBlurPlaceholder;
2571 private removePlaceholderOnLoad;
2572 /** @nodoc */
2573 ngOnDestroy(): void;
2574 private setHostAttribute;
2575 static ɵfac: i0.ɵɵFactoryDeclaration<NgOptimizedImage, never>;
2576 static ɵdir: i0.ɵɵDirectiveDeclaration<NgOptimizedImage, "img[ngSrc]", never, { "ngSrc": { "alias": "ngSrc"; "required": true; }; "ngSrcset": { "alias": "ngSrcset"; "required": false; }; "sizes": { "alias": "sizes"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "priority": { "alias": "priority"; "required": false; }; "loaderParams": { "alias": "loaderParams"; "required": false; }; "disableOptimizedSrcset": { "alias": "disableOptimizedSrcset"; "required": false; }; "fill": { "alias": "fill"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "placeholderConfig": { "alias": "placeholderConfig"; "required": false; }; "src": { "alias": "src"; "required": false; }; "srcset": { "alias": "srcset"; "required": false; }; }, {}, never, never, true, never>;
2577 static ngAcceptInputType_ngSrc: string | i0.ɵSafeValue;
2578 static ngAcceptInputType_width: unknown;
2579 static ngAcceptInputType_height: unknown;
2580 static ngAcceptInputType_priority: unknown;
2581 static ngAcceptInputType_disableOptimizedSrcset: unknown;
2582 static ngAcceptInputType_fill: unknown;
2583 static ngAcceptInputType_placeholder: boolean | string;
2584}
2585
2586/**
2587 * @ngModule CommonModule
2588 *
2589 * @usageNotes
2590 * ```html
2591 * <some-element [ngPlural]="value">
2592 * <ng-template ngPluralCase="=0">there is nothing</ng-template>
2593 * <ng-template ngPluralCase="=1">there is one</ng-template>
2594 * <ng-template ngPluralCase="few">there are a few</ng-template>
2595 * </some-element>
2596 * ```
2597 *
2598 * @description
2599 *
2600 * Adds / removes DOM sub-trees based on a numeric value. Tailored for pluralization.
2601 *
2602 * Displays DOM sub-trees that match the switch expression value, or failing that, DOM sub-trees
2603 * that match the switch expression's pluralization category.
2604 *
2605 * To use this directive you must provide a container element that sets the `[ngPlural]` attribute
2606 * to a switch expression. Inner elements with a `[ngPluralCase]` will display based on their
2607 * expression:
2608 * - if `[ngPluralCase]` is set to a value starting with `=`, it will only display if the value
2609 * matches the switch expression exactly,
2610 * - otherwise, the view will be treated as a "category match", and will only display if exact
2611 * value matches aren't found and the value maps to its category for the defined locale.
2612 *
2613 * See http://cldr.unicode.org/index/cldr-spec/plural-rules
2614 *
2615 * @publicApi
2616 */
2617export declare class NgPlural {
2618 private _localization;
2619 private _activeView?;
2620 private _caseViews;
2621 constructor(_localization: NgLocalization);
2622 set ngPlural(value: number);
2623 addCase(value: string, switchView: SwitchView): void;
2624 private _updateView;
2625 private _clearViews;
2626 private _activateView;
2627 static ɵfac: i0.ɵɵFactoryDeclaration<NgPlural, never>;
2628 static ɵdir: i0.ɵɵDirectiveDeclaration<NgPlural, "[ngPlural]", never, { "ngPlural": { "alias": "ngPlural"; "required": false; }; }, {}, never, never, true, never>;
2629}
2630
2631/**
2632 * @ngModule CommonModule
2633 *
2634 * @description
2635 *
2636 * Creates a view that will be added/removed from the parent {@link NgPlural} when the
2637 * given expression matches the plural expression according to CLDR rules.
2638 *
2639 * @usageNotes
2640 * ```html
2641 * <some-element [ngPlural]="value">
2642 * <ng-template ngPluralCase="=0">...</ng-template>
2643 * <ng-template ngPluralCase="other">...</ng-template>
2644 * </some-element>
2645 *```
2646 *
2647 * See {@link NgPlural} for more details and example.
2648 *
2649 * @publicApi
2650 */
2651export declare class NgPluralCase {
2652 value: string;
2653 constructor(value: string, template: TemplateRef<Object>, viewContainer: ViewContainerRef, ngPlural: NgPlural);
2654 static ɵfac: i0.ɵɵFactoryDeclaration<NgPluralCase, [{ attribute: "ngPluralCase"; }, null, null, { host: true; }]>;
2655 static ɵdir: i0.ɵɵDirectiveDeclaration<NgPluralCase, "[ngPluralCase]", never, {}, {}, never, never, true, never>;
2656}
2657
2658/**
2659 * @ngModule CommonModule
2660 *
2661 * @usageNotes
2662 *
2663 * Set the font of the containing element to the result of an expression.
2664 *
2665 * ```html
2666 * <some-element [ngStyle]="{'font-style': styleExp}">...</some-element>
2667 * ```
2668 *
2669 * Set the width of the containing element to a pixel value returned by an expression.
2670 *
2671 * ```html
2672 * <some-element [ngStyle]="{'max-width.px': widthExp}">...</some-element>
2673 * ```
2674 *
2675 * Set a collection of style values using an expression that returns key-value pairs.
2676 *
2677 * ```html
2678 * <some-element [ngStyle]="objExp">...</some-element>
2679 * ```
2680 *
2681 * @description
2682 *
2683 * An attribute directive that updates styles for the containing HTML element.
2684 * Sets one or more style properties, specified as colon-separated key-value pairs.
2685 * The key is a style name, with an optional `.<unit>` suffix
2686 * (such as 'top.px', 'font-style.em').
2687 * The value is an expression to be evaluated.
2688 * The resulting non-null value, expressed in the given unit,
2689 * is assigned to the given style property.
2690 * If the result of evaluation is null, the corresponding style is removed.
2691 *
2692 * @publicApi
2693 */
2694export declare class NgStyle implements DoCheck {
2695 private _ngEl;
2696 private _differs;
2697 private _renderer;
2698 private _ngStyle;
2699 private _differ;
2700 constructor(_ngEl: ElementRef, _differs: KeyValueDiffers, _renderer: Renderer2);
2701 set ngStyle(values: {
2702 [klass: string]: any;
2703 } | null | undefined);
2704 ngDoCheck(): void;
2705 private _setStyle;
2706 private _applyChanges;
2707 static ɵfac: i0.ɵɵFactoryDeclaration<NgStyle, never>;
2708 static ɵdir: i0.ɵɵDirectiveDeclaration<NgStyle, "[ngStyle]", never, { "ngStyle": { "alias": "ngStyle"; "required": false; }; }, {}, never, never, true, never>;
2709}
2710
2711/**
2712 * @ngModule CommonModule
2713 *
2714 * @description
2715 * The `[ngSwitch]` directive on a container specifies an expression to match against.
2716 * The expressions to match are provided by `ngSwitchCase` directives on views within the container.
2717 * - Every view that matches is rendered.
2718 * - If there are no matches, a view with the `ngSwitchDefault` directive is rendered.
2719 * - Elements within the `[NgSwitch]` statement but outside of any `NgSwitchCase`
2720 * or `ngSwitchDefault` directive are preserved at the location.
2721 *
2722 * @usageNotes
2723 * Define a container element for the directive, and specify the switch expression
2724 * to match against as an attribute:
2725 *
2726 * ```html
2727 * <container-element [ngSwitch]="switch_expression">
2728 * ```
2729 *
2730 * Within the container, `*ngSwitchCase` statements specify the match expressions
2731 * as attributes. Include `*ngSwitchDefault` as the final case.
2732 *
2733 * ```html
2734 * <container-element [ngSwitch]="switch_expression">
2735 * <some-element *ngSwitchCase="match_expression_1">...</some-element>
2736 * ...
2737 * <some-element *ngSwitchDefault>...</some-element>
2738 * </container-element>
2739 * ```
2740 *
2741 * ### Usage Examples
2742 *
2743 * The following example shows how to use more than one case to display the same view:
2744 *
2745 * ```html
2746 * <container-element [ngSwitch]="switch_expression">
2747 * <!-- the same view can be shown in more than one case -->
2748 * <some-element *ngSwitchCase="match_expression_1">...</some-element>
2749 * <some-element *ngSwitchCase="match_expression_2">...</some-element>
2750 * <some-other-element *ngSwitchCase="match_expression_3">...</some-other-element>
2751 * <!--default case when there are no matches -->
2752 * <some-element *ngSwitchDefault>...</some-element>
2753 * </container-element>
2754 * ```
2755 *
2756 * The following example shows how cases can be nested:
2757 * ```html
2758 * <container-element [ngSwitch]="switch_expression">
2759 * <some-element *ngSwitchCase="match_expression_1">...</some-element>
2760 * <some-element *ngSwitchCase="match_expression_2">...</some-element>
2761 * <some-other-element *ngSwitchCase="match_expression_3">...</some-other-element>
2762 * <ng-container *ngSwitchCase="match_expression_3">
2763 * <!-- use a ng-container to group multiple root nodes -->
2764 * <inner-element></inner-element>
2765 * <inner-other-element></inner-other-element>
2766 * </ng-container>
2767 * <some-element *ngSwitchDefault>...</some-element>
2768 * </container-element>
2769 * ```
2770 *
2771 * @publicApi
2772 * @see {@link NgSwitchCase}
2773 * @see {@link NgSwitchDefault}
2774 * @see [Structural Directives](guide/directives/structural-directives)
2775 *
2776 */
2777export declare class NgSwitch {
2778 private _defaultViews;
2779 private _defaultUsed;
2780 private _caseCount;
2781 private _lastCaseCheckIndex;
2782 private _lastCasesMatched;
2783 private _ngSwitch;
2784 set ngSwitch(newValue: any);
2785 private _updateDefaultCases;
2786 static ɵfac: i0.ɵɵFactoryDeclaration<NgSwitch, never>;
2787 static ɵdir: i0.ɵɵDirectiveDeclaration<NgSwitch, "[ngSwitch]", never, { "ngSwitch": { "alias": "ngSwitch"; "required": false; }; }, {}, never, never, true, never>;
2788}
2789
2790/**
2791 * @ngModule CommonModule
2792 *
2793 * @description
2794 * Provides a switch case expression to match against an enclosing `ngSwitch` expression.
2795 * When the expressions match, the given `NgSwitchCase` template is rendered.
2796 * If multiple match expressions match the switch expression value, all of them are displayed.
2797 *
2798 * @usageNotes
2799 *
2800 * Within a switch container, `*ngSwitchCase` statements specify the match expressions
2801 * as attributes. Include `*ngSwitchDefault` as the final case.
2802 *
2803 * ```html
2804 * <container-element [ngSwitch]="switch_expression">
2805 * <some-element *ngSwitchCase="match_expression_1">...</some-element>
2806 * ...
2807 * <some-element *ngSwitchDefault>...</some-element>
2808 * </container-element>
2809 * ```
2810 *
2811 * Each switch-case statement contains an in-line HTML template or template reference
2812 * that defines the subtree to be selected if the value of the match expression
2813 * matches the value of the switch expression.
2814 *
2815 * As of Angular v17 the NgSwitch directive uses strict equality comparison (`===`) instead of
2816 * loose equality (`==`) to match different cases.
2817 *
2818 * @publicApi
2819 * @see {@link NgSwitch}
2820 * @see {@link NgSwitchDefault}
2821 *
2822 */
2823export declare class NgSwitchCase implements DoCheck {
2824 private ngSwitch;
2825 private _view;
2826 /**
2827 * Stores the HTML template to be selected on match.
2828 */
2829 ngSwitchCase: any;
2830 constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<Object>, ngSwitch: NgSwitch);
2831 /**
2832 * Performs case matching. For internal use only.
2833 * @nodoc
2834 */
2835 ngDoCheck(): void;
2836 static ɵfac: i0.ɵɵFactoryDeclaration<NgSwitchCase, [null, null, { optional: true; host: true; }]>;
2837 static ɵdir: i0.ɵɵDirectiveDeclaration<NgSwitchCase, "[ngSwitchCase]", never, { "ngSwitchCase": { "alias": "ngSwitchCase"; "required": false; }; }, {}, never, never, true, never>;
2838}
2839
2840/**
2841 * @ngModule CommonModule
2842 *
2843 * @description
2844 *
2845 * Creates a view that is rendered when no `NgSwitchCase` expressions
2846 * match the `NgSwitch` expression.
2847 * This statement should be the final case in an `NgSwitch`.
2848 *
2849 * @publicApi
2850 * @see {@link NgSwitch}
2851 * @see {@link NgSwitchCase}
2852 *
2853 */
2854export declare class NgSwitchDefault {
2855 constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<Object>, ngSwitch: NgSwitch);
2856 static ɵfac: i0.ɵɵFactoryDeclaration<NgSwitchDefault, [null, null, { optional: true; host: true; }]>;
2857 static ɵdir: i0.ɵɵDirectiveDeclaration<NgSwitchDefault, "[ngSwitchDefault]", never, {}, {}, never, never, true, never>;
2858}
2859
2860/**
2861 * @ngModule CommonModule
2862 *
2863 * @description
2864 *
2865 * Inserts an embedded view from a prepared `TemplateRef`.
2866 *
2867 * You can attach a context object to the `EmbeddedViewRef` by setting `[ngTemplateOutletContext]`.
2868 * `[ngTemplateOutletContext]` should be an object, the object's keys will be available for binding
2869 * by the local template `let` declarations.
2870 *
2871 * @usageNotes
2872 * ```html
2873 * <ng-container *ngTemplateOutlet="templateRefExp; context: contextExp"></ng-container>
2874 * ```
2875 *
2876 * Using the key `$implicit` in the context object will set its value as default.
2877 *
2878 * ### Example
2879 *
2880 * {@example common/ngTemplateOutlet/ts/module.ts region='NgTemplateOutlet'}
2881 *
2882 * @publicApi
2883 */
2884export declare class NgTemplateOutlet<C = unknown> implements OnChanges {
2885 private _viewContainerRef;
2886 private _viewRef;
2887 /**
2888 * A context object to attach to the {@link EmbeddedViewRef}. This should be an
2889 * object, the object's keys will be available for binding by the local template `let`
2890 * declarations.
2891 * Using the key `$implicit` in the context object will set its value as default.
2892 */
2893 ngTemplateOutletContext: C | null;
2894 /**
2895 * A string defining the template reference and optionally the context object for the template.
2896 */
2897 ngTemplateOutlet: TemplateRef<C> | null;
2898 /** Injector to be used within the embedded view. */
2899 ngTemplateOutletInjector: Injector | null;
2900 constructor(_viewContainerRef: ViewContainerRef);
2901 ngOnChanges(changes: SimpleChanges): void;
2902 /**
2903 * We need to re-create existing embedded view if either is true:
2904 * - the outlet changed.
2905 * - the injector changed.
2906 */
2907 private _shouldRecreateView;
2908 /**
2909 * For a given outlet instance, we create a proxy object that delegates
2910 * to the user-specified context. This allows changing, or swapping out
2911 * the context object completely without having to destroy/re-create the view.
2912 */
2913 private _createContextForwardProxy;
2914 static ɵfac: i0.ɵɵFactoryDeclaration<NgTemplateOutlet<any>, never>;
2915 static ɵdir: i0.ɵɵDirectiveDeclaration<NgTemplateOutlet<any>, "[ngTemplateOutlet]", never, { "ngTemplateOutletContext": { "alias": "ngTemplateOutletContext"; "required": false; }; "ngTemplateOutlet": { "alias": "ngTemplateOutlet"; "required": false; }; "ngTemplateOutletInjector": { "alias": "ngTemplateOutletInjector"; "required": false; }; }, {}, never, never, true, never>;
2916}
2917
2918
2919/**
2920 * Format styles that can be used to represent numbers.
2921 * @see {@link getLocaleNumberFormat}
2922 * @see [Internationalization (i18n) Guide](guide/i18n)
2923 *
2924 * @publicApi
2925 *
2926 * @deprecated `getLocaleNumberFormat` is deprecated
2927 */
2928export declare enum NumberFormatStyle {
2929 Decimal = 0,
2930 Percent = 1,
2931 Currency = 2,
2932 Scientific = 3
2933}
2934
2935/**
2936 * Symbols that can be used to replace placeholders in number patterns.
2937 * Examples are based on `en-US` values.
2938 *
2939 * @see {@link getLocaleNumberSymbol}
2940 * @see [Internationalization (i18n) Guide](guide/i18n)
2941 *
2942 * @publicApi
2943 *
2944 * @deprecated `getLocaleNumberSymbol` is deprecated
2945 *
2946 * @object-literal-as-enum
2947 */
2948export declare const NumberSymbol: {
2949 /**
2950 * Decimal separator.
2951 * For `en-US`, the dot character.
2952 * Example: 2,345`.`67
2953 */
2954 readonly Decimal: 0;
2955 /**
2956 * Grouping separator, typically for thousands.
2957 * For `en-US`, the comma character.
2958 * Example: 2`,`345.67
2959 */
2960 readonly Group: 1;
2961 /**
2962 * List-item separator.
2963 * Example: "one, two, and three"
2964 */
2965 readonly List: 2;
2966 /**
2967 * Sign for percentage (out of 100).
2968 * Example: 23.4%
2969 */
2970 readonly PercentSign: 3;
2971 /**
2972 * Sign for positive numbers.
2973 * Example: +23
2974 */
2975 readonly PlusSign: 4;
2976 /**
2977 * Sign for negative numbers.
2978 * Example: -23
2979 */
2980 readonly MinusSign: 5;
2981 /**
2982 * Computer notation for exponential value (n times a power of 10).
2983 * Example: 1.2E3
2984 */
2985 readonly Exponential: 6;
2986 /**
2987 * Human-readable format of exponential.
2988 * Example: 1.2x103
2989 */
2990 readonly SuperscriptingExponent: 7;
2991 /**
2992 * Sign for permille (out of 1000).
2993 * Example: 23.4‰
2994 */
2995 readonly PerMille: 8;
2996 /**
2997 * Infinity, can be used with plus and minus.
2998 * Example: ∞, +∞, -∞
2999 */
3000 readonly Infinity: 9;
3001 /**
3002 * Not a number.
3003 * Example: NaN
3004 */
3005 readonly NaN: 10;
3006 /**
3007 * Symbol used between time units.
3008 * Example: 10:52
3009 */
3010 readonly TimeSeparator: 11;
3011 /**
3012 * Decimal separator for currency values (fallback to `Decimal`).
3013 * Example: $2,345.67
3014 */
3015 readonly CurrencyDecimal: 12;
3016 /**
3017 * Group separator for currency values (fallback to `Group`).
3018 * Example: $2,345.67
3019 */
3020 readonly CurrencyGroup: 13;
3021};
3022
3023export declare type NumberSymbol = (typeof NumberSymbol)[keyof typeof NumberSymbol];
3024
3025/**
3026 * @description
3027 * A {@link LocationStrategy} used to configure the {@link Location} service to
3028 * represent its state in the
3029 * [path](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) of the
3030 * browser's URL.
3031 *
3032 * If you're using `PathLocationStrategy`, you may provide a {@link APP_BASE_HREF}
3033 * or add a `<base href>` element to the document to override the default.
3034 *
3035 * For instance, if you provide an `APP_BASE_HREF` of `'/my/app/'` and call
3036 * `location.go('/foo')`, the browser's URL will become
3037 * `example.com/my/app/foo`. To ensure all relative URIs resolve correctly,
3038 * the `<base href>` and/or `APP_BASE_HREF` should end with a `/`.
3039 *
3040 * Similarly, if you add `<base href='/my/app/'/>` to the document and call
3041 * `location.go('/foo')`, the browser's URL will become
3042 * `example.com/my/app/foo`.
3043 *
3044 * Note that when using `PathLocationStrategy`, neither the query nor
3045 * the fragment in the `<base href>` will be preserved, as outlined
3046 * by the [RFC](https://tools.ietf.org/html/rfc3986#section-5.2.2).
3047 *
3048 * @usageNotes
3049 *
3050 * ### Example
3051 *
3052 * {@example common/location/ts/path_location_component.ts region='LocationComponent'}
3053 *
3054 * @publicApi
3055 */
3056export declare class PathLocationStrategy extends LocationStrategy implements OnDestroy {
3057 private _platformLocation;
3058 private _baseHref;
3059 private _removeListenerFns;
3060 constructor(_platformLocation: PlatformLocation, href?: string);
3061 /** @nodoc */
3062 ngOnDestroy(): void;
3063 onPopState(fn: LocationChangeListener): void;
3064 getBaseHref(): string;
3065 prepareExternalUrl(internal: string): string;
3066 path(includeHash?: boolean): string;
3067 pushState(state: any, title: string, url: string, queryParams: string): void;
3068 replaceState(state: any, title: string, url: string, queryParams: string): void;
3069 forward(): void;
3070 back(): void;
3071 getState(): unknown;
3072 historyGo(relativePosition?: number): void;
3073 static ɵfac: i0.ɵɵFactoryDeclaration<PathLocationStrategy, [null, { optional: true; }]>;
3074 static ɵprov: i0.ɵɵInjectableDeclaration<PathLocationStrategy>;
3075}
3076
3077/**
3078 * @ngModule CommonModule
3079 * @description
3080 *
3081 * Transforms a number to a percentage
3082 * string, formatted according to locale rules that determine group sizing and
3083 * separator, decimal-point character, and other locale-specific
3084 * configurations.
3085 *
3086 * @see {@link formatPercent}
3087 *
3088 * @usageNotes
3089 * The following code shows how the pipe transforms numbers
3090 * into text strings, according to various format specifications,
3091 * where the caller's default locale is `en-US`.
3092 *
3093 * {@example common/pipes/ts/percent_pipe.ts region='PercentPipe'}
3094 *
3095 * @publicApi
3096 */
3097export declare class PercentPipe implements PipeTransform {
3098 private _locale;
3099 constructor(_locale: string);
3100 transform(value: number | string, digitsInfo?: string, locale?: string): string | null;
3101 transform(value: null | undefined, digitsInfo?: string, locale?: string): null;
3102 transform(value: number | string | null | undefined, digitsInfo?: string, locale?: string): string | null;
3103 static ɵfac: i0.ɵɵFactoryDeclaration<PercentPipe, never>;
3104 static ɵpipe: i0.ɵɵPipeDeclaration<PercentPipe, "percent", true>;
3105}
3106
3107/**
3108 * This class should not be used directly by an application developer. Instead, use
3109 * {@link Location}.
3110 *
3111 * `PlatformLocation` encapsulates all calls to DOM APIs, which allows the Router to be
3112 * platform-agnostic.
3113 * This means that we can have different implementation of `PlatformLocation` for the different
3114 * platforms that Angular supports. For example, `@angular/platform-browser` provides an
3115 * implementation specific to the browser environment, while `@angular/platform-server` provides
3116 * one suitable for use with server-side rendering.
3117 *
3118 * The `PlatformLocation` class is used directly by all implementations of {@link LocationStrategy}
3119 * when they need to interact with the DOM APIs like pushState, popState, etc.
3120 *
3121 * {@link LocationStrategy} in turn is used by the {@link Location} service which is used directly
3122 * by the {@link Router} in order to navigate between routes. Since all interactions between {@link
3123 * Router} /
3124 * {@link Location} / {@link LocationStrategy} and DOM APIs flow through the `PlatformLocation`
3125 * class, they are all platform-agnostic.
3126 *
3127 * @publicApi
3128 */
3129export declare abstract class PlatformLocation {
3130 abstract getBaseHrefFromDOM(): string;
3131 abstract getState(): unknown;
3132 /**
3133 * Returns a function that, when executed, removes the `popstate` event handler.
3134 */
3135 abstract onPopState(fn: LocationChangeListener): VoidFunction;
3136 /**
3137 * Returns a function that, when executed, removes the `hashchange` event handler.
3138 */
3139 abstract onHashChange(fn: LocationChangeListener): VoidFunction;
3140 abstract get href(): string;
3141 abstract get protocol(): string;
3142 abstract get hostname(): string;
3143 abstract get port(): string;
3144 abstract get pathname(): string;
3145 abstract get search(): string;
3146 abstract get hash(): string;
3147 abstract replaceState(state: any, title: string, url: string): void;
3148 abstract pushState(state: any, title: string, url: string): void;
3149 abstract forward(): void;
3150 abstract back(): void;
3151 historyGo?(relativePosition: number): void;
3152 static ɵfac: i0.ɵɵFactoryDeclaration<PlatformLocation, never>;
3153 static ɵprov: i0.ɵɵInjectableDeclaration<PlatformLocation>;
3154}
3155
3156/**
3157 * Plurality cases used for translating plurals to different languages.
3158 *
3159 * @see {@link NgPlural}
3160 * @see {@link NgPluralCase}
3161 * @see [Internationalization (i18n) Guide](guide/i18n)
3162 *
3163 * @publicApi
3164 *
3165 * @deprecated `getLocalePluralCase` is deprecated
3166 */
3167export declare enum Plural {
3168 Zero = 0,
3169 One = 1,
3170 Two = 2,
3171 Few = 3,
3172 Many = 4,
3173 Other = 5
3174}
3175
3176/** @publicApi */
3177declare interface PopStateEvent_2 {
3178 pop?: boolean;
3179 state?: any;
3180 type?: string;
3181 url?: string;
3182}
3183export { PopStateEvent_2 as PopStateEvent }
3184
3185/**
3186 * Injection token to configure which origins should be excluded
3187 * from the preconnect checks. It can either be a single string or an array of strings
3188 * to represent a group of origins, for example:
3189 *
3190 * ```ts
3191 * {provide: PRECONNECT_CHECK_BLOCKLIST, useValue: 'https://your-domain.com'}
3192 * ```
3193 *
3194 * or:
3195 *
3196 * ```ts
3197 * {provide: PRECONNECT_CHECK_BLOCKLIST,
3198 * useValue: ['https://your-domain-1.com', 'https://your-domain-2.com']}
3199 * ```
3200 *
3201 * @publicApi
3202 */
3203export declare const PRECONNECT_CHECK_BLOCKLIST: InjectionToken<(string | string[])[]>;
3204
3205/**
3206 * Function that generates an ImageLoader for [Cloudflare Image
3207 * Resizing](https://developers.cloudflare.com/images/image-resizing/) and turns it into an Angular
3208 * provider. Note: Cloudflare has multiple image products - this provider is specifically for
3209 * Cloudflare Image Resizing; it will not work with Cloudflare Images or Cloudflare Polish.
3210 *
3211 * @param path Your domain name, e.g. https://mysite.com
3212 * @returns Provider that provides an ImageLoader function
3213 *
3214 * @publicApi
3215 */
3216export declare const provideCloudflareLoader: (path: string) => Provider[];
3217
3218/**
3219 * Function that generates an ImageLoader for Cloudinary and turns it into an Angular provider.
3220 *
3221 * @param path Base URL of your Cloudinary images
3222 * This URL should match one of the following formats:
3223 * https://res.cloudinary.com/mysite
3224 * https://mysite.cloudinary.com
3225 * https://subdomain.mysite.com
3226 * @returns Set of providers to configure the Cloudinary loader.
3227 *
3228 * @publicApi
3229 */
3230export declare const provideCloudinaryLoader: (path: string) => Provider[];
3231
3232/**
3233 * Function that generates an ImageLoader for ImageKit and turns it into an Angular provider.
3234 *
3235 * @param path Base URL of your ImageKit images
3236 * This URL should match one of the following formats:
3237 * https://ik.imagekit.io/myaccount
3238 * https://subdomain.mysite.com
3239 * @returns Set of providers to configure the ImageKit loader.
3240 *
3241 * @publicApi
3242 */
3243export declare const provideImageKitLoader: (path: string) => Provider[];
3244
3245/**
3246 * Function that generates an ImageLoader for Imgix and turns it into an Angular provider.
3247 *
3248 * @param path path to the desired Imgix origin,
3249 * e.g. https://somepath.imgix.net or https://images.mysite.com
3250 * @returns Set of providers to configure the Imgix loader.
3251 *
3252 * @publicApi
3253 */
3254export declare const provideImgixLoader: (path: string) => Provider[];
3255
3256/**
3257 * Function that generates an ImageLoader for Netlify and turns it into an Angular provider.
3258 *
3259 * @param path optional URL of the desired Netlify site. Defaults to the current site.
3260 * @returns Set of providers to configure the Netlify loader.
3261 *
3262 * @publicApi
3263 */
3264export declare function provideNetlifyLoader(path?: string): Provider[];
3265
3266
3267/**
3268 * Register global data to be used internally by Angular. See the
3269 * ["I18n guide"](guide/i18n/format-data-locale) to know how to import additional locale
3270 * data.
3271 *
3272 * The signature registerLocaleData(data: any, extraData?: any) is deprecated since v5.1
3273 *
3274 * @publicApi
3275 */
3276export declare function registerLocaleData(data: any, localeId?: string | any, extraData?: any): void;
3277
3278/**
3279 * @ngModule CommonModule
3280 * @description
3281 *
3282 * Creates a new `Array` or `String` containing a subset (slice) of the elements.
3283 *
3284 * @usageNotes
3285 *
3286 * All behavior is based on the expected behavior of the JavaScript API `Array.prototype.slice()`
3287 * and `String.prototype.slice()`.
3288 *
3289 * When operating on an `Array`, the returned `Array` is always a copy even when all
3290 * the elements are being returned.
3291 *
3292 * When operating on a blank value, the pipe returns the blank value.
3293 *
3294 * ### List Example
3295 *
3296 * This `ngFor` example:
3297 *
3298 * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_list'}
3299 *
3300 * produces the following:
3301 *
3302 * ```html
3303 * <li>b</li>
3304 * <li>c</li>
3305 * ```
3306 *
3307 * ### String Examples
3308 *
3309 * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_string'}
3310 *
3311 * @publicApi
3312 */
3313export declare class SlicePipe implements PipeTransform {
3314 /**
3315 * @param value a list or a string to be sliced.
3316 * @param start the starting index of the subset to return:
3317 * - **a positive integer**: return the item at `start` index and all items after
3318 * in the list or string expression.
3319 * - **a negative integer**: return the item at `start` index from the end and all items after
3320 * in the list or string expression.
3321 * - **if positive and greater than the size of the expression**: return an empty list or
3322 * string.
3323 * - **if negative and greater than the size of the expression**: return entire list or string.
3324 * @param end the ending index of the subset to return:
3325 * - **omitted**: return all items until the end.
3326 * - **if positive**: return all items before `end` index of the list or string.
3327 * - **if negative**: return all items before `end` index from the end of the list or string.
3328 */
3329 transform<T>(value: ReadonlyArray<T>, start: number, end?: number): Array<T>;
3330 transform(value: null | undefined, start: number, end?: number): null;
3331 transform<T>(value: ReadonlyArray<T> | null | undefined, start: number, end?: number): Array<T> | null;
3332 transform(value: string, start: number, end?: number): string;
3333 transform(value: string | null | undefined, start: number, end?: number): string | null;
3334 private supports;
3335 static ɵfac: i0.ɵɵFactoryDeclaration<SlicePipe, never>;
3336 static ɵpipe: i0.ɵɵPipeDeclaration<SlicePipe, "slice", true>;
3337}
3338
3339declare class SwitchView {
3340 private _viewContainerRef;
3341 private _templateRef;
3342 private _created;
3343 constructor(_viewContainerRef: ViewContainerRef, _templateRef: TemplateRef<Object>);
3344 create(): void;
3345 destroy(): void;
3346 enforceState(created: boolean): void;
3347}
3348
3349/**
3350 * Represents a time value with hours and minutes.
3351 *
3352 * @publicApi
3353 *
3354 * @deprecated Locale date getters are deprecated
3355 */
3356export declare type Time = {
3357 hours: number;
3358 minutes: number;
3359};
3360
3361/**
3362 * Transforms text to title case.
3363 * Capitalizes the first letter of each word and transforms the
3364 * rest of the word to lower case.
3365 * Words are delimited by any whitespace character, such as a space, tab, or line-feed character.
3366 *
3367 * @see {@link LowerCasePipe}
3368 * @see {@link UpperCasePipe}
3369 *
3370 * @usageNotes
3371 * The following example shows the result of transforming various strings into title case.
3372 *
3373 * {@example common/pipes/ts/titlecase_pipe.ts region='TitleCasePipe'}
3374 *
3375 * @ngModule CommonModule
3376 * @publicApi
3377 */
3378export declare class TitleCasePipe implements PipeTransform {
3379 /**
3380 * @param value The string to transform to title case.
3381 */
3382 transform(value: string): string;
3383 transform(value: null | undefined): null;
3384 transform(value: string | null | undefined): string | null;
3385 static ɵfac: i0.ɵɵFactoryDeclaration<TitleCasePipe, never>;
3386 static ɵpipe: i0.ɵɵPipeDeclaration<TitleCasePipe, "titlecase", true>;
3387}
3388
3389/**
3390 * String widths available for translations.
3391 * The specific character widths are locale-specific.
3392 * Examples are given for the word "Sunday" in English.
3393 *
3394 * @publicApi
3395 *
3396 * @deprecated locale data getters are deprecated
3397 */
3398export declare enum TranslationWidth {
3399 /** 1 character for `en-US`. For example: 'S' */
3400 Narrow = 0,
3401 /** 3 characters for `en-US`. For example: 'Sun' */
3402 Abbreviated = 1,
3403 /** Full length for `en-US`. For example: "Sunday" */
3404 Wide = 2,
3405 /** 2 characters for `en-US`, For example: "Su" */
3406 Short = 3
3407}
3408
3409/**
3410 * Transforms text to all upper case.
3411 * @see {@link LowerCasePipe}
3412 * @see {@link TitleCasePipe}
3413 *
3414 * @ngModule CommonModule
3415 * @publicApi
3416 */
3417export declare class UpperCasePipe implements PipeTransform {
3418 /**
3419 * @param value The string to transform to upper case.
3420 */
3421 transform(value: string): string;
3422 transform(value: null | undefined): null;
3423 transform(value: string | null | undefined): string | null;
3424 static ɵfac: i0.ɵɵFactoryDeclaration<UpperCasePipe, never>;
3425 static ɵpipe: i0.ɵɵPipeDeclaration<UpperCasePipe, "uppercase", true>;
3426}
3427
3428/**
3429 * @publicApi
3430 */
3431export declare const VERSION: Version;
3432
3433
3434/**
3435 * Defines a scroll position manager. Implemented by `BrowserViewportScroller`.
3436 *
3437 * @publicApi
3438 */
3439export declare abstract class ViewportScroller {
3440 /** @nocollapse */
3441 static ɵprov: unknown;
3442 /**
3443 * Configures the top offset used when scrolling to an anchor.
3444 * @param offset A position in screen coordinates (a tuple with x and y values)
3445 * or a function that returns the top offset position.
3446 *
3447 */
3448 abstract setOffset(offset: [number, number] | (() => [number, number])): void;
3449 /**
3450 * Retrieves the current scroll position.
3451 * @returns A position in screen coordinates (a tuple with x and y values).
3452 */
3453 abstract getScrollPosition(): [number, number];
3454 /**
3455 * Scrolls to a specified position.
3456 * @param position A position in screen coordinates (a tuple with x and y values).
3457 */
3458 abstract scrollToPosition(position: [number, number]): void;
3459 /**
3460 * Scrolls to an anchor element.
3461 * @param anchor The ID of the anchor element.
3462 */
3463 abstract scrollToAnchor(anchor: string): void;
3464 /**
3465 * Disables automatic scroll restoration provided by the browser.
3466 * See also [window.history.scrollRestoration
3467 * info](https://developers.google.com/web/updates/2015/09/history-api-scroll-restoration).
3468 */
3469 abstract setHistoryScrollRestoration(scrollRestoration: 'auto' | 'manual'): void;
3470}
3471
3472/**
3473 * The value for each day of the week, based on the `en-US` locale
3474 *
3475 * @publicApi
3476 *
3477 * @deprecated Week locale getters are deprecated
3478 */
3479export declare enum WeekDay {
3480 Sunday = 0,
3481 Monday = 1,
3482 Tuesday = 2,
3483 Wednesday = 3,
3484 Thursday = 4,
3485 Friday = 5,
3486 Saturday = 6
3487}
3488
3489
3490/**
3491 * A wrapper around the `XMLHttpRequest` constructor.
3492 *
3493 * @publicApi
3494 */
3495export declare abstract class XhrFactory {
3496 abstract build(): XMLHttpRequest;
3497}
3498
3499/**
3500 * Provides DOM operations in an environment-agnostic way.
3501 *
3502 * @security Tread carefully! Interacting with the DOM directly is dangerous and
3503 * can introduce XSS risks.
3504 */
3505export declare abstract class ɵDomAdapter {
3506 abstract dispatchEvent(el: any, evt: any): any;
3507 abstract readonly supportsDOMEvents: boolean;
3508 abstract remove(el: any): void;
3509 abstract createElement(tagName: any, doc?: any): HTMLElement;
3510 abstract createHtmlDocument(): Document;
3511 abstract getDefaultDocument(): Document;
3512 abstract isElementNode(node: any): boolean;
3513 abstract isShadowRoot(node: any): boolean;
3514 abstract onAndCancel(el: any, evt: any, listener: any): Function;
3515 abstract getGlobalEventTarget(doc: Document, target: string): any;
3516 abstract getBaseHref(doc: Document): string | null;
3517 abstract resetBaseElement(): void;
3518 abstract getUserAgent(): string;
3519 abstract getCookie(name: string): string | null;
3520}
3521
3522
3523export declare function ɵgetDOM(): ɵDomAdapter;
3524
3525/**
3526 * Normalizes URL parameters by prepending with `?` if needed.
3527 *
3528 * @param params String of URL parameters.
3529 *
3530 * @returns The normalized URL parameters string.
3531 */
3532export declare function ɵnormalizeQueryParams(params: string): string;
3533
3534/**
3535 * Provides an empty implementation of the viewport scroller.
3536 */
3537export declare class ɵNullViewportScroller implements ViewportScroller {
3538 /**
3539 * Empty implementation
3540 */
3541 setOffset(offset: [number, number] | (() => [number, number])): void;
3542 /**
3543 * Empty implementation
3544 */
3545 getScrollPosition(): [number, number];
3546 /**
3547 * Empty implementation
3548 */
3549 scrollToPosition(position: [number, number]): void;
3550 /**
3551 * Empty implementation
3552 */
3553 scrollToAnchor(anchor: string): void;
3554 /**
3555 * Empty implementation
3556 */
3557 setHistoryScrollRestoration(scrollRestoration: 'auto' | 'manual'): void;
3558}
3559
3560
3561export declare function ɵparseCookieValue(cookieStr: string, name: string): string | null;
3562
3563
3564export declare const ɵPLATFORM_BROWSER_ID = "browser";
3565
3566export declare const ɵPLATFORM_SERVER_ID = "server";
3567
3568/**
3569 * This class wraps the platform Navigation API which allows server-specific and test
3570 * implementations.
3571 */
3572export declare abstract class ɵPlatformNavigation implements Navigation {
3573 abstract entries(): NavigationHistoryEntry[];
3574 abstract currentEntry: NavigationHistoryEntry | null;
3575 abstract updateCurrentEntry(options: NavigationUpdateCurrentEntryOptions): void;
3576 abstract transition: NavigationTransition | null;
3577 abstract canGoBack: boolean;
3578 abstract canGoForward: boolean;
3579 abstract navigate(url: string, options?: NavigationNavigateOptions | undefined): NavigationResult;
3580 abstract reload(options?: NavigationReloadOptions | undefined): NavigationResult;
3581 abstract traverseTo(key: string, options?: NavigationOptions | undefined): NavigationResult;
3582 abstract back(options?: NavigationOptions | undefined): NavigationResult;
3583 abstract forward(options?: NavigationOptions | undefined): NavigationResult;
3584 abstract onnavigate: ((this: Navigation, ev: NavigateEvent) => any) | null;
3585 abstract onnavigatesuccess: ((this: Navigation, ev: Event) => any) | null;
3586 abstract onnavigateerror: ((this: Navigation, ev: ErrorEvent) => any) | null;
3587 abstract oncurrententrychange: ((this: Navigation, ev: NavigationCurrentEntryChangeEvent) => any) | null;
3588 abstract addEventListener(type: unknown, listener: unknown, options?: unknown): void;
3589 abstract removeEventListener(type: unknown, listener: unknown, options?: unknown): void;
3590 abstract dispatchEvent(event: Event): boolean;
3591 static ɵfac: i0.ɵɵFactoryDeclaration<ɵPlatformNavigation, never>;
3592 static ɵprov: i0.ɵɵInjectableDeclaration<ɵPlatformNavigation>;
3593}
3594
3595export declare function ɵsetRootDomAdapter(adapter: ɵDomAdapter): void;
3596
3597export { }
3598
\No newline at end of file