angular example ngstyle
Example 1: ngstyle
<div [ngStyle]="{'background-color':person.country === 'UK' ? 'green' : 'red' }"></<div>
Example 2: ng style
<some-element [ngStyle]="{'max-width.px': widthExp}">...</some-element>
<div [ngStyle]="{'background-color':person.country === 'UK' ? 'green' : 'red' }"></<div>
<some-element [ngStyle]="{'max-width.px': widthExp}">...</some-element>