Skip to content

angular ngClass

sinsunsan edited this page Sep 25, 2014 · 5 revisions

Utilisation

  • 1/
    in the html > ng-class="scopeVarName"
    in the controller > $scope.scopeVarName = 'blue';
    in the css .blue { color: blue; }

Concatenate a static part + a dynamic part as the class name

http://stackoverflow.com/questions/14024448/expression-inside-ng-class

WIKI by Sébastien Lucas CEO & Funder or Bricks

Clone this wiki locally