Cambiar la unión angular CSS

<div [style.background-color]="activity.status == 'Pending' ? 'red' : 'green'"></div>

<div [ngStyle]="{'backgroundColor': activity.status == 'Pending' ? 'red' : 'green' }"></div>
Marton