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.

AngularJS ng-class if-else expression

With AngularJS I'm using ng-class the following way: <div class="bigIcon" data-ng-click="PickUp()" ng-class="{first:'classA', second:'classB', third:…

angularjs ng-class
Adding multiple class using ng-class

Can we have multiple expression to add multiple ng-class ? for eg. <div ng-class="{class1: expressionData1, class2: expressionData2}"></…

angularjs ng-class
adding and removing classes in angularJs using ng-click

I am trying to work how to add a class with ngClick. I have uploaded up my code onto plunker …

javascript angularjs angularjs-ng-click ng-class
Angular ng-class if else

I'd like to know how to do to make the False ng-class. page.isSelected(1) is TRUE if the page if …

javascript html angularjs ng-class
AngularJS ng-class multiple conditions with OR operator

I try to find out the good syntax for adding classes depending on angular values. I want to activate a …

angularjs conditional ng-class
Adding class to an element on its click event

I am new to Angular Js. I need to add a class to an element on its click event. I …

angularjs angularjs-ng-click ng-class
How do you toggle an active state ng-class in an ng-repeat item using ng-click?

<ul> <li data-ng-repeat="image in images" data-ng-click="toggle = !toggle" data-ng-init="toggle=false"> <img data-ng-class="{'active' : …

angularjs angularjs-ng-repeat angularjs-ng-click ng-class
Complex angular js ng-class

I have the component and have a problem setting the css class to it. I want it to always have …

angularjs ng-class
How to use ng-class in select with ng-options

I have an array of Person objects var persons = [ {Name:'John',Eligible:true}, {Name:'Mark',Eligible:true}, {Name:'Sam',Eligible:…

select angularjs ng-class
Angular 2 Doing an else with ngClass

I have the following template : <p [ngClass]="{checked: condition, unchecked: !condition}"> While this is working, I find it …

html angular ng-class