Top "Ng-class" questions

The angularjs ngClass directive allows you to set CSS classes on an HTML element, dynamically, by databinding an expression that represents all classes to be added.

Assign classes conditionally in Angular2

I'm trying to conditionally assign a class to a div based on the value I obtained from my back-end system. …

angular ng-class
give active class onclick in ngFor angular 2

Hi I have unordered list and all of them have active class. I want to toggle active class when clicked …

angular ng-class ngfor
ng-class condition changes, but not updating classes

I have a very strange issue. I have to set an active class on the appropriate <li> when …

javascript angularjs ng-class
ng-class not being applied

I have a textarea containing a message to be posted and a span with the number of characters still available. &…

angularjs ng-class
angularjs - ng-class - [$parse:syntax] Syntax Error: Token ':' is an unexpected token at column 11 of the expression

I am using the following code for "ng-class" : <i class="fa" ng-class="fa-sort-up:tableService.sortState.sortBy==id && …

angularjs ng-class
Multiple classes in ngClass

I'm trying to add multiple values in *ngClass, what used to work on previous alpha releases and doesn't seem to …

angular ng-class
Applying ng-class based on value

I have a simple ng-repeat that displays a list of scores and a value of either Positive or Negative. What …

angularjs angularjs-directive angularjs-ng-repeat ng-class angular-ng-if
ng-animate with ng-class directive

You can use ng-animate with ng-class with the add and remove animations. I'm looking to make one animation in CSS3 …

css angularjs animation ng-animate ng-class
AngularJS - How to add multiple ng-class directives?

Here are 2 different ways to use the ng-class directive. I need them both, on the same element, but that doesn't …

javascript angularjs ng-class
Change background color of the button on click

I have a button that changed its text to enable and disable on click. How can I also change the …

angular typescript ng-class