ng-style

Other topics

Use of ng-style

Below example changes the opacity of the image based on the "status" parameter.

 <img class="img-responsive"  ng-src="{{imagesrc}}"
     ng-style="{'opacity' : (status == 2) ? 1 : 0.5}">

Syntax:

  • <ANY ng-style="expression"></ANY >

  • <ANY class="ng-style: expression;"> ... </ANY>

Contributors

Topic Id: 8773

Example Ids: 27351

This site is not affiliated with any of the contributors.