Answers for "angular docs ng class conditionally apply styles"

6

ngstyle

<div [ngStyle]="{'background-color':person.country === 'UK' ? 'green' : 'red' }"></<div>
Posted by: Guest on August-08-2020
0

add classon ng if

[ngClass]="{'my-class': step === 'step1'}"
Posted by: Guest on June-11-2020

Code answers related to "angular docs ng class conditionally apply styles"

Browse Popular Code Answers by Language