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.

learn more…| top users | synonyms

0
votes
0answers
7 views

Why a href in a UL does not work when the ng-class (condicional) is true

I have a list of tabs which I show them from 7 at a time within a div with the following code.<div><ul class="nav nav-tabs" style="margin-left: 10px; width: 750px; float: left;">&...
1
vote
1answer
38 views

How to add style property to the element having ng-class dynamically in angularjs

how to pass class:after using ng-class and how can u add property to existing css classi have css as<style>customcss:after{border-top: 7px solid green;}</style>i want to chage ...
0
votes
0answers
33 views

Dynamically change background based on AngularJS $scope array $index and Bootstrap carousel

I'm using Bootstrap carousel for some dynamically created slides that have different slide duration. I used THIS and it works fine. What I want to achieve is that when the first slide is displayed, ...
1
vote
1answer
33 views

Angular 2 call a function based on class applied on a div

I have a div with *ngFor to loop though an array of messages. <div *ngFor="let message of messages; let i=index" [focused]="i===activeIndex;" [ngClass]="{'message-list-active': activeIndex==...
2
votes
2answers
28 views

AngularJS dynamic styling with extended class

I am trying to display a status label that will contain different background colors and text depending on the status in AngularJs (e.g. 'New'=green, 'Active'=yellow). I currently have a css file ...
0
votes
4answers
31 views

How to add multiple conditions in ng-class using Angular.js

I need to add multiple conditions ng-class using Angular.js. I am explaining my code below.<li ng-class="{'active':($root.stateName==='app.settings')}"><a ui-sref="app.settings">Settings&...
-2
votes
2answers
22 views

ngClass compare number with array of numbers dynamically - Angular [duplicate]

I have something like this:[ngClass]="{className: singleNumber==arrayOfNumbers}How do I compare 1===[1,2,3,4] ? it works if I do this: arrayOfNumbers[0]
0
votes
2answers
54 views

how to set ng-class with multiple “OR” condition

I have to set color based on coming details from angular list.In below code coming data is in string so I have set condition with stringCODE:<td ng-class="{IsGreen: s.InformationForm=='Form ...
0
votes
5answers
66 views

angulajs ng-class not working properly

am trying to apply class dynamically using ng-class within an ng-repeat but class definations(rules) is not taking effect eventhough the class name is applied to the html. here is the codes:The ...
0
votes
1answer
20 views

Using a variable within AngularJS 1.5 ngClass

I'm using AngularJS 1.5.x and I have a dynamic class passed through which I want to put into an ng-classHere is what current is broken<td id="name-{{ $index }}" ng-class="{{{result['class']}}: ...
0
votes
1answer
49 views

ngClass - Dynamically add class name based on @input

I would like to dynamically add a class based on an input parameter but only if the input is an 'approved' string.I have a component with an input and class array from which I want to check the ...
0
votes
4answers
269 views

ngClass doesn't work Angular 5

Hello I am user angular 5 and I want to toggle change a Play <-> Pause icon for my soundcloud player.here is my TypeScript followed by my html.I can see in my console that I toggle correctly ...
0
votes
1answer
116 views

font-awesome icon doesn't show up in [ngClass] in Angular 4

I'm facing a strange error in my Angular 4 HTML Template, I'm trying to toggle the class of <i> tag, but only one class shows up, but not the other. Here is my code;<i [ngClass]="{'fa fa-...
0
votes
2answers
35 views

How to give multiple condition in ng-class

Have to implement scenario where both && and || should work in one expression like belowng-class="{'class_name' : condition1 || condition2 || (condition3 && condition4)}"Its ...
0
votes
2answers
59 views

Angular 2 ngClass conditional with data?

So I am basically trying to set a highlight if an object is selected already. How can I compare the objects to change classes? Something like this <[ngClass]="{{perkResult.perk===perk.perk}} ? ...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,