AngularJS Directives

AngularJS Filters and Elements

AngularJS Tutorials

AngularJS ng class Directive

AngularJS ng-class Directive



The ng-class directive is used to dynamically bind one or more CSS classes to an HTML element. Its value can be a string, an object, or an array. If it is a string, it should contain one or more, space-separated class names.




< element ng-class="expression" >< /element >


Further Explanation:-


Value Description
expression An expression that returns one or more class names.

Code Explanation

All Tutorials related to AngularJS Directives

All Sections related to AngularJS