Answers for "angular add conditional css property"

6

conditional style angular

<div [ngStyle]="{'color':employee.country === 'India' ? 'orange' : 'red' }"></<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

Code answers related to "angular add conditional css property"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language