docs: add api stability indicators for @angular/common
This commit is contained in:
@ -59,6 +59,8 @@ var __unused: Promise<any>; // avoid unused import when Promise union types are
|
||||
* to the view. Every 500ms, the `time` Observable updates the view with the current time.
|
||||
*
|
||||
* {@example core/pipes/ts/async_pipe/async_pipe_example.ts region='AsyncPipeObservable'}
|
||||
*
|
||||
* @stable
|
||||
*/
|
||||
@Pipe({name: 'async', pure: false})
|
||||
@Injectable()
|
||||
|
@ -20,6 +20,8 @@ import {I18nSelectPipe} from './i18n_select_pipe';
|
||||
*
|
||||
* This collection can be used to quickly enumerate all the built-in pipes in the `pipes`
|
||||
* property of the `@Component` decorator.
|
||||
*
|
||||
* @experimental Contains i18n pipes which are experimental
|
||||
*/
|
||||
export const COMMON_PIPES = /*@ts2dart_const*/[
|
||||
AsyncPipe,
|
||||
|
@ -81,6 +81,8 @@ var defaultLocale: string = 'en-US';
|
||||
* ```
|
||||
*
|
||||
* {@example core/pipes/ts/date_pipe/date_pipe_example.ts region='DatePipe'}
|
||||
*
|
||||
* @experimental
|
||||
*/
|
||||
@Pipe({name: 'date', pure: true})
|
||||
@Injectable()
|
||||
|
@ -34,9 +34,9 @@ var interpolationExp: RegExp = RegExpWrapper.create('#');
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @experimental
|
||||
*/
|
||||
@Pipe({name: 'i18nPlural', pure: true})
|
||||
@Injectable()
|
||||
export class I18nPluralPipe implements PipeTransform {
|
||||
transform(value: number, pluralMap: {[count: string]: string}): string {
|
||||
var key: string;
|
||||
|
@ -31,9 +31,10 @@ import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
||||
* ...
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @experimental
|
||||
*/
|
||||
@Pipe({name: 'i18nSelect', pure: true})
|
||||
@Injectable()
|
||||
export class I18nSelectPipe implements PipeTransform {
|
||||
transform(value: string, mapping: {[key: string]: string}): string {
|
||||
if (!isStringMap(mapping)) {
|
||||
|
@ -7,10 +7,10 @@ import {Json} from '../../src/facade/lang';
|
||||
*
|
||||
* ### Example
|
||||
* {@example core/pipes/ts/json_pipe/json_pipe_example.ts region='JsonPipe'}
|
||||
*
|
||||
* @stable
|
||||
*/
|
||||
/* @ts2dart_const */
|
||||
@Pipe({name: 'json', pure: false})
|
||||
@Injectable()
|
||||
export class JsonPipe implements PipeTransform {
|
||||
transform(value: any): string { return Json.stringify(value); }
|
||||
}
|
||||
|
@ -8,10 +8,10 @@ import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
||||
* ### Example
|
||||
*
|
||||
* {@example core/pipes/ts/lowerupper_pipe/lowerupper_pipe_example.ts region='LowerUpperPipe'}
|
||||
*
|
||||
* @experimental
|
||||
*/
|
||||
/* @ts2dart_const */
|
||||
@Pipe({name: 'lowercase'})
|
||||
@Injectable()
|
||||
export class LowerCasePipe implements PipeTransform {
|
||||
transform(value: string): string {
|
||||
if (isBlank(value)) return value;
|
||||
|
@ -35,6 +35,10 @@ import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
||||
* --Note--: The 'pattern' parameter will be converted to a RegExp instance. Make sure to escape the
|
||||
* string properly if you are matching for regular expression special characters like parenthesis,
|
||||
* brackets etc.
|
||||
*
|
||||
* @deprecated The current pipe has limited functionality. The pipe api is not meant to be able
|
||||
* express complex yet generic value transformations. We recommend that these transformations happen
|
||||
* in the component logic instead.
|
||||
*/
|
||||
|
||||
@Pipe({name: 'replace'})
|
||||
|
@ -58,10 +58,11 @@ import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
||||
* ## String Examples
|
||||
*
|
||||
* {@example core/pipes/ts/slice_pipe/slice_pipe_example.ts region='SlicePipe_string'}
|
||||
*
|
||||
* @stable
|
||||
*/
|
||||
|
||||
@Pipe({name: 'slice', pure: false})
|
||||
@Injectable()
|
||||
export class SlicePipe implements PipeTransform {
|
||||
transform(value: any, start: number, end: number = null): any {
|
||||
if (isBlank(value)) return value;
|
||||
|
@ -8,9 +8,10 @@ import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
||||
* ### Example
|
||||
*
|
||||
* {@example core/pipes/ts/lowerupper_pipe/lowerupper_pipe_example.ts region='LowerUpperPipe'}
|
||||
*
|
||||
* @experimental
|
||||
*/
|
||||
@Pipe({name: 'uppercase'})
|
||||
@Injectable()
|
||||
export class UpperCasePipe implements PipeTransform {
|
||||
transform(value: string): string {
|
||||
if (isBlank(value)) return value;
|
||||
|
Reference in New Issue
Block a user