Skip to content

Commit 02f1222

Browse files
michaelgeorgeattardIgorMinar
authored andcommitted
docs(common): minor corrections/improvements for NgClass (angular#12327)
1 parent c27ce73 commit 02f1222

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

modules/@angular/common/src/directives/ng_class.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import {CollectionChangeRecord, Directive, DoCheck, ElementRef, Input, IterableD
1111
import {isListLikeIterable} from '../facade/collection';
1212
import {isPresent} from '../facade/lang';
1313

14-
15-
1614
/**
1715
* @ngModule CommonModule
1816
*
@@ -31,11 +29,11 @@ import {isPresent} from '../facade/lang';
3129
*
3230
* @description
3331
*
34-
* The CSS classes are updated as follow depending on the type of the expression evaluation:
35-
* - `string` - the CSS classes listed in a string (space delimited) are added,
36-
* - `Array` - the CSS classes (Array elements) are added,
37-
* - `Object` - keys are CSS class names that get added when the expression given in the value
38-
* evaluates to a truthy value, otherwise class are removed.
32+
* The CSS classes are updated as follows, depending on the type of the expression evaluation:
33+
* - `string` - the CSS classes listed in the string (space delimited) are added,
34+
* - `Array` - the CSS classes declared as Array elements are added,
35+
* - `Object` - keys are CSS classes that get added when the expression given in the value
36+
* evaluates to a truthy value, otherwise they are removed.
3937
*
4038
* @stable
4139
*/
@@ -50,7 +48,6 @@ export class NgClass implements DoCheck {
5048
private _iterableDiffers: IterableDiffers, private _keyValueDiffers: KeyValueDiffers,
5149
private _ngEl: ElementRef, private _renderer: Renderer) {}
5250

53-
5451
@Input('class')
5552
set klass(v: string) {
5653
this._applyInitialClasses(true);

0 commit comments

Comments
 (0)