Add dynamic css style properties

less than 1 minute read

Add dynamic css style properties

variable is a dynamic field.

<div [ngStyle]="{'color': variable ? 'red' : 'blue'}"></div>

Leave a comment