Answers for "writing ngStyle in angular"

6

ngstyle

<div [ngStyle]="{'background-color':person.country === 'UK' ? 'green' : 'red' }"></<div>
Posted by: Guest on August-08-2020
1

ngstyle

<some-element [ngStyle]="{'font-style': styleExp}">...</some-element>
Posted by: Guest on March-05-2021

Browse Popular Code Answers by Language