AngularJS

AngularJS Directives

AngularJS Filters and Elements

AngularJS Tutorials

AngularJS ng style Directive

AngularJS ng-style Directive

 

 

The ng-style directive is used to specify the style attribute for the HTML element. Its value must be an object or an expression that returns an object. The object consists of CSS properties and values, in key-value pairs.

 

Syntax:-

 

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

 

Further Explanation:-

 

Value Description
expression An expression that returns an object where the keys are CSS properties, and the values are CSS values.

Code Explanation

All Tutorials related to AngularJS Directives

All Sections related to AngularJS