parent
42c331bbf2
commit
0918adf39d
|
@ -20,7 +20,7 @@ import {HttpEvent} from './response';
|
|||
*
|
||||
* In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class HttpHandler {
|
||||
abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
|
||||
|
@ -34,7 +34,7 @@ export abstract class HttpHandler {
|
|||
* When injected, `HttpBackend` dispatches requests directly to the backend, without going
|
||||
* through the interceptor chain.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class HttpBackend implements HttpHandler {
|
||||
abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
|
||||
|
|
|
@ -51,7 +51,7 @@ export type HttpObserve = 'body' | 'events' | 'response';
|
|||
* Each request method has multiple signatures, and the return type varies according to which
|
||||
* signature is called (mainly the values of `observe` and `responseType`).
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Injectable()
|
||||
export class HttpClient {
|
||||
|
|
|
@ -15,6 +15,7 @@ interface Update {
|
|||
/**
|
||||
* Immutable set of Http headers, with lazy parsing.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export class HttpHeaders {
|
||||
/**
|
||||
|
|
|
@ -22,7 +22,7 @@ import {HttpEvent} from './response';
|
|||
* In rare cases, interceptors may wish to completely handle a request themselves,
|
||||
* and not delegate to the remainder of the chain. This behavior is allowed.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface HttpInterceptor {
|
||||
/**
|
||||
|
@ -61,7 +61,7 @@ export class HttpInterceptorHandler implements HttpHandler {
|
|||
* A multi-provider token which represents the array of `HttpInterceptor`s that
|
||||
* are registered.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export const HTTP_INTERCEPTORS = new InjectionToken<HttpInterceptor[]>('HTTP_INTERCEPTORS');
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ export abstract class JsonpCallbackContext { [key: string]: (data: any) => void;
|
|||
* `HttpBackend` that only processes `HttpRequest` with the JSONP method,
|
||||
* by performing JSONP style requests.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Injectable()
|
||||
export class JsonpClientBackend implements HttpBackend {
|
||||
|
@ -206,7 +206,7 @@ export class JsonpClientBackend implements HttpBackend {
|
|||
* An `HttpInterceptor` which identifies requests with the method JSONP and
|
||||
* shifts them to the `JsonpClientBackend`.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Injectable()
|
||||
export class JsonpInterceptor {
|
||||
|
|
|
@ -85,7 +85,7 @@ export function jsonpCallbackContext(): Object {
|
|||
* If no names are supplied, the default cookie name is `XSRF-TOKEN`
|
||||
* and the default header name is `X-XSRF-TOKEN`.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@NgModule({
|
||||
providers: [
|
||||
|
@ -138,7 +138,7 @@ export class HttpClientXsrfModule {
|
|||
* You can add interceptors to the chain behind `HttpClient` by binding them to the
|
||||
* multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@NgModule({
|
||||
/**
|
||||
|
@ -175,7 +175,7 @@ export class HttpClientModule {
|
|||
* You can add interceptors to the chain behind `HttpClient` by binding them to the
|
||||
* multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@NgModule({
|
||||
providers: [
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
*
|
||||
* Used by `HttpParams`.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
**/
|
||||
export interface HttpParameterCodec {
|
||||
encodeKey(key: string): string;
|
||||
|
@ -25,7 +25,7 @@ export interface HttpParameterCodec {
|
|||
* A `HttpParameterCodec` that uses `encodeURIComponent` and `decodeURIComponent` to
|
||||
* serialize and parse URL parameter keys and values.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export class HttpUrlEncodingCodec implements HttpParameterCodec {
|
||||
encodeKey(key: string): string { return standardEncoding(key); }
|
||||
|
@ -94,7 +94,7 @@ export interface HttpParamsOptions {
|
|||
*
|
||||
* This class is immutable - all mutation operations return a new instance.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export class HttpParams {
|
||||
private map: Map<string, string[]>|null;
|
||||
|
|
|
@ -73,7 +73,7 @@ function isFormData(value: any): value is FormData {
|
|||
* assumed to be immutable. To modify a `HttpRequest`, the `clone`
|
||||
* method should be used.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export class HttpRequest<T> {
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@ import {HttpHeaders} from './headers';
|
|||
/**
|
||||
* Type enumeration for the different kinds of `HttpEvent`.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export enum HttpEventType {
|
||||
/**
|
||||
|
@ -48,7 +48,7 @@ export enum HttpEventType {
|
|||
/**
|
||||
* Base interface for progress events.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface HttpProgressEvent {
|
||||
/**
|
||||
|
@ -71,7 +71,7 @@ export interface HttpProgressEvent {
|
|||
/**
|
||||
* A download progress event.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface HttpDownloadProgressEvent extends HttpProgressEvent {
|
||||
type: HttpEventType.DownloadProgress;
|
||||
|
@ -98,7 +98,7 @@ export interface HttpUploadProgressEvent extends HttpProgressEvent {
|
|||
* when a request may be retried multiple times, to distinguish between
|
||||
* retries on the final event stream.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface HttpSentEvent { type: HttpEventType.Sent; }
|
||||
|
||||
|
@ -108,7 +108,7 @@ export interface HttpSentEvent { type: HttpEventType.Sent; }
|
|||
* Grouping all custom events under this type ensures they will be handled
|
||||
* and forwarded by all implementations of interceptors.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface HttpUserEvent<T> { type: HttpEventType.User; }
|
||||
|
||||
|
@ -130,7 +130,7 @@ export interface HttpJsonParseError {
|
|||
*
|
||||
* Typed according to the expected type of the response.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export type HttpEvent<T> =
|
||||
HttpSentEvent | HttpHeaderResponse | HttpResponse<T>| HttpProgressEvent | HttpUserEvent<T>;
|
||||
|
@ -138,7 +138,7 @@ export type HttpEvent<T> =
|
|||
/**
|
||||
* Base class for both `HttpResponse` and `HttpHeaderResponse`.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class HttpResponseBase {
|
||||
/**
|
||||
|
@ -207,7 +207,7 @@ export abstract class HttpResponseBase {
|
|||
* `HttpHeaderResponse` is a `HttpEvent` available on the response
|
||||
* event stream, only when progress events are requested.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export class HttpHeaderResponse extends HttpResponseBase {
|
||||
/**
|
||||
|
@ -248,7 +248,7 @@ export class HttpHeaderResponse extends HttpResponseBase {
|
|||
* `HttpResponse` is a `HttpEvent` available on the response event
|
||||
* stream.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export class HttpResponse<T> extends HttpResponseBase {
|
||||
/**
|
||||
|
@ -298,7 +298,7 @@ export class HttpResponse<T> extends HttpResponseBase {
|
|||
* will contain either a wrapped Error object or the error response returned
|
||||
* from the server.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export class HttpErrorResponse extends HttpResponseBase implements Error {
|
||||
readonly name = 'HttpErrorResponse';
|
||||
|
|
|
@ -33,7 +33,7 @@ function getResponseUrl(xhr: any): string|null {
|
|||
/**
|
||||
* A wrapper around the `XMLHttpRequest` constructor.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class XhrFactory { abstract build(): XMLHttpRequest; }
|
||||
|
||||
|
@ -62,7 +62,7 @@ interface PartialResponse {
|
|||
* An `HttpBackend` which uses the XMLHttpRequest API to send
|
||||
* requests to a backend server.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Injectable()
|
||||
export class HttpXhrBackend implements HttpBackend {
|
||||
|
|
|
@ -21,7 +21,7 @@ export const XSRF_HEADER_NAME = new InjectionToken<string>('XSRF_HEADER_NAME');
|
|||
/**
|
||||
* Retrieves the current XSRF token to use with the next outgoing request.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class HttpXsrfTokenExtractor {
|
||||
/**
|
||||
|
|
|
@ -13,7 +13,7 @@ import {TestRequest} from './request';
|
|||
/**
|
||||
* Defines a matcher for requests based on URL, method, or both.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface RequestMatch {
|
||||
method?: string;
|
||||
|
@ -24,7 +24,7 @@ export interface RequestMatch {
|
|||
* Controller to be injected into tests, that allows for mocking and flushing
|
||||
* of requests.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class HttpTestingController {
|
||||
/**
|
||||
|
|
|
@ -18,7 +18,7 @@ import {HttpClientTestingBackend} from './backend';
|
|||
*
|
||||
* Inject `HttpTestingController` to expect and flush requests in your tests.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
|
|
@ -15,7 +15,7 @@ import {Observer} from 'rxjs';
|
|||
* This interface allows access to the underlying `HttpRequest`, and allows
|
||||
* responding with `HttpEvent`s or `HttpErrorResponse`s.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export class TestRequest {
|
||||
/**
|
||||
|
|
|
@ -26,6 +26,7 @@ import {COMMON_PIPES} from './pipes/index';
|
|||
* * The `exports` options make the declared directives and pipes available for import
|
||||
* by other NgModules.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@NgModule({
|
||||
declarations: [COMMON_DIRECTIVES, COMMON_PIPES],
|
||||
|
@ -41,6 +42,7 @@ export class CommonModule {
|
|||
* A module that contains the deprecated i18n pipes.
|
||||
*
|
||||
* @deprecated from v5
|
||||
* @publicApi
|
||||
*/
|
||||
@NgModule({
|
||||
declarations: [COMMON_DEPRECATED_I18N_PIPES],
|
||||
|
|
|
@ -34,7 +34,7 @@ import {Directive, DoCheck, ElementRef, Input, IterableChanges, IterableDiffer,
|
|||
* - `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
|
||||
*/
|
||||
@Directive({selector: '[ngClass]'})
|
||||
export class NgClass implements DoCheck {
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
import {ChangeDetectorRef, Directive, DoCheck, EmbeddedViewRef, Input, IterableChangeRecord, IterableChanges, IterableDiffer, IterableDiffers, NgIterable, TemplateRef, TrackByFunction, ViewContainerRef, forwardRef, isDevMode} from '@angular/core';
|
||||
|
||||
/**
|
||||
* @publicApi
|
||||
*/
|
||||
export class NgForOfContext<T> {
|
||||
constructor(
|
||||
public $implicit: T, public ngForOf: NgIterable<T>, public index: number,
|
||||
|
@ -93,6 +96,7 @@ export class NgForOfContext<T> {
|
|||
* example.
|
||||
*
|
||||
* @ngModule CommonModule
|
||||
* @publicApi
|
||||
*/
|
||||
@Directive({selector: '[ngFor][ngForOf]'})
|
||||
export class NgForOf<T> implements DoCheck {
|
||||
|
|
|
@ -100,6 +100,7 @@ import {Directive, EmbeddedViewRef, Input, TemplateRef, ViewContainerRef, ɵstri
|
|||
* ```
|
||||
*
|
||||
* @ngModule CommonModule
|
||||
* @publicApi
|
||||
*/
|
||||
@Directive({selector: '[ngIf]'})
|
||||
export class NgIf {
|
||||
|
@ -171,6 +172,9 @@ export class NgIf {
|
|||
static ngTemplateGuard_ngIf<E>(dir: NgIf, expr: E): expr is NonNullable<E> { return true; }
|
||||
}
|
||||
|
||||
/**
|
||||
* @publicApi
|
||||
*/
|
||||
export class NgIfContext {
|
||||
public $implicit: any = null;
|
||||
public ngIf: any = null;
|
||||
|
|
|
@ -28,7 +28,7 @@ import {Directive, DoCheck, ElementRef, Input, KeyValueChanges, KeyValueDiffer,
|
|||
* - keys are style names with an optional `.<unit>` suffix (ie 'top.px', 'font-style.em'),
|
||||
* - values are the values assigned to those properties (expressed in the given unit).
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Directive({selector: '[ngStyle]'})
|
||||
export class NgStyle implements DoCheck {
|
||||
|
|
|
@ -71,7 +71,7 @@ export class SwitchView {
|
|||
* When no matching expression is found on a `ngSwitchCase` view, the `ngSwitchDefault` view is
|
||||
* stamped out.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Directive({selector: '[ngSwitch]'})
|
||||
export class NgSwitch {
|
||||
|
@ -148,7 +148,7 @@ export class NgSwitch {
|
|||
*
|
||||
* See {@link NgSwitch} for more details and example.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Directive({selector: '[ngSwitchCase]'})
|
||||
export class NgSwitchCase implements DoCheck {
|
||||
|
@ -187,7 +187,7 @@ export class NgSwitchCase implements DoCheck {
|
|||
*
|
||||
* See {@link NgSwitch} for more details and example.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Directive({selector: '[ngSwitchDefault]'})
|
||||
export class NgSwitchDefault {
|
||||
|
|
|
@ -30,6 +30,7 @@ import {Directive, EmbeddedViewRef, Input, OnChanges, SimpleChange, SimpleChange
|
|||
*
|
||||
* {@example common/ngTemplateOutlet/ts/module.ts region='NgTemplateOutlet'}
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Directive({selector: '[ngTemplateOutlet]'})
|
||||
export class NgTemplateOutlet implements OnChanges {
|
||||
|
|
|
@ -14,6 +14,6 @@ import {InjectionToken} from '@angular/core';
|
|||
* 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 const DOCUMENT = new InjectionToken<Document>('DocumentToken');
|
||||
|
|
|
@ -57,6 +57,8 @@ enum TranslationType {
|
|||
* If not specified, host system settings are used.
|
||||
*
|
||||
* See {@link DatePipe} for more details.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export function formatDate(
|
||||
value: string | number | Date, format: string, locale: string, timezone?: string): string {
|
||||
|
|
|
@ -138,7 +138,7 @@ function formatNumberToLocaleString(
|
|||
* as `USD` for the US dollar and `EUR` for the euro.
|
||||
* - `digitInfo` See {@link DecimalPipe} for more details.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export function formatCurrency(
|
||||
value: number, locale: string, currency: string, currencyCode?: string,
|
||||
|
@ -168,7 +168,7 @@ export function formatCurrency(
|
|||
* - `locale` is a `string` defining the locale to use.
|
||||
* - `digitInfo` See {@link DecimalPipe} for more details.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export function formatPercent(value: number, locale: string, digitsInfo?: string): string {
|
||||
const format = getLocaleNumberFormat(locale, NumberFormatStyle.Percent);
|
||||
|
@ -191,7 +191,7 @@ export function formatPercent(value: number, locale: string, digitsInfo?: string
|
|||
* - `locale` is a `string` defining the locale to use.
|
||||
* - `digitInfo` See {@link DecimalPipe} for more details.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export function formatNumber(value: number, locale: string, digitsInfo?: string): string {
|
||||
const format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal);
|
||||
|
|
|
@ -31,7 +31,7 @@ import {LocationChangeListener, PlatformLocation} from './platform_location';
|
|||
*
|
||||
* {@example common/location/ts/hash_location_component.ts region='LocationComponent'}
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Injectable()
|
||||
export class HashLocationStrategy extends LocationStrategy {
|
||||
|
|
|
@ -44,6 +44,7 @@ export interface PopStateEvent {
|
|||
*
|
||||
* {@example common/location/ts/path_location_component.ts region='LocationComponent'}
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Injectable()
|
||||
export class Location {
|
||||
|
|
|
@ -25,7 +25,7 @@ import {LocationChangeListener} from './platform_location';
|
|||
*
|
||||
* See these two classes for more.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class LocationStrategy {
|
||||
abstract path(includeHash?: boolean): string;
|
||||
|
@ -61,6 +61,6 @@ export abstract class LocationStrategy {
|
|||
* class AppModule {}
|
||||
* ```
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export const APP_BASE_HREF = new InjectionToken<string>('appBaseHref');
|
||||
|
|
|
@ -40,7 +40,7 @@ import {LocationChangeListener, PlatformLocation} from './platform_location';
|
|||
*
|
||||
* {@example common/location/ts/path_location_component.ts region='LocationComponent'}
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Injectable()
|
||||
export class PathLocationStrategy extends LocationStrategy {
|
||||
|
|
|
@ -27,7 +27,7 @@ import {InjectionToken} from '@angular/core';
|
|||
* {@link Location} / {@link LocationStrategy} and DOM apis flow through the `PlatformLocation`
|
||||
* class they are all platform independent.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class PlatformLocation {
|
||||
abstract getBaseHrefFromDOM(): string;
|
||||
|
@ -48,7 +48,9 @@ export abstract class PlatformLocation {
|
|||
}
|
||||
|
||||
/**
|
||||
* @description Indicates when a location is initialized.
|
||||
* @description
|
||||
* Indicates when a location is initialized.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export const LOCATION_INITIALIZED = new InjectionToken<Promise<any>>('Location Initialized');
|
||||
|
|
|
@ -65,6 +65,7 @@ const _observableStrategy = new ObservableStrategy();
|
|||
*
|
||||
* {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'}
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Pipe({name: 'async', pure: false})
|
||||
export class AsyncPipe implements OnDestroy, PipeTransform {
|
||||
|
|
|
@ -22,6 +22,7 @@ import {invalidPipeArgumentError} from './invalid_pipe_argument_error';
|
|||
* <code-example path="common/pipes/ts/lowerupper_pipe.ts" region='LowerUpperPipe'></code-example>
|
||||
*
|
||||
* @ngModule CommonModule
|
||||
* @publicApi
|
||||
*/
|
||||
@Pipe({name: 'lowercase'})
|
||||
export class LowerCasePipe implements PipeTransform {
|
||||
|
@ -64,6 +65,7 @@ const unicodeWordMatch =
|
|||
* <code-example path="common/pipes/ts/titlecase_pipe.ts" region='TitleCasePipe'></code-example>
|
||||
*
|
||||
* @ngModule CommonModule
|
||||
* @publicApi
|
||||
*/
|
||||
@Pipe({name: 'titlecase'})
|
||||
export class TitleCasePipe implements PipeTransform {
|
||||
|
@ -87,6 +89,7 @@ export class TitleCasePipe implements PipeTransform {
|
|||
* @see `TitleCasePipe`
|
||||
*
|
||||
* @ngModule CommonModule
|
||||
* @publicApi
|
||||
*/
|
||||
@Pipe({name: 'uppercase'})
|
||||
export class UpperCasePipe implements PipeTransform {
|
||||
|
|
|
@ -147,6 +147,7 @@ import {invalidPipeArgumentError} from './invalid_pipe_argument_error';
|
|||
* }
|
||||
* ```
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
// clang-format on
|
||||
@Pipe({name: 'date', pure: true})
|
||||
|
|
|
@ -73,7 +73,7 @@ import {DateFormatter} from './intl';
|
|||
*
|
||||
* {@example common/pipes/ts/date_pipe.ts region='DeprecatedDatePipe'}
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Pipe({name: 'date', pure: true})
|
||||
export class DeprecatedDatePipe implements PipeTransform {
|
||||
|
|
|
@ -83,6 +83,7 @@ function formatNumber(
|
|||
* {@example common/pipes/ts/number_pipe.ts region='DeprecatedNumberPipe'}
|
||||
*
|
||||
* @ngModule CommonModule
|
||||
* @publicApi
|
||||
*/
|
||||
@Pipe({name: 'number'})
|
||||
export class DeprecatedDecimalPipe implements PipeTransform {
|
||||
|
@ -112,7 +113,7 @@ export class DeprecatedDecimalPipe implements PipeTransform {
|
|||
*
|
||||
* {@example common/pipes/ts/percent_pipe.ts region='DeprecatedPercentPipe'}
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Pipe({name: 'percent'})
|
||||
export class DeprecatedPercentPipe implements PipeTransform {
|
||||
|
@ -148,7 +149,7 @@ export class DeprecatedPercentPipe implements PipeTransform {
|
|||
*
|
||||
* {@example common/pipes/ts/currency_pipe.ts region='DeprecatedCurrencyPipe'}
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Pipe({name: 'currency'})
|
||||
export class DeprecatedCurrencyPipe implements PipeTransform {
|
||||
|
|
|
@ -21,6 +21,7 @@ import {Pipe, PipeTransform} from '@angular/core';
|
|||
*
|
||||
* {@example common/pipes/ts/json_pipe.ts region='JsonPipe'}
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Pipe({name: 'json', pure: false})
|
||||
export class JsonPipe implements PipeTransform {
|
||||
|
|
|
@ -15,6 +15,8 @@ function makeKeyValuePair<K, V>(key: K, value: V): KeyValue<K, V> {
|
|||
/**
|
||||
* A key value pair.
|
||||
* Usually used to represent the key value pairs from a Map or Object.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface KeyValue<K, V> {
|
||||
key: K;
|
||||
|
@ -38,6 +40,8 @@ export interface KeyValue<K, V> {
|
|||
* pipe.
|
||||
*
|
||||
* {@example common/pipes/ts/keyvalue_pipe.ts region='KeyValuePipe'}
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Pipe({name: 'keyvalue', pure: false})
|
||||
export class KeyValuePipe implements PipeTransform {
|
||||
|
|
|
@ -44,6 +44,7 @@ import {invalidPipeArgumentError} from './invalid_pipe_argument_error';
|
|||
*
|
||||
* <code-example path="common/pipes/ts/number_pipe.ts" region='NumberPipe'></code-example>
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Pipe({name: 'number'})
|
||||
export class DecimalPipe implements PipeTransform {
|
||||
|
@ -96,7 +97,7 @@ export class DecimalPipe implements PipeTransform {
|
|||
*
|
||||
* <code-example path="common/pipes/ts/percent_pipe.ts" region='PercentPipe'></code-example>
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Pipe({name: 'percent'})
|
||||
export class PercentPipe implements PipeTransform {
|
||||
|
@ -150,7 +151,7 @@ export class PercentPipe implements PipeTransform {
|
|||
*
|
||||
* <code-example path="common/pipes/ts/currency_pipe.ts" region='CurrencyPipe'></code-example>
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Pipe({name: 'currency'})
|
||||
export class CurrencyPipe implements PipeTransform {
|
||||
|
|
|
@ -42,8 +42,8 @@ import {invalidPipeArgumentError} from './invalid_pipe_argument_error';
|
|||
*
|
||||
* {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_string'}
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
|
||||
@Pipe({name: 'slice', pure: false})
|
||||
export class SlicePipe implements PipeTransform {
|
||||
/**
|
||||
|
|
|
@ -14,4 +14,7 @@
|
|||
|
||||
import {Version} from '@angular/core';
|
||||
|
||||
/**
|
||||
* @publicApi
|
||||
*/
|
||||
export const VERSION = new Version('0.0.0-PLACEHOLDER');
|
||||
|
|
|
@ -12,6 +12,8 @@ import {DOCUMENT} from './dom_tokens';
|
|||
|
||||
/**
|
||||
* Manages the scroll position.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class ViewportScroller {
|
||||
// De-sugared tree-shakable injection
|
||||
|
|
|
@ -15,7 +15,7 @@ import {EventEmitter, Injectable} from '@angular/core';
|
|||
* A mock implementation of {@link LocationStrategy} that allows tests to fire simulated
|
||||
* location events.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Injectable()
|
||||
export class MockLocationStrategy extends LocationStrategy {
|
||||
|
|
|
@ -61,7 +61,6 @@ export declare function formatNumber(value: number, locale: string, digitsInfo?:
|
|||
|
||||
export declare function formatPercent(value: number, locale: string, digitsInfo?: string): string;
|
||||
|
||||
/** @experimental */
|
||||
export declare enum FormatWidth {
|
||||
Short = 0,
|
||||
Medium = 1,
|
||||
|
@ -69,67 +68,47 @@ export declare enum FormatWidth {
|
|||
Full = 3
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare enum FormStyle {
|
||||
Format = 0,
|
||||
Standalone = 1
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare function getCurrencySymbol(code: string, format: 'wide' | 'narrow', locale?: string): string;
|
||||
|
||||
/** @experimental */
|
||||
export declare function getLocaleCurrencyName(locale: string): string | null;
|
||||
|
||||
/** @experimental */
|
||||
export declare function getLocaleCurrencySymbol(locale: string): string | null;
|
||||
|
||||
/** @experimental */
|
||||
export declare function getLocaleDateFormat(locale: string, width: FormatWidth): string;
|
||||
|
||||
/** @experimental */
|
||||
export declare function getLocaleDateTimeFormat(locale: string, width: FormatWidth): string;
|
||||
|
||||
/** @experimental */
|
||||
export declare function getLocaleDayNames(locale: string, formStyle: FormStyle, width: TranslationWidth): string[];
|
||||
|
||||
/** @experimental */
|
||||
export declare function getLocaleDayPeriods(locale: string, formStyle: FormStyle, width: TranslationWidth): [string, string];
|
||||
|
||||
/** @experimental */
|
||||
export declare function getLocaleEraNames(locale: string, width: TranslationWidth): [string, string];
|
||||
|
||||
/** @experimental */
|
||||
export declare function getLocaleExtraDayPeriodRules(locale: string): (Time | [Time, Time])[];
|
||||
|
||||
/** @experimental */
|
||||
export declare function getLocaleExtraDayPeriods(locale: string, formStyle: FormStyle, width: TranslationWidth): string[];
|
||||
|
||||
/** @experimental */
|
||||
export declare function getLocaleFirstDayOfWeek(locale: string): WeekDay;
|
||||
|
||||
/** @experimental */
|
||||
export declare function getLocaleId(locale: string): string;
|
||||
|
||||
/** @experimental */
|
||||
export declare function getLocaleMonthNames(locale: string, formStyle: FormStyle, width: TranslationWidth): string[];
|
||||
|
||||
/** @experimental */
|
||||
export declare function getLocaleNumberFormat(locale: string, type: NumberFormatStyle): string;
|
||||
|
||||
/** @experimental */
|
||||
export declare function getLocaleNumberSymbol(locale: string, symbol: NumberSymbol): string;
|
||||
|
||||
/** @experimental */
|
||||
export declare function getLocalePluralCase(locale: string): (value: number) => Plural;
|
||||
|
||||
/** @experimental */
|
||||
export declare function getLocaleTimeFormat(locale: string, width: FormatWidth): string;
|
||||
|
||||
/** @experimental */
|
||||
export declare function getLocaleWeekEndRange(locale: string): [WeekDay, WeekDay];
|
||||
|
||||
/** @experimental */
|
||||
export declare function getNumberOfCurrencyDigits(code: string): number;
|
||||
|
||||
export declare class HashLocationStrategy extends LocationStrategy {
|
||||
|
@ -144,7 +123,6 @@ export declare class HashLocationStrategy extends LocationStrategy {
|
|||
replaceState(state: any, title: string, path: string, queryParams: string): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class I18nPluralPipe implements PipeTransform {
|
||||
constructor(_localization: NgLocalization);
|
||||
transform(value: number, pluralMap: {
|
||||
|
@ -152,23 +130,18 @@ export declare class I18nPluralPipe implements PipeTransform {
|
|||
}, locale?: string): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class I18nSelectPipe implements PipeTransform {
|
||||
transform(value: string | null | undefined, mapping: {
|
||||
[key: string]: string;
|
||||
}): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare function isPlatformBrowser(platformId: Object): boolean;
|
||||
|
||||
/** @experimental */
|
||||
export declare function isPlatformServer(platformId: Object): boolean;
|
||||
|
||||
/** @experimental */
|
||||
export declare function isPlatformWorkerApp(platformId: Object): boolean;
|
||||
|
||||
/** @experimental */
|
||||
export declare function isPlatformWorkerUi(platformId: Object): boolean;
|
||||
|
||||
export declare class JsonPipe implements PipeTransform {
|
||||
|
@ -208,16 +181,13 @@ export declare class Location {
|
|||
static stripTrailingSlash(url: string): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare const LOCATION_INITIALIZED: InjectionToken<Promise<any>>;
|
||||
|
||||
/** @experimental */
|
||||
export interface LocationChangeEvent {
|
||||
state: any;
|
||||
type: string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export interface LocationChangeListener {
|
||||
(event: LocationChangeEvent): any;
|
||||
}
|
||||
|
@ -246,7 +216,6 @@ export declare class NgClass implements DoCheck {
|
|||
ngDoCheck(): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class NgComponentOutlet implements OnChanges, OnDestroy {
|
||||
ngComponentOutlet: Type<any>;
|
||||
ngComponentOutletContent: any[][];
|
||||
|
@ -291,7 +260,6 @@ export declare class NgIfContext {
|
|||
ngIf: any;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class NgLocaleLocalization extends NgLocalization {
|
||||
/** @deprecated */ protected deprecatedPluralFn?: ((locale: string, value: string | number) => Plural) | null | undefined;
|
||||
protected locale: string;
|
||||
|
@ -300,19 +268,16 @@ export declare class NgLocaleLocalization extends NgLocalization {
|
|||
getPluralCategory(value: any, locale?: string): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare abstract class NgLocalization {
|
||||
abstract getPluralCategory(value: any, locale?: string): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class NgPlural {
|
||||
ngPlural: number;
|
||||
constructor(_localization: NgLocalization);
|
||||
addCase(value: string, switchView: SwitchView): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class NgPluralCase {
|
||||
value: string;
|
||||
constructor(value: string, template: TemplateRef<Object>, viewContainer: ViewContainerRef, ngPlural: NgPlural);
|
||||
|
@ -347,7 +312,6 @@ export declare class NgTemplateOutlet implements OnChanges {
|
|||
ngOnChanges(changes: SimpleChanges): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare enum NumberFormatStyle {
|
||||
Decimal = 0,
|
||||
Percent = 1,
|
||||
|
@ -355,7 +319,6 @@ export declare enum NumberFormatStyle {
|
|||
Scientific = 3
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare enum NumberSymbol {
|
||||
Decimal = 0,
|
||||
Group = 1,
|
||||
|
@ -403,7 +366,6 @@ export declare abstract class PlatformLocation {
|
|||
abstract replaceState(state: any, title: string, url: string): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare enum Plural {
|
||||
Zero = 0,
|
||||
One = 1,
|
||||
|
@ -413,7 +375,6 @@ export declare enum Plural {
|
|||
Other = 5
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export interface PopStateEvent {
|
||||
pop?: boolean;
|
||||
state?: any;
|
||||
|
@ -421,14 +382,12 @@ export interface PopStateEvent {
|
|||
url?: string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare function registerLocaleData(data: any, localeId?: string | any, extraData?: any): void;
|
||||
|
||||
export declare class SlicePipe implements PipeTransform {
|
||||
transform(value: any, start: number, end?: number): any;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare type Time = {
|
||||
hours: number;
|
||||
minutes: number;
|
||||
|
@ -438,7 +397,6 @@ export declare class TitleCasePipe implements PipeTransform {
|
|||
transform(value: string): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare enum TranslationWidth {
|
||||
Narrow = 0,
|
||||
Abbreviated = 1,
|
||||
|
@ -461,7 +419,6 @@ export declare abstract class ViewportScroller {
|
|||
static ngInjectableDef: never;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare enum WeekDay {
|
||||
Sunday = 0,
|
||||
Monday = 1,
|
||||
|
|
|
@ -15,7 +15,6 @@ export declare class MockLocationStrategy extends LocationStrategy {
|
|||
simulatePopState(url: string): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class SpyLocation implements Location {
|
||||
urlChanges: string[];
|
||||
back(): void;
|
||||
|
|
Loading…
Reference in New Issue