docs(API): 翻译完了 AsyncPipe

This commit is contained in:
Zhicheng Wang 2018-09-02 22:33:49 +08:00
parent 78248db322
commit 3fc7bb2ab4
2 changed files with 11 additions and 1 deletions

View File

@ -41,7 +41,7 @@
[x] | forms/NgForm | 0.50 [x] | forms/NgForm | 0.50
[ ] | core/Renderer2 | 0.49 [ ] | core/Renderer2 | 0.49
[x] | core/HostListener | 0.47 [x] | core/HostListener | 0.47
[ ] | common/AsyncPipe | 0.45 [x] | common/AsyncPipe | 0.45
[ ] | core/ViewContainerRef | 0.42 [ ] | core/ViewContainerRef | 0.42
[ ] | common/NgTemplateOutlet | 0.42 [ ] | common/NgTemplateOutlet | 0.42
[ ] | common/Location | 0.41 [ ] | common/Location | 0.41

View File

@ -46,22 +46,32 @@ const _observableStrategy = new ObservableStrategy();
* *
* Unwraps a value from an asynchronous primitive. * Unwraps a value from an asynchronous primitive.
* *
*
*
* The `async` pipe subscribes to an `Observable` or `Promise` and returns the latest value it has * 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 * 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 * changes. When the component gets destroyed, the `async` pipe unsubscribes automatically to avoid
* potential memory leaks. * potential memory leaks.
* *
* `async` `Observable` `Promise`
* `async` `async`
* *
* ## Examples * ## Examples
* *
* ##
*
* This example binds a `Promise` to the view. Clicking the `Resolve` button resolves the * This example binds a `Promise` to the view. Clicking the `Resolve` button resolves the
* promise. * promise.
* *
* `Promise` `Resolve` Promise
*
* {@example common/pipes/ts/async_pipe.ts region='AsyncPipePromise'} * {@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 * 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. * to the view. The Observable continuously updates the view with the current time.
* *
* `async` `Observable` `time` `Observable` `Observable` 使
*
* {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'} * {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'}
* *
* *