Answers for "add class conditionally html angular"

0

conditional classes angular

<div 
  [className]="isActive ? 'active' : 'inactive'">
</div>
Posted by: Guest on October-18-2020
1

conditionally assign a css class angular 9

<div [ngClass]="{'message': info.priority < 10,
                 'warn': info.priority > 10 && info.priority < 20, 
                 'error': info.priority > 30}">

{{info.text}}

</div>
Posted by: Guest on August-20-2020
0

angular conditional class

<button [class.disable]="1==1">Apply disable class when condition is true</button>
Posted by: Guest on September-22-2021

Code answers related to "add class conditionally html angular"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language