element:
Sky
Tomato
[Try it Β»](#)
* * *
## Definition and Usage
The **ng-class** directive dynamically binds one or more CSS classes to an HTML element.
The value of the `ng-class` directive can be a string, an object, or an array.
If it is a string, multiple class names are separated by spaces.
If it is an object, you need to use key-value pairs, where the key is the class name you want to add, and the value is a boolean. The class is only added when the value is true.
If it is an array, it can be composed of strings or objects. The elements of the array can be strings or objects.
* * *
## Syntax
Supported by all HTML elements.
* * *
## Parameter Values
| Value | Description |
| --- | --- |
| _expression_ | An expression that returns one or more class names. |
* * AngularJS Reference](#)
Welcome Home!
I like it!
YouTip