docs: add api stability indicators for @angular/common

This commit is contained in:
Igor Minar
2016-05-27 11:24:05 -07:00
parent 1c929031a2
commit 7bc2d9a93a
48 changed files with 128 additions and 24 deletions

View File

@ -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()

View File

@ -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,

View File

@ -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()

View File

@ -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;

View File

@ -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)) {

View File

@ -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); }
}

View File

@ -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;

View File

@ -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'})

View File

@ -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;

View File

@ -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;