I have a list of object like this {name : 'Susan', number : 1}. I need to show the name colored depending on the number (if the number is 1 the name has to be red, if 2 blue, if 3 green and if 4 orange).In the template I have:
<p *ngFor="let item of data"> {{item.name}}</p>
How can I achive this?