docs(API): 翻译 NgClass

This commit is contained in:
Zhicheng Wang 2018-08-31 16:28:42 +08:00
parent acfc14aafa
commit 3961af4fea
2 changed files with 13 additions and 1 deletions

View File

@ -12,7 +12,7 @@
[x] |core/NgModule | 4,097 | 1.27
[x] |router/Router | 4,049 | 1.26
[ ] |animations/animate | 3,817 | 1.19
[ ] |common/NgClass | 3,715 | 1.15
[x] |common/NgClass | 3,715 | 1.15
[ ] |common/DatePipe | 3,576 | 1.11
[ ] |forms/FormsModule | 3,381 | 1.05
[x] |core/Input | 3,354 | 1.04

View File

@ -28,12 +28,24 @@ import {Directive, DoCheck, ElementRef, Input, IterableChanges, IterableDiffer,
*
* Adds and removes CSS classes on an HTML element.
*
* HTML CSS
*
* The CSS classes are updated as follows, depending on the type of the expression evaluation:
*
* CSS
*
* - `string` - the CSS classes listed in the string (space delimited) are added,
*
* `string` - CSS
*
* - `Array` - the CSS classes declared as Array elements are added,
*
* `Array` - CSS
*
* - `Object` - keys are CSS classes that get added when the expression given in the value
* evaluates to a truthy value, otherwise they are removed.
*
* `Object` - key CSS
*
*/
@Directive({selector: '[ngClass]'})