python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Angular ngClass conditional class working correctly but app fails on build
I want to add an "active" class when I click on a certain tab using the pug code
a.nav-link([class.active]="view === 'profile'", (click)="changeView('profile')") Profile
...
Tim Chosen
Votes: 0
Answers: 0
Angular6 Can't use ternary operator in ngClass with multiple entries
I'm trying to add multiple classes by ngClass, and I'm confused as to why I can't use ternary operator here.
<div [ngClass]="{'otherClass': otherFlag, classFlag ? 'class--true': 'class--false'...
dabrowawojciech64
Votes: 0
Answers: 2
angular - how to combine few ngclass together in one div
I would like to combine multiple ngClass if else statement together, I have tried but not able to resolve it.
<div
[ngClass]="[tabItem === 'unavailable' ? 'background-grey' : selected ? '...
user7046311
Votes: 0
Answers: 1