docs(API): 翻译完了 PipeTransform

This commit is contained in:
Zhicheng Wang 2018-09-05 09:15:35 +08:00
parent 84f95e5864
commit 7c7733c3af
2 changed files with 10 additions and 1 deletions

View File

@ -90,7 +90,7 @@
[x] | forms/ReactiveFormsModule | 0.18 [x] | forms/ReactiveFormsModule | 0.18
[x] | common/http/HTTP_INTERCEPTORS | 0.18 [x] | common/http/HTTP_INTERCEPTORS | 0.18
[x] | platform-browser/DomSanitizer | 0.18 [x] | platform-browser/DomSanitizer | 0.18
[ ] | core/PipeTransform | 0.18 [x] | core/PipeTransform | 0.18
[ ] | core/SimpleChange | 0.18 [ ] | core/SimpleChange | 0.18
[ ] | core/SimpleChanges | 0.18 [ ] | core/SimpleChanges | 0.18
[ ] | forms/NgSelectOption | 0.17 [ ] | forms/NgSelectOption | 0.17

View File

@ -9,14 +9,22 @@
/** /**
* To create a Pipe, you must implement this interface. * To create a Pipe, you must implement this interface.
* *
*
*
* Angular invokes the `transform` method with the value of a binding * Angular invokes the `transform` method with the value of a binding
* as the first argument, and any parameters as the second argument in list form. * as the first argument, and any parameters as the second argument in list form.
* *
* Angular `transform`
*
* @usageNotes * @usageNotes
* ### Example * ### Example
* *
* ###
*
* The `RepeatPipe` below repeats the value as many times as indicated by the first argument: * The `RepeatPipe` below repeats the value as many times as indicated by the first argument:
* *
* `RepeatPipe` `value``times`
*
* ``` * ```
* import {Pipe, PipeTransform} from '@angular/core'; * import {Pipe, PipeTransform} from '@angular/core';
* *
@ -30,6 +38,7 @@
* *
* Invoking `{{ 'ok' | repeat:3 }}` in a template produces `okokok`. * Invoking `{{ 'ok' | repeat:3 }}` in a template produces `okokok`.
* *
* `{{ 'ok' | repeat:3 }}` `okokok`
* *
*/ */
export interface PipeTransform { transform(value: any, ...args: any[]): any; } export interface PipeTransform { transform(value: any, ...args: any[]): any; }