ngstyle
<div [ngStyle]="{'background-color':person.country === 'UK' ? 'green' : 'red' }"></<div>
Gorgeous Gazelle
<div [ngStyle]="{'background-color':person.country === 'UK' ? 'green' : 'red' }"></<div>
<div [ngStyle]="{'background-color':'green'}"></<div>
[ngStyle]="{'background-image': 'url(' + data.headerImage + ')'}"
[ngStyle]="{'opacity': is_mail_sent ? '0.5' : '1' }"
content_copy
<some-element [ngStyle]="{'max-width.px': widthExp}">...</some-element>
[ngStyle]="{'opacity': is_mail_sent ? '0.5' : '1' }"
[style.background-color]="myColorVaraible"
[ngStyle]="styleOne?{'background-color': 'red'} : {'background-color': 'blue'}"
<div [style.background-color]="style1 ? 'red' : (style2 ? 'blue' : null)">
<div [ngStyle]="someFunctionInYourComponent()">