ngstyle code example
Example 1: ngstyle
<div [ngStyle]="{'background-color':person.country === 'UK' ? 'green' : 'red' }"></<div>
Example 2: ngstyle
<some-element [ngStyle]="{'font-style': styleExp}">...</some-element>
Example 3: ngStyle
[ngStyle]="{'background-image': 'url(' + data.headerImage + ')'}"
Example 4: ngstyle
content_copy
<some-element [ngStyle]="{'max-width.px': widthExp}">...</some-element>