Angular ngStyle


<div [ngStyle]="{'background-color': (bgColor=='black') ? '#000' : '#fff'}">

Text

</div>

Leave a Comment