| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897 |
- /**
- * @license Angular v8.1.0
- * (c) 2010-2019 Google LLC. https://angular.io/
- * License: MIT
- */
- import { ChangeDetectorRef } from '@angular/core';
- import { DoCheck } from '@angular/core';
- import { ElementRef } from '@angular/core';
- import { InjectionToken } from '@angular/core';
- import { Injector } from '@angular/core';
- import { IterableDiffers } from '@angular/core';
- import { KeyValueDiffers } from '@angular/core';
- import { NgIterable } from '@angular/core';
- import { NgModuleFactory } from '@angular/core';
- import { Observable } from 'rxjs';
- import { OnChanges } from '@angular/core';
- import { OnDestroy } from '@angular/core';
- import { PipeTransform } from '@angular/core';
- import { Provider } from '@angular/core';
- import { Renderer2 } from '@angular/core';
- import { SimpleChanges } from '@angular/core';
- import { SubscriptionLike } from 'rxjs';
- import { TemplateRef } from '@angular/core';
- import { TrackByFunction } from '@angular/core';
- import { Type } from '@angular/core';
- import { Version } from '@angular/core';
- import { ViewContainerRef } from '@angular/core';
- /**
- * A predefined [DI token](guide/glossary#di-token) for the base href
- * to be used with the `PathLocationStrategy`.
- * The base href is the URL prefix that should be preserved when generating
- * and recognizing URLs.
- *
- * @usageNotes
- *
- * The following example shows how to use this token to configure the root app injector
- * with a base href value, so that the DI framework can supply the dependency anywhere in the app.
- *
- * ```typescript
- * import {Component, NgModule} from '@angular/core';
- * import {APP_BASE_HREF} from '@angular/common';
- *
- * @NgModule({
- * providers: [{provide: APP_BASE_HREF, useValue: '/my/app'}]
- * })
- * class AppModule {}
- * ```
- *
- * @publicApi
- */
- export declare const APP_BASE_HREF: InjectionToken<string>;
- /**
- * @ngModule CommonModule
- * @description
- *
- * Unwraps a value from an asynchronous primitive.
- *
- * The `async` pipe subscribes to an `Observable` or `Promise` and returns the latest value it has
- * emitted. When a new value is emitted, the `async` pipe marks the component to be checked for
- * changes. When the component gets destroyed, the `async` pipe unsubscribes automatically to avoid
- * potential memory leaks.
- *
- * @usageNotes
- *
- * ### Examples
- *
- * This example binds a `Promise` to the view. Clicking the `Resolve` button resolves the
- * promise.
- *
- * {@example common/pipes/ts/async_pipe.ts region='AsyncPipePromise'}
- *
- * It's also possible to use `async` with Observables. The example below binds the `time` Observable
- * to the view. The Observable continuously updates the view with the current time.
- *
- * {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'}
- *
- * @publicApi
- */
- export declare class AsyncPipe implements OnDestroy, PipeTransform {
- private _ref;
- private _latestValue;
- private _latestReturnedValue;
- private _subscription;
- private _obj;
- private _strategy;
- constructor(_ref: ChangeDetectorRef);
- ngOnDestroy(): void;
- transform<T>(obj: null): null;
- transform<T>(obj: undefined): undefined;
- transform<T>(obj: Observable<T> | null | undefined): T | null;
- transform<T>(obj: Promise<T> | null | undefined): T | null;
- private _subscribe;
- private _selectStrategy;
- private _dispose;
- private _updateLatestValue;
- }
- /**
- * Exports all the basic Angular directives and pipes,
- * such as `NgIf`, `NgForOf`, `DecimalPipe`, and so on.
- * Re-exported by `BrowserModule`, which is included automatically in the root
- * `AppModule` when you create a new app with the CLI `new` command.
- *
- * * The `providers` options configure the NgModule's injector to provide
- * localization dependencies to members.
- * * The `exports` options make the declared directives and pipes available for import
- * by other NgModules.
- *
- * @publicApi
- */
- export declare class CommonModule {
- }
- /**
- * @ngModule CommonModule
- * @description
- *
- * Transforms a number to a currency string, formatted according to locale rules
- * that determine group sizing and separator, decimal-point character,
- * and other locale-specific configurations.
- *
- * @see `getCurrencySymbol()`
- * @see `formatCurrency()`
- *
- * @usageNotes
- * The following code shows how the pipe transforms numbers
- * into text strings, according to various format specifications,
- * where the caller's default locale is `en-US`.
- *
- * <code-example path="common/pipes/ts/currency_pipe.ts" region='CurrencyPipe'></code-example>
- *
- * @publicApi
- */
- export declare class CurrencyPipe implements PipeTransform {
- private _locale;
- constructor(_locale: string);
- /**
- *
- * @param value The number to be formatted as currency.
- * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code,
- * such as `USD` for the US dollar and `EUR` for the euro.
- * @param display The format for the currency indicator. One of the following:
- * - `code`: Show the code (such as `USD`).
- * - `symbol`(default): Show the symbol (such as `$`).
- * - `symbol-narrow`: Use the narrow symbol for locales that have two symbols for their
- * currency.
- * For example, the Canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`. If the
- * locale has no narrow symbol, uses the standard symbol for the locale.
- * - String: Use the given string value instead of a code or a symbol.
- * For example, an empty string will suppress the currency & symbol.
- * - Boolean (marked deprecated in v5): `true` for symbol and false for `code`.
- *
- * @param digitsInfo Decimal representation options, specified by a string
- * in the following format:<br>
- * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.
- * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.
- * Default is `1`.
- * - `minFractionDigits`: The minimum number of digits after the decimal point.
- * Default is `2`.
- * - `maxFractionDigits`: The maximum number of digits after the decimal point.
- * Default is `2`.
- * If not provided, the number will be formatted with the proper amount of digits,
- * depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies.
- * For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none.
- * @param locale A locale code for the locale format rules to use.
- * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.
- * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).
- */
- transform(value: any, currencyCode?: string, display?: 'code' | 'symbol' | 'symbol-narrow' | string | boolean, digitsInfo?: string, locale?: string): string | null;
- }
- /**
- * @ngModule CommonModule
- * @description
- *
- * Formats a date value according to locale rules.
- *
- * Only the `en-US` locale data comes with Angular. To localize dates
- * in another language, you must import the corresponding locale data.
- * See the [I18n guide](guide/i18n#i18n-pipes) for more information.
- *
- * @see `formatDate()`
- *
- *
- * @usageNotes
- *
- * The result of this pipe is not reevaluated when the input is mutated. To avoid the need to
- * reformat the date on every change-detection cycle, treat the date as an immutable object
- * and change the reference when the pipe needs to run again.
- *
- * ### Pre-defined format options
- *
- * Examples are given in `en-US` locale.
- *
- * - `'short'`: equivalent to `'M/d/yy, h:mm a'` (`6/15/15, 9:03 AM`).
- * - `'medium'`: equivalent to `'MMM d, y, h:mm:ss a'` (`Jun 15, 2015, 9:03:01 AM`).
- * - `'long'`: equivalent to `'MMMM d, y, h:mm:ss a z'` (`June 15, 2015 at 9:03:01 AM
- * GMT+1`).
- * - `'full'`: equivalent to `'EEEE, MMMM d, y, h:mm:ss a zzzz'` (`Monday, June 15, 2015 at
- * 9:03:01 AM GMT+01:00`).
- * - `'shortDate'`: equivalent to `'M/d/yy'` (`6/15/15`).
- * - `'mediumDate'`: equivalent to `'MMM d, y'` (`Jun 15, 2015`).
- * - `'longDate'`: equivalent to `'MMMM d, y'` (`June 15, 2015`).
- * - `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` (`Monday, June 15, 2015`).
- * - `'shortTime'`: equivalent to `'h:mm a'` (`9:03 AM`).
- * - `'mediumTime'`: equivalent to `'h:mm:ss a'` (`9:03:01 AM`).
- * - `'longTime'`: equivalent to `'h:mm:ss a z'` (`9:03:01 AM GMT+1`).
- * - `'fullTime'`: equivalent to `'h:mm:ss a zzzz'` (`9:03:01 AM GMT+01:00`).
- *
- * ### Custom format options
- *
- * You can construct a format string using symbols to specify the components
- * of a date-time value, as described in the following table.
- * Format details depend on the locale.
- * Fields marked with (*) are only available in the extra data set for the given locale.
- *
- * | Field type | Format | Description | Example Value |
- * |--------------------|-------------|---------------------------------------------------------------|------------------------------------------------------------|
- * | Era | G, GG & GGG | Abbreviated | AD |
- * | | GGGG | Wide | Anno Domini |
- * | | GGGGG | Narrow | A |
- * | Year | y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 |
- * | | yy | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 |
- * | | yyy | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 |
- * | | yyyy | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 |
- * | Month | M | Numeric: 1 digit | 9, 12 |
- * | | MM | Numeric: 2 digits + zero padded | 09, 12 |
- * | | MMM | Abbreviated | Sep |
- * | | MMMM | Wide | September |
- * | | MMMMM | Narrow | S |
- * | Month standalone | L | Numeric: 1 digit | 9, 12 |
- * | | LL | Numeric: 2 digits + zero padded | 09, 12 |
- * | | LLL | Abbreviated | Sep |
- * | | LLLL | Wide | September |
- * | | LLLLL | Narrow | S |
- * | Week of year | w | Numeric: minimum digits | 1... 53 |
- * | | ww | Numeric: 2 digits + zero padded | 01... 53 |
- * | Week of month | W | Numeric: 1 digit | 1... 5 |
- * | Day of month | d | Numeric: minimum digits | 1 |
- * | | dd | Numeric: 2 digits + zero padded | 01 |
- * | Week day | E, EE & EEE | Abbreviated | Tue |
- * | | EEEE | Wide | Tuesday |
- * | | EEEEE | Narrow | T |
- * | | EEEEEE | Short | Tu |
- * | Period | a, aa & aaa | Abbreviated | am/pm or AM/PM |
- * | | aaaa | Wide (fallback to `a` when missing) | ante meridiem/post meridiem |
- * | | aaaaa | Narrow | a/p |
- * | Period* | B, BB & BBB | Abbreviated | mid. |
- * | | BBBB | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |
- * | | BBBBB | Narrow | md |
- * | Period standalone* | b, bb & bbb | Abbreviated | mid. |
- * | | bbbb | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |
- * | | bbbbb | Narrow | md |
- * | Hour 1-12 | h | Numeric: minimum digits | 1, 12 |
- * | | hh | Numeric: 2 digits + zero padded | 01, 12 |
- * | Hour 0-23 | H | Numeric: minimum digits | 0, 23 |
- * | | HH | Numeric: 2 digits + zero padded | 00, 23 |
- * | Minute | m | Numeric: minimum digits | 8, 59 |
- * | | mm | Numeric: 2 digits + zero padded | 08, 59 |
- * | Second | s | Numeric: minimum digits | 0... 59 |
- * | | ss | Numeric: 2 digits + zero padded | 00... 59 |
- * | Fractional seconds | S | Numeric: 1 digit | 0... 9 |
- * | | SS | Numeric: 2 digits + zero padded | 00... 99 |
- * | | SSS | Numeric: 3 digits + zero padded (= milliseconds) | 000... 999 |
- * | Zone | z, zz & zzz | Short specific non location format (fallback to O) | GMT-8 |
- * | | zzzz | Long specific non location format (fallback to OOOO) | GMT-08:00 |
- * | | Z, ZZ & ZZZ | ISO8601 basic format | -0800 |
- * | | ZZZZ | Long localized GMT format | GMT-8:00 |
- * | | ZZZZZ | ISO8601 extended format + Z indicator for offset 0 (= XXXXX) | -08:00 |
- * | | O, OO & OOO | Short localized GMT format | GMT-8 |
- * | | OOOO | Long localized GMT format | GMT-08:00 |
- *
- * Note that timezone correction is not applied to an ISO string that has no time component, such as "2016-09-19"
- *
- * ### Format examples
- *
- * These examples transform a date into various formats,
- * assuming that `dateObj` is a JavaScript `Date` object for
- * year: 2015, month: 6, day: 15, hour: 21, minute: 43, second: 11,
- * given in the local time for the `en-US` locale.
- *
- * ```
- * {{ dateObj | date }} // output is 'Jun 15, 2015'
- * {{ dateObj | date:'medium' }} // output is 'Jun 15, 2015, 9:43:11 PM'
- * {{ dateObj | date:'shortTime' }} // output is '9:43 PM'
- * {{ dateObj | date:'mm:ss' }} // output is '43:11'
- * ```
- *
- * ### Usage example
- *
- * The following component uses a date pipe to display the current date in different formats.
- *
- * ```
- * @Component({
- * selector: 'date-pipe',
- * template: `<div>
- * <p>Today is {{today | date}}</p>
- * <p>Or if you prefer, {{today | date:'fullDate'}}</p>
- * <p>The time is {{today | date:'h:mm a z'}}</p>
- * </div>`
- * })
- * // Get the current date and time as a date-time value.
- * export class DatePipeComponent {
- * today: number = Date.now();
- * }
- * ```
- *
- * @publicApi
- */
- export declare class DatePipe implements PipeTransform {
- private locale;
- constructor(locale: string);
- /**
- * @param value The date expression: a `Date` object, a number
- * (milliseconds since UTC epoch), or an ISO string (https://www.w3.org/TR/NOTE-datetime).
- * @param format The date/time components to include, using predefined options or a
- * custom format string.
- * @param timezone A timezone offset (such as `'+0430'`), or a standard
- * UTC/GMT or continental US timezone abbreviation. Default is
- * the local system timezone of the end-user's machine.
- * @param locale A locale code for the locale format rules to use.
- * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.
- * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).
- * @returns A date string in the desired format.
- */
- transform(value: any, format?: string, timezone?: string, locale?: string): string | null;
- }
- /**
- * @ngModule CommonModule
- * @description
- *
- * Transforms a number into a string,
- * formatted according to locale rules that determine group sizing and
- * separator, decimal-point character, and other locale-specific
- * configurations.
- *
- * If no parameters are specified, the function rounds off to the nearest value using this
- * [rounding method](https://en.wikibooks.org/wiki/Arithmetic/Rounding).
- * The behavior differs from that of the JavaScript ```Math.round()``` function.
- * In the following case for example, the pipe rounds down where
- * ```Math.round()``` rounds up:
- *
- * ```html
- * -2.5 | number:'1.0-0'
- * > -3
- * Math.round(-2.5)
- * > -2
- * ```
- *
- * @see `formatNumber()`
- *
- * @usageNotes
- * The following code shows how the pipe transforms numbers
- * into text strings, according to various format specifications,
- * where the caller's default locale is `en-US`.
- *
- * ### Example
- *
- * <code-example path="common/pipes/ts/number_pipe.ts" region='NumberPipe'></code-example>
- *
- * @publicApi
- */
- export declare class DecimalPipe implements PipeTransform {
- private _locale;
- constructor(_locale: string);
- /**
- * @param value The number to be formatted.
- * @param digitsInfo Decimal representation options, specified by a string
- * in the following format:<br>
- * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.
- * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.
- * Default is `1`.
- * - `minFractionDigits`: The minimum number of digits after the decimal point.
- * Default is `0`.
- * - `maxFractionDigits`: The maximum number of digits after the decimal point.
- * Default is `3`.
- * @param locale A locale code for the locale format rules to use.
- * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.
- * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).
- */
- transform(value: any, digitsInfo?: string, locale?: string): string | null;
- }
- /**
- * @ngModule CommonModule
- * @description
- *
- * Formats a number as currency using locale rules.
- *
- * Use `currency` to format a number as currency.
- *
- * - `currencyCode` is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, such
- * as `USD` for the US dollar and `EUR` for the euro.
- * - `symbolDisplay` is a boolean indicating whether to use the currency symbol or code.
- * - `true`: use symbol (e.g. `$`).
- * - `false`(default): use code (e.g. `USD`).
- * - `digitInfo` See {@link DecimalPipe} for detailed description.
- *
- * WARNING: this pipe uses the Internationalization API which is not yet available in all browsers
- * and may require a polyfill. See [Browser Support](guide/browser-support) for details.
- *
- * @usageNotes
- *
- * ### Example
- *
- * {@example common/pipes/ts/currency_pipe.ts region='DeprecatedCurrencyPipe'}
- *
- * @publicApi
- */
- export declare class DeprecatedCurrencyPipe implements PipeTransform {
- private _locale;
- constructor(_locale: string);
- transform(value: any, currencyCode?: string, symbolDisplay?: boolean, digits?: string): string | null;
- }
- /**
- * @ngModule CommonModule
- * @description
- *
- * Formats a date according to locale rules.
- *
- * Where:
- * - `expression` is a date object or a number (milliseconds since UTC epoch) or an ISO string
- * (https://www.w3.org/TR/NOTE-datetime).
- * - `format` indicates which date/time components to include. The format can be predefined as
- * shown below or custom as shown in the table.
- * - `'medium'`: equivalent to `'yMMMdjms'` (e.g. `Sep 3, 2010, 12:05:08 PM` for `en-US`)
- * - `'short'`: equivalent to `'yMdjm'` (e.g. `9/3/2010, 12:05 PM` for `en-US`)
- * - `'fullDate'`: equivalent to `'yMMMMEEEEd'` (e.g. `Friday, September 3, 2010` for `en-US`)
- * - `'longDate'`: equivalent to `'yMMMMd'` (e.g. `September 3, 2010` for `en-US`)
- * - `'mediumDate'`: equivalent to `'yMMMd'` (e.g. `Sep 3, 2010` for `en-US`)
- * - `'shortDate'`: equivalent to `'yMd'` (e.g. `9/3/2010` for `en-US`)
- * - `'mediumTime'`: equivalent to `'jms'` (e.g. `12:05:08 PM` for `en-US`)
- * - `'shortTime'`: equivalent to `'jm'` (e.g. `12:05 PM` for `en-US`)
- *
- *
- * | Component | Symbol | Narrow | Short Form | Long Form | Numeric | 2-digit |
- * |-----------|:------:|--------|--------------|-------------------|-----------|-----------|
- * | era | G | G (A) | GGG (AD) | GGGG (Anno Domini)| - | - |
- * | year | y | - | - | - | y (2015) | yy (15) |
- * | month | M | L (S) | MMM (Sep) | MMMM (September) | M (9) | MM (09) |
- * | day | d | - | - | - | d (3) | dd (03) |
- * | weekday | E | E (S) | EEE (Sun) | EEEE (Sunday) | - | - |
- * | hour | j | - | - | - | j (13) | jj (13) |
- * | hour12 | h | - | - | - | h (1 PM) | hh (01 PM)|
- * | hour24 | H | - | - | - | H (13) | HH (13) |
- * | minute | m | - | - | - | m (5) | mm (05) |
- * | second | s | - | - | - | s (9) | ss (09) |
- * | timezone | z | - | - | z (Pacific Standard Time)| - | - |
- * | timezone | Z | - | Z (GMT-8:00) | - | - | - |
- * | timezone | a | - | a (PM) | - | - | - |
- *
- * In javascript, only the components specified will be respected (not the ordering,
- * punctuations, ...) and details of the formatting will be dependent on the locale.
- *
- * Timezone of the formatted text will be the local system timezone of the end-user's machine.
- *
- * When the expression is a ISO string without time (e.g. 2016-09-19) the time zone offset is not
- * applied and the formatted text will have the same day, month and year of the expression.
- *
- * WARNINGS:
- * - this pipe is marked as pure hence it will not be re-evaluated when the input is mutated.
- * Instead users should treat the date as an immutable object and change the reference when the
- * pipe needs to re-run (this is to avoid reformatting the date on every change detection run
- * which would be an expensive operation).
- * - this pipe uses the Internationalization API. Therefore it is only reliable in Chrome and Opera
- * browsers.
- *
- * @usageNotes
- *
- * ### Examples
- *
- * Assuming `dateObj` is (year: 2010, month: 9, day: 3, hour: 12 PM, minute: 05, second: 08)
- * in the _local_ time and locale is 'en-US':
- *
- * {@example common/pipes/ts/date_pipe.ts region='DeprecatedDatePipe'}
- *
- * @publicApi
- */
- export declare class DeprecatedDatePipe implements PipeTransform {
- private _locale;
- constructor(_locale: string);
- transform(value: any, pattern?: string): string | null;
- }
- /**
- * Formats a number as text. Group sizing and separator and other locale-specific
- * configurations are based on the active locale.
- *
- * where `expression` is a number:
- * - `digitInfo` is a `string` which has a following format: <br>
- * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>
- * - `minIntegerDigits` is the minimum number of integer digits to use. Defaults to `1`.
- * - `minFractionDigits` is the minimum number of digits after fraction. Defaults to `0`.
- * - `maxFractionDigits` is the maximum number of digits after fraction. Defaults to `3`.
- *
- * For more information on the acceptable range for each of these numbers and other
- * details see your native internationalization library.
- *
- * WARNING: this pipe uses the Internationalization API which is not yet available in all browsers
- * and may require a polyfill. See [Browser Support](guide/browser-support) for details.
- *
- * @usageNotes
- *
- * ### Example
- *
- * {@example common/pipes/ts/number_pipe.ts region='DeprecatedNumberPipe'}
- *
- * @ngModule CommonModule
- * @publicApi
- */
- export declare class DeprecatedDecimalPipe implements PipeTransform {
- private _locale;
- constructor(_locale: string);
- transform(value: any, digits?: string): string | null;
- }
- /**
- * A module that contains the deprecated i18n pipes.
- *
- * @deprecated from v5
- * @publicApi
- */
- export declare class DeprecatedI18NPipesModule {
- }
- /**
- * @ngModule CommonModule
- *
- * @description
- *
- * Formats a number as percentage according to locale rules.
- *
- * - `digitInfo` See {@link DecimalPipe} for detailed description.
- *
- * WARNING: this pipe uses the Internationalization API which is not yet available in all browsers
- * and may require a polyfill. See [Browser Support](guide/browser-support) for details.
- *
- * @usageNotes
- *
- * ### Example
- *
- * {@example common/pipes/ts/percent_pipe.ts region='DeprecatedPercentPipe'}
- *
- * @publicApi
- */
- export declare class DeprecatedPercentPipe implements PipeTransform {
- private _locale;
- constructor(_locale: string);
- transform(value: any, digits?: string): string | null;
- }
- /**
- * A DI Token representing the main rendering context. In a browser this is the DOM Document.
- *
- * Note: Document might not be available in the Application Context when Application and Rendering
- * Contexts are not the same (e.g. when running the application into a Web Worker).
- *
- * @publicApi
- */
- export declare const DOCUMENT: InjectionToken<Document>;
- /**
- * @ngModule CommonModule
- * @description
- *
- * Formats a number as currency using locale rules.
- *
- * @param value The number to format.
- * @param locale A locale code for the locale format rules to use.
- * @param currency A string containing the currency symbol or its name,
- * such as "$" or "Canadian Dollar". Used in output string, but does not affect the operation
- * of the function.
- * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)
- * currency code to use in the result string, such as `USD` for the US dollar and `EUR` for the euro.
- * @param digitInfo Decimal representation options, specified by a string in the following format:
- * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.
- *
- * @returns The formatted currency value.
- *
- * @see `formatNumber()`
- * @see `DecimalPipe`
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare function formatCurrency(value: number, locale: string, currency: string, currencyCode?: string, digitsInfo?: string): string;
- /**
- * @ngModule CommonModule
- * @description
- *
- * Formats a date according to locale rules.
- *
- * @param value The date to format, as a Date, or a number (milliseconds since UTC epoch)
- * or an [ISO date-time string](https://www.w3.org/TR/NOTE-datetime).
- * @param format The date-time components to include. See `DatePipe` for details.
- * @param locale A locale code for the locale format rules to use.
- * @param timezone The time zone. A time zone offset from GMT (such as `'+0430'`),
- * or a standard UTC/GMT or continental US time zone abbreviation.
- * If not specified, uses host system settings.
- *
- * @returns The formatted date string.
- *
- * @see `DatePipe`
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare function formatDate(value: string | number | Date, format: string, locale: string, timezone?: string): string;
- /**
- * @ngModule CommonModule
- * @description
- *
- * Formats a number as text, with group sizing, separator, and other
- * parameters based on the locale.
- *
- * @param value The number to format.
- * @param locale A locale code for the locale format rules to use.
- * @param digitInfo Decimal representation options, specified by a string in the following format:
- * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.
- *
- * @returns The formatted text string.
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare function formatNumber(value: number, locale: string, digitsInfo?: string): string;
- /**
- * @ngModule CommonModule
- * @description
- *
- * Formats a number as a percentage according to locale rules.
- *
- * @param value The number to format.
- * @param locale A locale code for the locale format rules to use.
- * @param digitInfo Decimal representation options, specified by a string in the following format:
- * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.
- *
- * @returns The formatted percentage value.
- *
- * @see `formatNumber()`
- * @see `DecimalPipe`
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- * @publicApi
- *
- */
- export declare function formatPercent(value: number, locale: string, digitsInfo?: string): string;
- /**
- * String widths available for date-time formats.
- * The specific character widths are locale-specific.
- * Examples are given for `en-US`.
- *
- * @see `getLocaleDateFormat()`
- * @see `getLocaleTimeFormat()``
- * @see `getLocaleDateTimeFormat()`
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- * @publicApi
- */
- export declare enum FormatWidth {
- /**
- * For `en-US`, 'M/d/yy, h:mm a'`
- * (Example: `6/15/15, 9:03 AM`)
- */
- Short = 0,
- /**
- * For `en-US`, `'MMM d, y, h:mm:ss a'`
- * (Example: `Jun 15, 2015, 9:03:01 AM`)
- */
- Medium = 1,
- /**
- * For `en-US`, `'MMMM d, y, h:mm:ss a z'`
- * (Example: `June 15, 2015 at 9:03:01 AM GMT+1`)
- */
- Long = 2,
- /**
- * For `en-US`, `'EEEE, MMMM d, y, h:mm:ss a zzzz'`
- * (Example: `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00`)
- */
- Full = 3
- }
- /**
- * Context-dependant translation forms for strings.
- * Typically the standalone version is for the nominative form of the word,
- * and the format version is used for the genitive case.
- * @see [CLDR website](http://cldr.unicode.org/translation/date-time#TOC-Stand-Alone-vs.-Format-Styles)
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare enum FormStyle {
- Format = 0,
- Standalone = 1
- }
- /**
- * Retrieves the currency symbol for a given currency code.
- *
- * For example, for the default `en-US` locale, the code `USD` can
- * be represented by the narrow symbol `$` or the wide symbol `US$`.
- *
- * @param code The currency code.
- * @param format The format, `wide` or `narrow`.
- * @param locale A locale code for the locale format rules to use.
- *
- * @returns The symbol, or the currency code if no symbol is available.0
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare function getCurrencySymbol(code: string, format: 'wide' | 'narrow', locale?: string): string;
- /**
- * Retrieves the name of the currency for the main country corresponding
- * to a given locale. For example, 'US Dollar' for `en-US`.
- * @param locale A locale code for the locale format rules to use.
- * @returns The currency name,
- * or `null` if the main country cannot be determined.
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare function getLocaleCurrencyName(locale: string): string | null;
- /**
- * Retrieves the symbol used to represent the currency for the main country
- * corresponding to a given locale. For example, '$' for `en-US`.
- *
- * @param locale A locale code for the locale format rules to use.
- * @returns The localized symbol character,
- * or `null` if the main country cannot be determined.
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare function getLocaleCurrencySymbol(locale: string): string | null;
- /**
- * Retrieves a localized date-value formating string.
- *
- * @param locale A locale code for the locale format rules to use.
- * @param width The format type.
- * @returns The localized formating string.
- * @see `FormatWidth`
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare function getLocaleDateFormat(locale: string, width: FormatWidth): string;
- /**
- * Retrieves a localized date-time formatting string.
- *
- * @param locale A locale code for the locale format rules to use.
- * @param width The format type.
- * @returns The localized formatting string.
- * @see `FormatWidth`
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare function getLocaleDateTimeFormat(locale: string, width: FormatWidth): string;
- /**
- * Retrieves days of the week for the given locale, using the Gregorian calendar.
- *
- * @param locale A locale code for the locale format rules to use.
- * @param formStyle The required grammatical form.
- * @param width The required character width.
- * @returns An array of localized name strings.
- * For example,`[Sunday, Monday, ... Saturday]` for `en-US`.
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare function getLocaleDayNames(locale: string, formStyle: FormStyle, width: TranslationWidth): string[];
- /**
- * Retrieves day period strings for the given locale.
- *
- * @param locale A locale code for the locale format rules to use.
- * @param formStyle The required grammatical form.
- * @param width The required character width.
- * @returns An array of localized period strings. For example, `[AM, PM]` for `en-US`.
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare function getLocaleDayPeriods(locale: string, formStyle: FormStyle, width: TranslationWidth): [string, string];
- /**
- * Retrieves Gregorian-calendar eras for the given locale.
- * @param locale A locale code for the locale format rules to use.
- * @param formStyle The required grammatical form.
- * @param width The required character width.
- * @returns An array of localized era strings.
- * For example, `[AD, BC]` for `en-US`.
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare function getLocaleEraNames(locale: string, width: TranslationWidth): [string, string];
- /**
- * Retrieves locale-specific rules used to determine which day period to use
- * when more than one period is defined for a locale.
- *
- * There is a rule for each defined day period. The
- * first rule is applied to the first day period and so on.
- * Fall back to AM/PM when no rules are available.
- *
- * A rule can specify a period as time range, or as a single time value.
- *
- * This functionality is only available when you have loaded the full locale data.
- * See the ["I18n guide"](guide/i18n#i18n-pipes).
- *
- * @param locale A locale code for the locale format rules to use.
- * @returns The rules for the locale, a single time value or array of *from-time, to-time*,
- * or null if no periods are available.
- *
- * @see `getLocaleExtraDayPeriods()`
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare function getLocaleExtraDayPeriodRules(locale: string): (Time | [Time, Time])[];
- /**
- * Retrieves locale-specific day periods, which indicate roughly how a day is broken up
- * in different languages.
- * For example, for `en-US`, periods are morning, noon, afternoon, evening, and midnight.
- *
- * This functionality is only available when you have loaded the full locale data.
- * See the ["I18n guide"](guide/i18n#i18n-pipes).
- *
- * @param locale A locale code for the locale format rules to use.
- * @param formStyle The required grammatical form.
- * @param width The required character width.
- * @returns The translated day-period strings.
- * @see `getLocaleExtraDayPeriodRules()`
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare function getLocaleExtraDayPeriods(locale: string, formStyle: FormStyle, width: TranslationWidth): string[];
- /**
- * Retrieves the first day of the week for the given locale.
- *
- * @param locale A locale code for the locale format rules to use.
- * @returns A day index number, using the 0-based week-day index for `en-US`
- * (Sunday = 0, Monday = 1, ...).
- * For example, for `fr-FR`, returns 1 to indicate that the first day is Monday.
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare function getLocaleFirstDayOfWeek(locale: string): WeekDay;
- /**
- * Retrieves the locale ID from the currently loaded locale.
- * The loaded locale could be, for example, a global one rather than a regional one.
- * @param locale A locale code, such as `fr-FR`.
- * @returns The locale code. For example, `fr`.
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare function getLocaleId(locale: string): string;
- /**
- * Retrieves months of the year for the given locale, using the Gregorian calendar.
- *
- * @param locale A locale code for the locale format rules to use.
- * @param formStyle The required grammatical form.
- * @param width The required character width.
- * @returns An array of localized name strings.
- * For example, `[January, February, ...]` for `en-US`.
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare function getLocaleMonthNames(locale: string, formStyle: FormStyle, width: TranslationWidth): string[];
- /**
- * Retrieves a number format for a given locale.
- *
- * Numbers are formatted using patterns, like `#,###.00`. For example, the pattern `#,###.00`
- * when used to format the number 12345.678 could result in "12'345,678". That would happen if the
- * grouping separator for your language is an apostrophe, and the decimal separator is a comma.
- *
- * <b>Important:</b> The characters `.` `,` `0` `#` (and others below) are special placeholders
- * that stand for the decimal separator, and so on, and are NOT real characters.
- * You must NOT "translate" the placeholders. For example, don't change `.` to `,` even though in
- * your language the decimal point is written with a comma. The symbols should be replaced by the
- * local equivalents, using the appropriate `NumberSymbol` for your language.
- *
- * Here are the special characters used in number patterns:
- *
- * | Symbol | Meaning |
- * |--------|---------|
- * | . | Replaced automatically by the character used for the decimal point. |
- * | , | Replaced by the "grouping" (thousands) separator. |
- * | 0 | Replaced by a digit (or zero if there aren't enough digits). |
- * | # | Replaced by a digit (or nothing if there aren't enough). |
- * | ¤ | Replaced by a currency symbol, such as $ or USD. |
- * | % | Marks a percent format. The % symbol may change position, but must be retained. |
- * | E | Marks a scientific format. The E symbol may change position, but must be retained. |
- * | ' | Special characters used as literal characters are quoted with ASCII single quotes. |
- *
- * @param locale A locale code for the locale format rules to use.
- * @param type The type of numeric value to be formatted (such as `Decimal` or `Currency`.)
- * @returns The localized format string.
- * @see `NumberFormatStyle`
- * @see [CLDR website](http://cldr.unicode.org/translation/number-patterns)
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare function getLocaleNumberFormat(locale: string, type: NumberFormatStyle): string;
- /**
- * Retrieves a localized number symbol that can be used to replace placeholders in number formats.
- * @param locale The locale code.
- * @param symbol The symbol to localize.
- * @returns The character for the localized symbol.
- * @see `NumberSymbol`
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare function getLocaleNumberSymbol(locale: string, symbol: NumberSymbol): string;
- /**
- * @alias core/ɵgetLocalePluralCase
- * @publicApi
- */
- export declare const getLocalePluralCase: (locale: string) => ((value: number) => Plural);
- /**
- * Retrieves a localized time-value formatting string.
- *
- * @param locale A locale code for the locale format rules to use.
- * @param width The format type.
- * @returns The localized formatting string.
- * @see `FormatWidth`
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- * @publicApi
- */
- export declare function getLocaleTimeFormat(locale: string, width: FormatWidth): string;
- /**
- * Range of week days that are considered the week-end for the given locale.
- *
- * @param locale A locale code for the locale format rules to use.
- * @returns The range of day values, `[startDay, endDay]`.
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare function getLocaleWeekEndRange(locale: string): [WeekDay, WeekDay];
- /**
- * Reports the number of decimal digits for a given currency.
- * The value depends upon the presence of cents in that particular currency.
- *
- * @param code The currency code.
- * @returns The number of decimal digits, typically 0 or 2.
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare function getNumberOfCurrencyDigits(code: string): number;
- /**
- * @description
- * A {@link LocationStrategy} used to configure the {@link Location} service to
- * represent its state in the
- * [hash fragment](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax)
- * of the browser's URL.
- *
- * For instance, if you call `location.go('/foo')`, the browser's URL will become
- * `example.com#/foo`.
- *
- * @usageNotes
- *
- * ### Example
- *
- * {@example common/location/ts/hash_location_component.ts region='LocationComponent'}
- *
- * @publicApi
- */
- export declare class HashLocationStrategy extends LocationStrategy {
- private _platformLocation;
- private _baseHref;
- constructor(_platformLocation: PlatformLocation, _baseHref?: string);
- onPopState(fn: LocationChangeListener): void;
- getBaseHref(): string;
- path(includeHash?: boolean): string;
- prepareExternalUrl(internal: string): string;
- pushState(state: any, title: string, path: string, queryParams: string): void;
- replaceState(state: any, title: string, path: string, queryParams: string): void;
- forward(): void;
- back(): void;
- }
- /**
- * @ngModule CommonModule
- * @description
- *
- * Maps a value to a string that pluralizes the value according to locale rules.
- *
- * @usageNotes
- *
- * ### Example
- *
- * {@example common/pipes/ts/i18n_pipe.ts region='I18nPluralPipeComponent'}
- *
- * @publicApi
- */
- export declare class I18nPluralPipe implements PipeTransform {
- private _localization;
- constructor(_localization: NgLocalization);
- /**
- * @param value the number to be formatted
- * @param pluralMap an object that mimics the ICU format, see
- * http://userguide.icu-project.org/formatparse/messages.
- * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by
- * default).
- */
- transform(value: number, pluralMap: {
- [count: string]: string;
- }, locale?: string): string;
- }
- /**
- * @ngModule CommonModule
- * @description
- *
- * Generic selector that displays the string that matches the current value.
- *
- * If none of the keys of the `mapping` match the `value`, then the content
- * of the `other` key is returned when present, otherwise an empty string is returned.
- *
- * @usageNotes
- *
- * ### Example
- *
- * {@example common/pipes/ts/i18n_pipe.ts region='I18nSelectPipeComponent'}
- *
- * @publicApi
- */
- export declare class I18nSelectPipe implements PipeTransform {
- /**
- * @param value a string to be internationalized.
- * @param mapping an object that indicates the text that should be displayed
- * for different values of the provided `value`.
- */
- transform(value: string | null | undefined, mapping: {
- [key: string]: string;
- }): string;
- }
- /**
- * Returns whether a platform id represents a browser platform.
- * @publicApi
- */
- export declare function isPlatformBrowser(platformId: Object): boolean;
- /**
- * Returns whether a platform id represents a server platform.
- * @publicApi
- */
- export declare function isPlatformServer(platformId: Object): boolean;
- /**
- * Returns whether a platform id represents a web worker app platform.
- * @publicApi
- */
- export declare function isPlatformWorkerApp(platformId: Object): boolean;
- /**
- * Returns whether a platform id represents a web worker UI platform.
- * @publicApi
- */
- export declare function isPlatformWorkerUi(platformId: Object): boolean;
- /**
- * @ngModule CommonModule
- * @description
- *
- * Converts a value into its JSON-format representation. Useful for debugging.
- *
- * @usageNotes
- *
- * The following component uses a JSON pipe to convert an object
- * to JSON format, and displays the string in both formats for comparison.
- *
- * {@example common/pipes/ts/json_pipe.ts region='JsonPipe'}
- *
- * @publicApi
- */
- export declare class JsonPipe implements PipeTransform {
- /**
- * @param value A value of any type to convert into a JSON-format string.
- */
- transform(value: any): string;
- }
- /**
- * A key value pair.
- * Usually used to represent the key value pairs from a Map or Object.
- *
- * @publicApi
- */
- export declare interface KeyValue<K, V> {
- key: K;
- value: V;
- }
- /**
- * @ngModule CommonModule
- * @description
- *
- * Transforms Object or Map into an array of key value pairs.
- *
- * The output array will be ordered by keys.
- * By default the comparator will be by Unicode point value.
- * You can optionally pass a compareFn if your keys are complex types.
- *
- * @usageNotes
- * ### Examples
- *
- * This examples show how an Object or a Map can be iterated by ngFor with the use of this keyvalue
- * pipe.
- *
- * {@example common/pipes/ts/keyvalue_pipe.ts region='KeyValuePipe'}
- *
- * @publicApi
- */
- export declare class KeyValuePipe implements PipeTransform {
- private readonly differs;
- constructor(differs: KeyValueDiffers);
- private differ;
- private keyValues;
- transform<K, V>(input: null, compareFn?: (a: KeyValue<K, V>, b: KeyValue<K, V>) => number): null;
- transform<V>(input: {
- [key: string]: V;
- } | Map<string, V>, compareFn?: (a: KeyValue<string, V>, b: KeyValue<string, V>) => number): Array<KeyValue<string, V>>;
- transform<V>(input: {
- [key: number]: V;
- } | Map<number, V>, compareFn?: (a: KeyValue<number, V>, b: KeyValue<number, V>) => number): Array<KeyValue<number, V>>;
- transform<K, V>(input: Map<K, V>, compareFn?: (a: KeyValue<K, V>, b: KeyValue<K, V>) => number): Array<KeyValue<K, V>>;
- }
- /**
- * @description
- *
- * A service that applications can use to interact with a browser's URL.
- *
- * Depending on the `LocationStrategy` used, `Location` will either persist
- * to the URL's path or the URL's hash segment.
- *
- * @usageNotes
- *
- * It's better to use the {@link Router#navigate} service to trigger route changes. Use
- * `Location` only if you need to interact with or create normalized URLs outside of
- * routing.
- *
- * `Location` is responsible for normalizing the URL against the application's base href.
- * A normalized URL is absolute from the URL host, includes the application's base href, and has no
- * trailing slash:
- * - `/my/app/user/123` is normalized
- * - `my/app/user/123` **is not** normalized
- * - `/my/app/user/123/` **is not** normalized
- *
- * ### Example
- *
- * <code-example path='common/location/ts/path_location_component.ts'
- * region='LocationComponent'></code-example>
- *
- * @publicApi
- */
- export declare class Location {
- constructor(platformStrategy: LocationStrategy, platformLocation: PlatformLocation);
- /**
- * Returns the normalized URL path.
- *
- * @param includeHash Whether path has an anchor fragment.
- *
- * @returns The normalized URL path.
- */
- path(includeHash?: boolean): string;
- /**
- * Returns the current value of the history.state object.
- */
- getState(): unknown;
- /**
- * Normalizes the given path and compares to the current normalized path.
- *
- * @param path The given URL path
- * @param query Query parameters
- *
- * @returns `true` if the given URL path is equal to the current normalized path, `false`
- * otherwise.
- */
- isCurrentPathEqualTo(path: string, query?: string): boolean;
- /**
- * Given a string representing a URL, returns the URL path after stripping the
- * trailing slashes.
- *
- * @param url String representing a URL.
- *
- * @returns Normalized URL string.
- */
- normalize(url: string): string;
- /**
- * Given a string representing a URL, returns the platform-specific external URL path.
- * If the given URL doesn't begin with a leading slash (`'/'`), this method adds one
- * before normalizing. This method also adds a hash if `HashLocationStrategy` is
- * used, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use.
- *
- *
- * @param url String representing a URL.
- *
- * @returns A normalized platform-specific URL.
- */
- prepareExternalUrl(url: string): string;
- /**
- * Changes the browsers URL to a normalized version of the given URL, and pushes a
- * new item onto the platform's history.
- *
- * @param path URL path to normalizze
- * @param query Query parameters
- * @param state Location history state
- *
- */
- go(path: string, query?: string, state?: any): void;
- /**
- * Changes the browser's URL to a normalized version of the given URL, and replaces
- * the top item on the platform's history stack.
- *
- * @param path URL path to normalizze
- * @param query Query parameters
- * @param state Location history state
- */
- replaceState(path: string, query?: string, state?: any): void;
- /**
- * Navigates forward in the platform's history.
- */
- forward(): void;
- /**
- * Navigates back in the platform's history.
- */
- back(): void;
- /**
- * Register URL change listeners. This API can be used to catch updates performed by the Angular
- * framework. These are not detectible through "popstate" or "hashchange" events.
- */
- onUrlChange(fn: (url: string, state: unknown) => void): void;
- /**
- * Subscribe to the platform's `popState` events.
- *
- * @param value Event that is triggered when the state history changes.
- * @param exception The exception to throw.
- *
- * @returns Subscribed events.
- */
- subscribe(onNext: (value: PopStateEvent) => void, onThrow?: ((exception: any) => void) | null, onReturn?: (() => void) | null): SubscriptionLike;
- /**
- * Given a string of url parameters, prepend with `?` if needed, otherwise return the
- * parameters as is.
- *
- * @param params String of URL parameters
- *
- * @returns URL parameters prepended with `?` or the parameters as is.
- */
- static normalizeQueryParams(params: string): string;
- /**
- * Given 2 parts of a URL, join them with a slash if needed.
- *
- * @param start URL string
- * @param end URL string
- *
- *
- * @returns Given URL strings joined with a slash, if needed.
- */
- static joinWithSlash(start: string, end: string): string;
- /**
- * If URL has a trailing slash, remove it, otherwise return the URL as is. The
- * method looks for the first occurrence of either `#`, `?`, or the end of the
- * line as `/` characters and removes the trailing slash if one exists.
- *
- * @param url URL string
- *
- * @returns Returns a URL string after removing the trailing slash if one exists, otherwise
- * returns the string as is.
- */
- static stripTrailingSlash(url: string): string;
- }
- /**
- * @description
- * Indicates when a location is initialized.
- *
- * @publicApi
- */
- export declare const LOCATION_INITIALIZED: InjectionToken<Promise<any>>;
- /**
- * @description
- * A serializable version of the event from `onPopState` or `onHashChange`
- *
- * @publicApi
- */
- export declare interface LocationChangeEvent {
- type: string;
- state: any;
- }
- /**
- * @publicApi
- */
- export declare interface LocationChangeListener {
- (event: LocationChangeEvent): any;
- }
- /**
- * Enables the `Location` service to read route state from the browser's URL.
- * Angular provides two strategies:
- * `HashLocationStrategy` and `PathLocationStrategy`.
- *
- * Applications should use the `Router` or `Location` services to
- * interact with application route state.
- *
- * For instance, `HashLocationStrategy` produces URLs like
- * <code class="no-auto-link">http://example.com#/foo</code>,
- * and `PathLocationStrategy` produces
- * <code class="no-auto-link">http://example.com/foo</code> as an equivalent URL.
- *
- * See these two classes for more.
- *
- * @publicApi
- */
- export declare abstract class LocationStrategy {
- abstract path(includeHash?: boolean): string;
- abstract prepareExternalUrl(internal: string): string;
- abstract pushState(state: any, title: string, url: string, queryParams: string): void;
- abstract replaceState(state: any, title: string, url: string, queryParams: string): void;
- abstract forward(): void;
- abstract back(): void;
- abstract onPopState(fn: LocationChangeListener): void;
- abstract getBaseHref(): string;
- }
- /**
- * Transforms text to all lower case.
- *
- * @see `UpperCasePipe`
- * @see `TitleCasePipe`
- * @usageNotes
- *
- * The following example defines a view that allows the user to enter
- * text, and then uses the pipe to convert the input text to all lower case.
- *
- * <code-example path="common/pipes/ts/lowerupper_pipe.ts" region='LowerUpperPipe'></code-example>
- *
- * @ngModule CommonModule
- * @publicApi
- */
- export declare class LowerCasePipe implements PipeTransform {
- /**
- * @param value The string to transform to lower case.
- */
- transform(value: string): string;
- }
- /**
- * @ngModule CommonModule
- *
- * @usageNotes
- * ```
- * <some-element [ngClass]="'first second'">...</some-element>
- *
- * <some-element [ngClass]="['first', 'second']">...</some-element>
- *
- * <some-element [ngClass]="{'first': true, 'second': true, 'third': false}">...</some-element>
- *
- * <some-element [ngClass]="stringExp|arrayExp|objExp">...</some-element>
- *
- * <some-element [ngClass]="{'class1 class2 class3' : true}">...</some-element>
- * ```
- *
- * @description
- *
- * Adds and removes CSS classes on an HTML element.
- *
- * The CSS classes are updated as follows, depending on the type of the expression evaluation:
- * - `string` - the CSS classes listed in the string (space delimited) are added,
- * - `Array` - the CSS classes declared as Array elements are added,
- * - `Object` - keys are CSS classes that get added when the expression given in the value
- * evaluates to a truthy value, otherwise they are removed.
- *
- * @publicApi
- */
- export declare class NgClass extends NgClassBase implements DoCheck {
- constructor(delegate: ɵNgClassImpl);
- klass: string;
- ngClass: string | string[] | Set<string> | {
- [klass: string]: any;
- };
- ngDoCheck(): void;
- }
- /**
- * Serves as the base non-VE container for NgClass.
- *
- * While this is a base class that NgClass extends from, the
- * class itself acts as a container for non-VE code to setup
- * a link to the `[class]` host binding (via the static
- * `ngDirectiveDef` property on the class).
- *
- * Note that the `ngDirectiveDef` property's code is switched
- * depending if VE is present or not (this allows for the
- * binding code to be set only for newer versions of Angular).
- *
- * @publicApi
- */
- export declare class NgClassBase {
- protected _delegate: ɵNgClassImpl;
- static ngDirectiveDef: any;
- constructor(_delegate: ɵNgClassImpl);
- getValue(): {
- [key: string]: any;
- } | null;
- }
- /**
- * Instantiates a single {@link Component} type and inserts its Host View into current View.
- * `NgComponentOutlet` provides a declarative approach for dynamic component creation.
- *
- * `NgComponentOutlet` requires a component type, if a falsy value is set the view will clear and
- * any existing component will get destroyed.
- *
- * @usageNotes
- *
- * ### Fine tune control
- *
- * You can control the component creation process by using the following optional attributes:
- *
- * * `ngComponentOutletInjector`: Optional custom {@link Injector} that will be used as parent for
- * the Component. Defaults to the injector of the current view container.
- *
- * * `ngComponentOutletContent`: Optional list of projectable nodes to insert into the content
- * section of the component, if exists.
- *
- * * `ngComponentOutletNgModuleFactory`: Optional module factory to allow dynamically loading other
- * module, then load a component from that module.
- *
- * ### Syntax
- *
- * Simple
- * ```
- * <ng-container *ngComponentOutlet="componentTypeExpression"></ng-container>
- * ```
- *
- * Customized injector/content
- * ```
- * <ng-container *ngComponentOutlet="componentTypeExpression;
- * injector: injectorExpression;
- * content: contentNodesExpression;">
- * </ng-container>
- * ```
- *
- * Customized ngModuleFactory
- * ```
- * <ng-container *ngComponentOutlet="componentTypeExpression;
- * ngModuleFactory: moduleFactory;">
- * </ng-container>
- * ```
- *
- * ### A simple example
- *
- * {@example common/ngComponentOutlet/ts/module.ts region='SimpleExample'}
- *
- * A more complete example with additional options:
- *
- * {@example common/ngComponentOutlet/ts/module.ts region='CompleteExample'}
- *
- * @publicApi
- * @ngModule CommonModule
- */
- export declare class NgComponentOutlet implements OnChanges, OnDestroy {
- private _viewContainerRef;
- ngComponentOutlet: Type<any>;
- ngComponentOutletInjector: Injector;
- ngComponentOutletContent: any[][];
- ngComponentOutletNgModuleFactory: NgModuleFactory<any>;
- private _componentRef;
- private _moduleRef;
- constructor(_viewContainerRef: ViewContainerRef);
- ngOnChanges(changes: SimpleChanges): void;
- ngOnDestroy(): void;
- }
- /**
- * A [structural directive](guide/structural-directives) that renders
- * a template for each item in a collection.
- * The directive is placed on an element, which becomes the parent
- * of the cloned templates.
- *
- * The `ngForOf` directive is generally used in the
- * [shorthand form](guide/structural-directives#the-asterisk--prefix) `*ngFor`.
- * In this form, the template to be rendered for each iteration is the content
- * of an anchor element containing the directive.
- *
- * The following example shows the shorthand syntax with some options,
- * contained in an `<li>` element.
- *
- * ```
- * <li *ngFor="let item of items; index as i; trackBy: trackByFn">...</li>
- * ```
- *
- * The shorthand form expands into a long form that uses the `ngForOf` selector
- * on an `<ng-template>` element.
- * The content of the `<ng-template>` element is the `<li>` element that held the
- * short-form directive.
- *
- * Here is the expanded version of the short-form example.
- *
- * ```
- * <ng-template ngFor let-item [ngForOf]="items" let-i="index" [ngForTrackBy]="trackByFn">
- * <li>...</li>
- * </ng-template>
- * ```
- *
- * Angular automatically expands the shorthand syntax as it compiles the template.
- * The context for each embedded view is logically merged to the current component
- * context according to its lexical position.
- *
- * When using the shorthand syntax, Angular allows only [one structural directive
- * on an element](guide/structural-directives#one-structural-directive-per-host-element).
- * If you want to iterate conditionally, for example,
- * put the `*ngIf` on a container element that wraps the `*ngFor` element.
- * For futher discussion, see
- * [Structural Directives](guide/structural-directives#one-per-element).
- *
- * @usageNotes
- *
- * ### Local variables
- *
- * `NgForOf` provides exported values that can be aliased to local variables.
- * For example:
- *
- * ```
- * <li *ngFor="let user of userObservable | async as users; index as i; first as isFirst">
- * {{i}}/{{users.length}}. {{user}} <span *ngIf="isFirst">default</span>
- * </li>
- * ```
- *
- * The following exported values can be aliased to local variables:
- *
- * - `$implicit: T`: The value of the individual items in the iterable (`ngForOf`).
- * - `ngForOf: NgIterable<T>`: The value of the iterable expression. Useful when the expression is
- * more complex then a property access, for example when using the async pipe (`userStreams |
- * async`).
- * - `index: number`: The index of the current item in the iterable.
- * - `first: boolean`: True when the item is the first item in the iterable.
- * - `last: boolean`: True when the item is the last item in the iterable.
- * - `even: boolean`: True when the item has an even index in the iterable.
- * - `odd: boolean`: True when the item has an odd index in the iterable.
- *
- * ### Change propagation
- *
- * When the contents of the iterator changes, `NgForOf` makes the corresponding changes to the DOM:
- *
- * * When an item is added, a new instance of the template is added to the DOM.
- * * When an item is removed, its template instance is removed from the DOM.
- * * When items are reordered, their respective templates are reordered in the DOM.
- *
- * Angular uses object identity to track insertions and deletions within the iterator and reproduce
- * those changes in the DOM. This has important implications for animations and any stateful
- * controls that are present, such as `<input>` elements that accept user input. Inserted rows can
- * be animated in, deleted rows can be animated out, and unchanged rows retain any unsaved state
- * such as user input.
- * For more on animations, see [Transitions and Triggers](guide/transition-and-triggers).
- *
- * The identities of elements in the iterator can change while the data does not.
- * This can happen, for example, if the iterator is produced from an RPC to the server, and that
- * RPC is re-run. Even if the data hasn't changed, the second response produces objects with
- * different identities, and Angular must tear down the entire DOM and rebuild it (as if all old
- * elements were deleted and all new elements inserted).
- *
- * To avoid this expensive operation, you can customize the default tracking algorithm.
- * by supplying the `trackBy` option to `NgForOf`.
- * `trackBy` takes a function that has two arguments: `index` and `item`.
- * If `trackBy` is given, Angular tracks changes by the return value of the function.
- *
- * @see [Structural Directives](guide/structural-directives)
- * @ngModule CommonModule
- * @publicApi
- */
- export declare class NgForOf<T> implements DoCheck {
- private _viewContainer;
- private _template;
- private _differs;
- /**
- * The value of the iterable expression, which can be used as a
- * [template input variable](guide/structural-directives#template-input-variable).
- */
- ngForOf: NgIterable<T>;
- /**
- * A function that defines how to track changes for items in the iterable.
- *
- * When items are added, moved, or removed in the iterable,
- * the directive must re-render the appropriate DOM nodes.
- * To minimize churn in the DOM, only nodes that have changed
- * are re-rendered.
- *
- * By default, the change detector assumes that
- * the object instance identifies the node in the iterable.
- * When this function is supplied, the directive uses
- * the result of calling this function to identify the item node,
- * rather than the identity of the object itself.
- *
- * The function receives two inputs,
- * the iteration index and the node object ID.
- */
- ngForTrackBy: TrackByFunction<T>;
- private _ngForOf;
- private _ngForOfDirty;
- private _differ;
- private _trackByFn;
- constructor(_viewContainer: ViewContainerRef, _template: TemplateRef<NgForOfContext<T>>, _differs: IterableDiffers);
- /**
- * A reference to the template that is stamped out for each item in the iterable.
- * @see [template reference variable](guide/template-syntax#template-reference-variables--var-)
- */
- ngForTemplate: TemplateRef<NgForOfContext<T>>;
- /**
- * Applies the changes when needed.
- */
- ngDoCheck(): void;
- private _applyChanges;
- private _perViewChange;
- /**
- * Asserts the correct type of the context for the template that `NgForOf` will render.
- *
- * The presence of this method is a signal to the Ivy template type-check compiler that the
- * `NgForOf` structural directive renders its template with a specific context type.
- */
- static ngTemplateContextGuard<T>(dir: NgForOf<T>, ctx: any): ctx is NgForOfContext<T>;
- }
- /**
- * @publicApi
- */
- export declare class NgForOfContext<T> {
- $implicit: T;
- ngForOf: NgIterable<T>;
- index: number;
- count: number;
- constructor($implicit: T, ngForOf: NgIterable<T>, index: number, count: number);
- readonly first: boolean;
- readonly last: boolean;
- readonly even: boolean;
- readonly odd: boolean;
- }
- /**
- * A structural directive that conditionally includes a template based on the value of
- * an expression coerced to Boolean.
- * When the expression evaluates to true, Angular renders the template
- * provided in a `then` clause, and when false or null,
- * Angular renders the template provided in an optional `else` clause. The default
- * template for the `else` clause is blank.
- *
- * A [shorthand form](guide/structural-directives#the-asterisk--prefix) of the directive,
- * `*ngIf="condition"`, is generally used, provided
- * as an attribute of the anchor element for the inserted template.
- * Angular expands this into a more explicit version, in which the anchor element
- * is contained in an `<ng-template>` element.
- *
- * Simple form with shorthand syntax:
- *
- * ```
- * <div *ngIf="condition">Content to render when condition is true.</div>
- * ```
- *
- * Simple form with expanded syntax:
- *
- * ```
- * <ng-template [ngIf]="condition"><div>Content to render when condition is
- * true.</div></ng-template>
- * ```
- *
- * Form with an "else" block:
- *
- * ```
- * <div *ngIf="condition; else elseBlock">Content to render when condition is true.</div>
- * <ng-template #elseBlock>Content to render when condition is false.</ng-template>
- * ```
- *
- * Shorthand form with "then" and "else" blocks:
- *
- * ```
- * <div *ngIf="condition; then thenBlock else elseBlock"></div>
- * <ng-template #thenBlock>Content to render when condition is true.</ng-template>
- * <ng-template #elseBlock>Content to render when condition is false.</ng-template>
- * ```
- *
- * Form with storing the value locally:
- *
- * ```
- * <div *ngIf="condition as value; else elseBlock">{{value}}</div>
- * <ng-template #elseBlock>Content to render when value is null.</ng-template>
- * ```
- *
- * @usageNotes
- *
- * The `*ngIf` directive is most commonly used to conditionally show an inline template,
- * as seen in the following example.
- * The default `else` template is blank.
- *
- * {@example common/ngIf/ts/module.ts region='NgIfSimple'}
- *
- * ### Showing an alternative template using `else`
- *
- * To display a template when `expression` evaluates to false, use an `else` template
- * binding as shown in the following example.
- * The `else` binding points to an `<ng-template>` element labeled `#elseBlock`.
- * The template can be defined anywhere in the component view, but is typically placed right after
- * `ngIf` for readability.
- *
- * {@example common/ngIf/ts/module.ts region='NgIfElse'}
- *
- * ### Using an external `then` template
- *
- * In the previous example, the then-clause template is specified inline, as the content of the
- * tag that contains the `ngIf` directive. You can also specify a template that is defined
- * externally, by referencing a labeled `<ng-template>` element. When you do this, you can
- * change which template to use at runtime, as shown in the following example.
- *
- * {@example common/ngIf/ts/module.ts region='NgIfThenElse'}
- *
- * ### Storing a conditional result in a variable
- *
- * You might want to show a set of properties from the same object. If you are waiting
- * for asynchronous data, the object can be undefined.
- * In this case, you can use `ngIf` and store the result of the condition in a local
- * variable as shown in the the following example.
- *
- * {@example common/ngIf/ts/module.ts region='NgIfAs'}
- *
- * This code uses only one `AsyncPipe`, so only one subscription is created.
- * The conditional statement stores the result of `userStream|async` in the local variable `user`.
- * You can then bind the local `user` repeatedly.
- *
- * The conditional displays the data only if `userStream` returns a value,
- * so you don't need to use the
- * [safe-navigation-operator](guide/template-syntax#safe-navigation-operator) (`?.`)
- * to guard against null values when accessing properties.
- * You can display an alternative template while waiting for the data.
- *
- * ### Shorthand syntax
- *
- * The shorthand syntax `*ngIf` expands into two separate template specifications
- * for the "then" and "else" clauses. For example, consider the following shorthand statement,
- * that is meant to show a loading page while waiting for data to be loaded.
- *
- * ```
- * <div class="hero-list" *ngIf="heroes else loading">
- * ...
- * </div>
- *
- * <ng-template #loading>
- * <div>Loading...</div>
- * </ng-template>
- * ```
- *
- * You can see that the "else" clause references the `<ng-template>`
- * with the `#loading` label, and the template for the "then" clause
- * is provided as the content of the anchor element.
- *
- * However, when Angular expands the shorthand syntax, it creates
- * another `<ng-template>` tag, with `ngIf` and `ngIfElse` directives.
- * The anchor element containing the template for the "then" clause becomes
- * the content of this unlabeled `<ng-template>` tag.
- *
- * ```
- * <ng-template [ngIf]="hero-list" [ngIfElse]="loading">
- * <div class="hero-list">
- * ...
- * </div>
- * </ng-template>
- *
- * <ng-template #loading>
- * <div>Loading...</div>
- * </ng-template>
- * ```
- *
- * The presence of the implicit template object has implications for the nesting of
- * structural directives. For more on this subject, see
- * [Structural Directives](https://angular.io/guide/structural-directives#one-per-element).
- *
- * @ngModule CommonModule
- * @publicApi
- */
- export declare class NgIf {
- private _viewContainer;
- private _context;
- private _thenTemplateRef;
- private _elseTemplateRef;
- private _thenViewRef;
- private _elseViewRef;
- constructor(_viewContainer: ViewContainerRef, templateRef: TemplateRef<NgIfContext>);
- /**
- * The Boolean expression to evaluate as the condition for showing a template.
- */
- ngIf: any;
- /**
- * A template to show if the condition expression evaluates to true.
- */
- ngIfThen: TemplateRef<NgIfContext> | null;
- /**
- * A template to show if the condition expression evaluates to false.
- */
- ngIfElse: TemplateRef<NgIfContext> | null;
- private _updateView;
- /**
- * Assert the correct type of the expression bound to the `ngIf` input within the template.
- *
- * The presence of this static field is a signal to the Ivy template type check compiler that
- * when the `NgIf` structural directive renders its template, the type of the expression bound
- * to `ngIf` should be narrowed in some way. For `NgIf`, the binding expression itself is used to
- * narrow its type, which allows the strictNullChecks feature of TypeScript to work with `NgIf`.
- */
- static ngTemplateGuard_ngIf: 'binding';
- }
- /**
- * @publicApi
- */
- export declare class NgIfContext {
- $implicit: any;
- ngIf: any;
- }
- /**
- * Returns the plural case based on the locale
- *
- * @publicApi
- */
- export declare class NgLocaleLocalization extends NgLocalization {
- protected locale: string;
- /** @deprecated from v5 */
- protected deprecatedPluralFn?: ((locale: string, value: string | number) => Plural) | null | undefined;
- constructor(locale: string,
- /** @deprecated from v5 */
- deprecatedPluralFn?: ((locale: string, value: string | number) => Plural) | null | undefined);
- getPluralCategory(value: any, locale?: string): string;
- }
- /**
- * @publicApi
- */
- export declare abstract class NgLocalization {
- abstract getPluralCategory(value: any, locale?: string): string;
- }
- /**
- * @ngModule CommonModule
- *
- * @usageNotes
- * ```
- * <some-element [ngPlural]="value">
- * <ng-template ngPluralCase="=0">there is nothing</ng-template>
- * <ng-template ngPluralCase="=1">there is one</ng-template>
- * <ng-template ngPluralCase="few">there are a few</ng-template>
- * </some-element>
- * ```
- *
- * @description
- *
- * Adds / removes DOM sub-trees based on a numeric value. Tailored for pluralization.
- *
- * Displays DOM sub-trees that match the switch expression value, or failing that, DOM sub-trees
- * that match the switch expression's pluralization category.
- *
- * To use this directive you must provide a container element that sets the `[ngPlural]` attribute
- * to a switch expression. Inner elements with a `[ngPluralCase]` will display based on their
- * expression:
- * - if `[ngPluralCase]` is set to a value starting with `=`, it will only display if the value
- * matches the switch expression exactly,
- * - otherwise, the view will be treated as a "category match", and will only display if exact
- * value matches aren't found and the value maps to its category for the defined locale.
- *
- * See http://cldr.unicode.org/index/cldr-spec/plural-rules
- *
- * @publicApi
- */
- export declare class NgPlural {
- private _localization;
- private _switchValue;
- private _activeView;
- private _caseViews;
- constructor(_localization: NgLocalization);
- ngPlural: number;
- addCase(value: string, switchView: SwitchView): void;
- private _updateView;
- private _clearViews;
- private _activateView;
- }
- /**
- * @ngModule CommonModule
- *
- * @description
- *
- * Creates a view that will be added/removed from the parent {@link NgPlural} when the
- * given expression matches the plural expression according to CLDR rules.
- *
- * @usageNotes
- * ```
- * <some-element [ngPlural]="value">
- * <ng-template ngPluralCase="=0">...</ng-template>
- * <ng-template ngPluralCase="other">...</ng-template>
- * </some-element>
- *```
- *
- * See {@link NgPlural} for more details and example.
- *
- * @publicApi
- */
- export declare class NgPluralCase {
- value: string;
- constructor(value: string, template: TemplateRef<Object>, viewContainer: ViewContainerRef, ngPlural: NgPlural);
- }
- /**
- * @ngModule CommonModule
- *
- * @usageNotes
- *
- * Set the font of the containing element to the result of an expression.
- *
- * ```
- * <some-element [ngStyle]="{'font-style': styleExp}">...</some-element>
- * ```
- *
- * Set the width of the containing element to a pixel value returned by an expression.
- *
- * ```
- * <some-element [ngStyle]="{'max-width.px': widthExp}">...</some-element>
- * ```
- *
- * Set a collection of style values using an expression that returns key-value pairs.
- *
- * ```
- * <some-element [ngStyle]="objExp">...</some-element>
- * ```
- *
- * @description
- *
- * An attribute directive that updates styles for the containing HTML element.
- * Sets one or more style properties, specified as colon-separated key-value pairs.
- * The key is a style name, with an optional `.<unit>` suffix
- * (such as 'top.px', 'font-style.em').
- * The value is an expression to be evaluated.
- * The resulting non-null value, expressed in the given unit,
- * is assigned to the given style property.
- * If the result of evaluation is null, the corresponding style is removed.
- *
- * @publicApi
- */
- export declare class NgStyle extends NgStyleBase implements DoCheck {
- constructor(delegate: ɵNgStyleImpl);
- ngStyle: {
- [klass: string]: any;
- } | null;
- ngDoCheck(): void;
- }
- /**
- * Serves as the base non-VE container for NgStyle.
- *
- * While this is a base class that NgStyle extends from, the
- * class itself acts as a container for non-VE code to setup
- * a link to the `[style]` host binding (via the static
- * `ngDirectiveDef` property on the class).
- *
- * Note that the `ngDirectiveDef` property's code is switched
- * depending if VE is present or not (this allows for the
- * binding code to be set only for newer versions of Angular).
- *
- * @publicApi
- */
- export declare class NgStyleBase {
- protected _delegate: ɵNgStyleImpl;
- static ngDirectiveDef: any;
- constructor(_delegate: ɵNgStyleImpl);
- getValue(): {
- [key: string]: any;
- } | null;
- }
- /**
- * @ngModule CommonModule
- *
- * @description A structural directive that adds or removes templates (displaying or hiding views)
- * when the next match expression matches the switch expression.
- *
- * The `[ngSwitch]` directive on a container specifies an expression to match against.
- * The expressions to match are provided by `ngSwitchCase` directives on views within the container.
- * - Every view that matches is rendered.
- * - If there are no matches, a view with the `ngSwitchDefault` directive is rendered.
- * - Elements within the `[NgSwitch]` statement but outside of any `NgSwitchCase`
- * or `ngSwitchDefault` directive are preserved at the location.
- *
- * @usageNotes
- * Define a container element for the directive, and specify the switch expression
- * to match against as an attribute:
- *
- * ```
- * <container-element [ngSwitch]="switch_expression">
- * ```
- *
- * Within the container, `*ngSwitchCase` statements specify the match expressions
- * as attributes. Include `*ngSwitchDefault` as the final case.
- *
- * ```
- * <container-element [ngSwitch]="switch_expression">
- * <some-element *ngSwitchCase="match_expression_1">...</some-element>
- * ...
- * <some-element *ngSwitchDefault>...</some-element>
- * </container-element>
- * ```
- *
- * ### Usage Examples
- *
- * The following example shows how to use more than one case to display the same view:
- *
- * ```
- * <container-element [ngSwitch]="switch_expression">
- * <!-- the same view can be shown in more than one case -->
- * <some-element *ngSwitchCase="match_expression_1">...</some-element>
- * <some-element *ngSwitchCase="match_expression_2">...</some-element>
- * <some-other-element *ngSwitchCase="match_expression_3">...</some-other-element>
- * <!--default case when there are no matches -->
- * <some-element *ngSwitchDefault>...</some-element>
- * </container-element>
- * ```
- *
- * The following example shows how cases can be nested:
- * ```
- * <container-element [ngSwitch]="switch_expression">
- * <some-element *ngSwitchCase="match_expression_1">...</some-element>
- * <some-element *ngSwitchCase="match_expression_2">...</some-element>
- * <some-other-element *ngSwitchCase="match_expression_3">...</some-other-element>
- * <ng-container *ngSwitchCase="match_expression_3">
- * <!-- use a ng-container to group multiple root nodes -->
- * <inner-element></inner-element>
- * <inner-other-element></inner-other-element>
- * </ng-container>
- * <some-element *ngSwitchDefault>...</some-element>
- * </container-element>
- * ```
- *
- * @publicApi
- * @see `NgSwitchCase`
- * @see `NgSwitchDefault`
- * @see [Structural Directives](guide/structural-directives)
- *
- */
- export declare class NgSwitch {
- private _defaultViews;
- private _defaultUsed;
- private _caseCount;
- private _lastCaseCheckIndex;
- private _lastCasesMatched;
- private _ngSwitch;
- ngSwitch: any;
- private _updateDefaultCases;
- }
- /**
- * @ngModule CommonModule
- *
- * @description
- * Provides a switch case expression to match against an enclosing `ngSwitch` expression.
- * When the expressions match, the given `NgSwitchCase` template is rendered.
- * If multiple match expressions match the switch expression value, all of them are displayed.
- *
- * @usageNotes
- *
- * Within a switch container, `*ngSwitchCase` statements specify the match expressions
- * as attributes. Include `*ngSwitchDefault` as the final case.
- *
- * ```
- * <container-element [ngSwitch]="switch_expression">
- * <some-element *ngSwitchCase="match_expression_1">...</some-element>
- * ...
- * <some-element *ngSwitchDefault>...</some-element>
- * </container-element>
- * ```
- *
- * Each switch-case statement contains an in-line HTML template or template reference
- * that defines the subtree to be selected if the value of the match expression
- * matches the value of the switch expression.
- *
- * Unlike JavaScript, which uses strict equality, Angular uses loose equality.
- * This means that the empty string, `""` matches 0.
- *
- * @publicApi
- * @see `NgSwitch`
- * @see `NgSwitchDefault`
- *
- */
- export declare class NgSwitchCase implements DoCheck {
- private ngSwitch;
- private _view;
- /**
- * Stores the HTML template to be selected on match.
- */
- ngSwitchCase: any;
- constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<Object>, ngSwitch: NgSwitch);
- /**
- * Performs case matching. For internal use only.
- */
- ngDoCheck(): void;
- }
- /**
- * @ngModule CommonModule
- *
- * @description
- *
- * Creates a view that is rendered when no `NgSwitchCase` expressions
- * match the `NgSwitch` expression.
- * This statement should be the final case in an `NgSwitch`.
- *
- * @publicApi
- * @see `NgSwitch`
- * @see `NgSwitchCase`
- *
- */
- export declare class NgSwitchDefault {
- constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<Object>, ngSwitch: NgSwitch);
- }
- /**
- * @ngModule CommonModule
- *
- * @description
- *
- * Inserts an embedded view from a prepared `TemplateRef`.
- *
- * You can attach a context object to the `EmbeddedViewRef` by setting `[ngTemplateOutletContext]`.
- * `[ngTemplateOutletContext]` should be an object, the object's keys will be available for binding
- * by the local template `let` declarations.
- *
- * @usageNotes
- * ```
- * <ng-container *ngTemplateOutlet="templateRefExp; context: contextExp"></ng-container>
- * ```
- *
- * Using the key `$implicit` in the context object will set its value as default.
- *
- * ### Example
- *
- * {@example common/ngTemplateOutlet/ts/module.ts region='NgTemplateOutlet'}
- *
- * @publicApi
- */
- export declare class NgTemplateOutlet implements OnChanges {
- private _viewContainerRef;
- private _viewRef;
- /**
- * A context object to attach to the {@link EmbeddedViewRef}. This should be an
- * object, the object's keys will be available for binding by the local template `let`
- * declarations.
- * Using the key `$implicit` in the context object will set its value as default.
- */
- ngTemplateOutletContext: Object | null;
- /**
- * A string defining the template reference and optionally the context object for the template.
- */
- ngTemplateOutlet: TemplateRef<any> | null;
- constructor(_viewContainerRef: ViewContainerRef);
- ngOnChanges(changes: SimpleChanges): void;
- /**
- * We need to re-create existing embedded view if:
- * - templateRef has changed
- * - context has changes
- *
- * We mark context object as changed when the corresponding object
- * shape changes (new properties are added or existing properties are removed).
- * In other words we consider context with the same properties as "the same" even
- * if object reference changes (see https://github.com/angular/angular/issues/13407).
- */
- private _shouldRecreateView;
- private _hasContextShapeChanged;
- private _updateExistingContext;
- }
- /**
- * Format styles that can be used to represent numbers.
- * @see `getLocaleNumberFormat()`.
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare enum NumberFormatStyle {
- Decimal = 0,
- Percent = 1,
- Currency = 2,
- Scientific = 3
- }
- /**
- * Symbols that can be used to replace placeholders in number patterns.
- * Examples are based on `en-US` values.
- *
- * @see `getLocaleNumberSymbol()`
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare enum NumberSymbol {
- /**
- * Decimal separator.
- * For `en-US`, the dot character.
- * Example : 2,345`.`67
- */
- Decimal = 0,
- /**
- * Grouping separator, typically for thousands.
- * For `en-US`, the comma character.
- * Example: 2`,`345.67
- */
- Group = 1,
- /**
- * List-item separator.
- * Example: "one, two, and three"
- */
- List = 2,
- /**
- * Sign for percentage (out of 100).
- * Example: 23.4%
- */
- PercentSign = 3,
- /**
- * Sign for positive numbers.
- * Example: +23
- */
- PlusSign = 4,
- /**
- * Sign for negative numbers.
- * Example: -23
- */
- MinusSign = 5,
- /**
- * Computer notation for exponential value (n times a power of 10).
- * Example: 1.2E3
- */
- Exponential = 6,
- /**
- * Human-readable format of exponential.
- * Example: 1.2x103
- */
- SuperscriptingExponent = 7,
- /**
- * Sign for permille (out of 1000).
- * Example: 23.4‰
- */
- PerMille = 8,
- /**
- * Infinity, can be used with plus and minus.
- * Example: ∞, +∞, -∞
- */
- Infinity = 9,
- /**
- * Not a number.
- * Example: NaN
- */
- NaN = 10,
- /**
- * Symbol used between time units.
- * Example: 10:52
- */
- TimeSeparator = 11,
- /**
- * Decimal separator for currency values (fallback to `Decimal`).
- * Example: $2,345.67
- */
- CurrencyDecimal = 12,
- /**
- * Group separator for currency values (fallback to `Group`).
- * Example: $2,345.67
- */
- CurrencyGroup = 13
- }
- /**
- * @description
- * A {@link LocationStrategy} used to configure the {@link Location} service to
- * represent its state in the
- * [path](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) of the
- * browser's URL.
- *
- * If you're using `PathLocationStrategy`, you must provide a {@link APP_BASE_HREF}
- * or add a base element to the document. This URL prefix that will be preserved
- * when generating and recognizing URLs.
- *
- * For instance, if you provide an `APP_BASE_HREF` of `'/my/app'` and call
- * `location.go('/foo')`, the browser's URL will become
- * `example.com/my/app/foo`.
- *
- * Similarly, if you add `<base href='/my/app'/>` to the document and call
- * `location.go('/foo')`, the browser's URL will become
- * `example.com/my/app/foo`.
- *
- * @usageNotes
- *
- * ### Example
- *
- * {@example common/location/ts/path_location_component.ts region='LocationComponent'}
- *
- * @publicApi
- */
- export declare class PathLocationStrategy extends LocationStrategy {
- private _platformLocation;
- private _baseHref;
- constructor(_platformLocation: PlatformLocation, href?: string);
- onPopState(fn: LocationChangeListener): void;
- getBaseHref(): string;
- prepareExternalUrl(internal: string): string;
- path(includeHash?: boolean): string;
- pushState(state: any, title: string, url: string, queryParams: string): void;
- replaceState(state: any, title: string, url: string, queryParams: string): void;
- forward(): void;
- back(): void;
- }
- /**
- * @ngModule CommonModule
- * @description
- *
- * Transforms a number to a percentage
- * string, formatted according to locale rules that determine group sizing and
- * separator, decimal-point character, and other locale-specific
- * configurations.
- *
- * @see `formatPercent()`
- *
- * @usageNotes
- * The following code shows how the pipe transforms numbers
- * into text strings, according to various format specifications,
- * where the caller's default locale is `en-US`.
- *
- * <code-example path="common/pipes/ts/percent_pipe.ts" region='PercentPipe'></code-example>
- *
- * @publicApi
- */
- export declare class PercentPipe implements PipeTransform {
- private _locale;
- constructor(_locale: string);
- /**
- *
- * @param value The number to be formatted as a percentage.
- * @param digitsInfo Decimal representation options, specified by a string
- * in the following format:<br>
- * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.
- * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.
- * Default is `1`.
- * - `minFractionDigits`: The minimum number of digits after the decimal point.
- * Default is `0`.
- * - `maxFractionDigits`: The maximum number of digits after the decimal point.
- * Default is `0`.
- * @param locale A locale code for the locale format rules to use.
- * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.
- * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).
- */
- transform(value: any, digitsInfo?: string, locale?: string): string | null;
- }
- /**
- * This class should not be used directly by an application developer. Instead, use
- * {@link Location}.
- *
- * `PlatformLocation` encapsulates all calls to DOM apis, which allows the Router to be platform
- * agnostic.
- * This means that we can have different implementation of `PlatformLocation` for the different
- * platforms that angular supports. For example, `@angular/platform-browser` provides an
- * implementation specific to the browser environment, while `@angular/platform-webworker` provides
- * one suitable for use with web workers.
- *
- * The `PlatformLocation` class is used directly by all implementations of {@link LocationStrategy}
- * when they need to interact with the DOM apis like pushState, popState, etc...
- *
- * {@link LocationStrategy} in turn is used by the {@link Location} service which is used directly
- * by the {@link Router} in order to navigate between routes. Since all interactions between {@link
- * Router} /
- * {@link Location} / {@link LocationStrategy} and DOM apis flow through the `PlatformLocation`
- * class they are all platform independent.
- *
- * @publicApi
- */
- export declare abstract class PlatformLocation {
- abstract getBaseHrefFromDOM(): string;
- abstract getState(): unknown;
- abstract onPopState(fn: LocationChangeListener): void;
- abstract onHashChange(fn: LocationChangeListener): void;
- abstract readonly href: string;
- abstract readonly protocol: string;
- abstract readonly hostname: string;
- abstract readonly port: string;
- abstract readonly pathname: string;
- abstract readonly search: string;
- abstract readonly hash: string;
- abstract replaceState(state: any, title: string, url: string): void;
- abstract pushState(state: any, title: string, url: string): void;
- abstract forward(): void;
- abstract back(): void;
- }
- /**
- * Plurality cases used for translating plurals to different languages.
- *
- * @see `NgPlural`
- * @see `NgPluralCase`
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
- *
- * @publicApi
- */
- export declare enum Plural {
- Zero = 0,
- One = 1,
- Two = 2,
- Few = 3,
- Many = 4,
- Other = 5
- }
- /** @publicApi */
- export declare interface PopStateEvent {
- pop?: boolean;
- state?: any;
- type?: string;
- url?: string;
- }
- /**
- * Register global data to be used internally by Angular. See the
- * ["I18n guide"](guide/i18n#i18n-pipes) to know how to import additional locale data.
- *
- * @publicApi
- */
- declare function registerLocaleData(data: any, localeId?: string | any, extraData?: any): void;
- export { registerLocaleData }
- export { registerLocaleData as ɵregisterLocaleData }
- /**
- * @ngModule CommonModule
- * @description
- *
- * Creates a new `Array` or `String` containing a subset (slice) of the elements.
- *
- * @usageNotes
- *
- * All behavior is based on the expected behavior of the JavaScript API `Array.prototype.slice()`
- * and `String.prototype.slice()`.
- *
- * When operating on an `Array`, the returned `Array` is always a copy even when all
- * the elements are being returned.
- *
- * When operating on a blank value, the pipe returns the blank value.
- *
- * ### List Example
- *
- * This `ngFor` example:
- *
- * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_list'}
- *
- * produces the following:
- *
- * ```html
- * <li>b</li>
- * <li>c</li>
- * ```
- *
- * ### String Examples
- *
- * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_string'}
- *
- * @publicApi
- */
- export declare class SlicePipe implements PipeTransform {
- /**
- * @param value a list or a string to be sliced.
- * @param start the starting index of the subset to return:
- * - **a positive integer**: return the item at `start` index and all items after
- * in the list or string expression.
- * - **a negative integer**: return the item at `start` index from the end and all items after
- * in the list or string expression.
- * - **if positive and greater than the size of the expression**: return an empty list or
- * string.
- * - **if negative and greater than the size of the expression**: return entire list or string.
- * @param end the ending index of the subset to return:
- * - **omitted**: return all items until the end.
- * - **if positive**: return all items before `end` index of the list or string.
- * - **if negative**: return all items before `end` index from the end of the list or string.
- */
- transform<T>(value: ReadonlyArray<T>, start: number, end?: number): Array<T>;
- transform(value: string, start: number, end?: number): string;
- transform(value: null, start: number, end?: number): null;
- transform(value: undefined, start: number, end?: number): undefined;
- private supports;
- }
- declare class SwitchView {
- private _viewContainerRef;
- private _templateRef;
- private _created;
- constructor(_viewContainerRef: ViewContainerRef, _templateRef: TemplateRef<Object>);
- create(): void;
- destroy(): void;
- enforceState(created: boolean): void;
- }
- /**
- * Represents a time value with hours and minutes.
- *
- * @publicApi
- */
- export declare type Time = {
- hours: number;
- minutes: number;
- };
- /**
- * Transforms text to title case.
- * Capitalizes the first letter of each word, and transforms the
- * rest of the word to lower case.
- * Words are delimited by any whitespace character, such as a space, tab, or line-feed character.
- *
- * @see `LowerCasePipe`
- * @see `UpperCasePipe`
- *
- * @usageNotes
- * The following example shows the result of transforming various strings into title case.
- *
- * <code-example path="common/pipes/ts/titlecase_pipe.ts" region='TitleCasePipe'></code-example>
- *
- * @ngModule CommonModule
- * @publicApi
- */
- export declare class TitleCasePipe implements PipeTransform {
- /**
- * @param value The string to transform to title case.
- */
- transform(value: string): string;
- }
- /**
- * String widths available for translations.
- * The specific character widths are locale-specific.
- * Examples are given for the word "Sunday" in English.
- *
- * @publicApi
- */
- export declare enum TranslationWidth {
- /** 1 character for `en-US`. For example: 'S' */
- Narrow = 0,
- /** 3 characters for `en-US`. For example: 'Sun' */
- Abbreviated = 1,
- /** Full length for `en-US`. For example: "Sunday" */
- Wide = 2,
- /** 2 characters for `en-US`, For example: "Su" */
- Short = 3
- }
- /**
- * Transforms text to all upper case.
- * @see `LowerCasePipe`
- * @see `TitleCasePipe`
- *
- * @ngModule CommonModule
- * @publicApi
- */
- export declare class UpperCasePipe implements PipeTransform {
- /**
- * @param value The string to transform to upper case.
- */
- transform(value: string): string;
- }
- /**
- * @publicApi
- */
- export declare const VERSION: Version;
- /**
- * Defines a scroll position manager. Implemented by `BrowserViewportScroller`.
- *
- * @publicApi
- */
- export declare abstract class ViewportScroller {
- /** @nocollapse */
- static ngInjectableDef: never;
- /**
- * Configures the top offset used when scrolling to an anchor.
- * @param offset A position in screen coordinates (a tuple with x and y values)
- * or a function that returns the top offset position.
- *
- */
- abstract setOffset(offset: [number, number] | (() => [number, number])): void;
- /**
- * Retrieves the current scroll position.
- * @returns A position in screen coordinates (a tuple with x and y values).
- */
- abstract getScrollPosition(): [number, number];
- /**
- * Scrolls to a specified position.
- * @param position A position in screen coordinates (a tuple with x and y values).
- */
- abstract scrollToPosition(position: [number, number]): void;
- /**
- * Scrolls to an anchor element.
- * @param anchor The ID of the anchor element.
- */
- abstract scrollToAnchor(anchor: string): void;
- /**
- * Disables automatic scroll restoration provided by the browser.
- * See also [window.history.scrollRestoration
- * info](https://developers.google.com/web/updates/2015/09/history-api-scroll-restoration).
- */
- abstract setHistoryScrollRestoration(scrollRestoration: 'auto' | 'manual'): void;
- }
- /**
- * The value for each day of the week, based on the `en-US` locale
- *
- * @publicApi
- */
- export declare enum WeekDay {
- Sunday = 0,
- Monday = 1,
- Tuesday = 2,
- Wednesday = 3,
- Thursday = 4,
- Friday = 5,
- Saturday = 6
- }
- /**
- * @deprecated from v5
- */
- export declare const ɵangular_packages_common_common_a: InjectionToken<boolean>;
- /**
- * Returns the plural case based on the locale
- *
- * @deprecated from v5 the plural case function is in locale data files common/locales/*.ts
- * @publicApi
- */
- export declare function ɵangular_packages_common_common_b(locale: string, nLike: number | string): Plural;
- /**
- * A collection of Angular directives that are likely to be used in each and every Angular
- * application.
- */
- export declare const ɵangular_packages_common_common_c: Provider[];
- /**
- * A collection of Angular pipes that are likely to be used in each and every application.
- */
- export declare const ɵangular_packages_common_common_d: (typeof AsyncPipe | typeof SlicePipe | typeof DecimalPipe | typeof PercentPipe | typeof CurrencyPipe | typeof DatePipe | typeof I18nPluralPipe | typeof I18nSelectPipe | typeof KeyValuePipe)[];
- /**
- * A collection of deprecated i18n pipes that require intl api
- *
- * @deprecated from v5
- */
- export declare const ɵangular_packages_common_common_e: Provider[];
- export declare class ɵangular_packages_common_common_f implements ɵNgClassImpl {
- private _value;
- private _ngClassDiffer;
- private _classStringDiffer;
- getValue(): {
- [key: string]: boolean;
- } | null;
- setClass(value: string): void;
- setNgClass(value: string | string[] | Set<string> | {
- [klass: string]: any;
- }): void;
- applyChanges(): void;
- }
- export declare const ɵangular_packages_common_common_g: {
- provide: typeof ɵNgClassImpl;
- useClass: typeof ɵNgClassR2Impl;
- };
- export declare const ɵangular_packages_common_common_h: {
- provide: typeof ɵNgClassImpl;
- useClass: typeof ɵNgClassR2Impl;
- };
- export declare class ɵangular_packages_common_common_i implements ɵNgStyleImpl {
- private _differ;
- private _value;
- getValue(): {
- [key: string]: any;
- } | null;
- setNgStyle(value: {
- [key: string]: any;
- } | null): void;
- applyChanges(): void;
- }
- export declare const ɵangular_packages_common_common_j: {
- provide: typeof ɵNgStyleImpl;
- useClass: typeof ɵNgStyleR2Impl;
- };
- export declare const ɵangular_packages_common_common_k: {
- provide: typeof ɵNgStyleImpl;
- useClass: typeof ɵNgStyleR2Impl;
- };
- export declare const ɵngClassDirectiveDef__POST_R3__: never;
- /**
- * Used as a token for an injected service within the NgClass directive.
- *
- * NgClass behaves differenly whether or not VE is being used or not. If
- * present then the legacy ngClass diffing algorithm will be used as an
- * injected service. Otherwise the new diffing algorithm (which delegates
- * to the `[class]` binding) will be used. This toggle behavior is done so
- * via the ivy_switch mechanism.
- */
- export declare abstract class ɵNgClassImpl {
- abstract setClass(value: string): void;
- abstract setNgClass(value: string | string[] | Set<string> | {
- [klass: string]: any;
- }): void;
- abstract applyChanges(): void;
- abstract getValue(): {
- [key: string]: any;
- } | null;
- }
- export declare const ɵNgClassImplProvider__POST_R3__: {
- provide: typeof ɵNgClassImpl;
- useClass: typeof ɵangular_packages_common_common_f;
- };
- export declare class ɵNgClassR2Impl implements ɵNgClassImpl {
- private _iterableDiffers;
- private _keyValueDiffers;
- private _ngEl;
- private _renderer;
- private _iterableDiffer;
- private _keyValueDiffer;
- private _initialClasses;
- private _rawClass;
- constructor(_iterableDiffers: IterableDiffers, _keyValueDiffers: KeyValueDiffers, _ngEl: ElementRef, _renderer: Renderer2);
- getValue(): null;
- setClass(value: string): void;
- setNgClass(value: string): void;
- applyChanges(): void;
- private _applyKeyValueChanges;
- private _applyIterableChanges;
- /**
- * Applies a collection of CSS classes to the DOM element.
- *
- * For argument of type Set and Array CSS class names contained in those collections are always
- * added.
- * For argument of type Map CSS class name in the map's key is toggled based on the value (added
- * for truthy and removed for falsy).
- */
- private _applyClasses;
- /**
- * Removes a collection of CSS classes from the DOM element. This is mostly useful for cleanup
- * purposes.
- */
- private _removeClasses;
- private _toggleClass;
- }
- export declare const ɵngStyleDirectiveDef__POST_R3__: never;
- /**
- * Used as a token for an injected service within the NgStyle directive.
- *
- * NgStyle behaves differenly whether or not VE is being used or not. If
- * present then the legacy ngClass diffing algorithm will be used as an
- * injected service. Otherwise the new diffing algorithm (which delegates
- * to the `[style]` binding) will be used. This toggle behavior is done so
- * via the ivy_switch mechanism.
- */
- export declare abstract class ɵNgStyleImpl {
- abstract getValue(): {
- [key: string]: any;
- } | null;
- abstract setNgStyle(value: {
- [key: string]: any;
- } | null): void;
- abstract applyChanges(): void;
- }
- export declare const ɵNgStyleImplProvider__POST_R3__: {
- provide: typeof ɵNgStyleImpl;
- useClass: typeof ɵangular_packages_common_common_i;
- };
- export declare class ɵNgStyleR2Impl implements ɵNgStyleImpl {
- private _ngEl;
- private _differs;
- private _renderer;
- private _ngStyle;
- private _differ;
- constructor(_ngEl: ElementRef, _differs: KeyValueDiffers, _renderer: Renderer2);
- getValue(): null;
- /**
- * A map of style properties, specified as colon-separated
- * key-value pairs.
- * * The key is a style name, with an optional `.<unit>` suffix
- * (such as 'top.px', 'font-style.em').
- * * The value is an expression to be evaluated.
- */
- setNgStyle(values: {
- [key: string]: string;
- }): void;
- /**
- * Applies the new styles if needed.
- */
- applyChanges(): void;
- private _applyChanges;
- private _setStyle;
- }
- /**
- * Provides an empty implementation of the viewport scroller. This will
- * live in @angular/common as it will be used by both platform-server and platform-webworker.
- */
- export declare class ɵNullViewportScroller implements ViewportScroller {
- /**
- * Empty implementation
- */
- setOffset(offset: [number, number] | (() => [number, number])): void;
- /**
- * Empty implementation
- */
- getScrollPosition(): [number, number];
- /**
- * Empty implementation
- */
- scrollToPosition(position: [number, number]): void;
- /**
- * Empty implementation
- */
- scrollToAnchor(anchor: string): void;
- /**
- * Empty implementation
- */
- setHistoryScrollRestoration(scrollRestoration: 'auto' | 'manual'): void;
- }
- export declare function ɵparseCookieValue(cookieStr: string, name: string): string | null;
- export declare const ɵPLATFORM_BROWSER_ID = "browser";
- export declare const ɵPLATFORM_SERVER_ID = "server";
- export declare const ɵPLATFORM_WORKER_APP_ID = "browserWorkerApp";
- export declare const ɵPLATFORM_WORKER_UI_ID = "browserWorkerUi";
- export { }
|