So I am trying to build a small web application with Angular and Firebase, where said application should display a list of players. This list of players I render like this:
<ul class="team">
<li *ngFor="let player of players">
<span class="icon icon-*xyz*"></span> {{ player.name }}
</li>
</ul>
What I want: Depending on the player id I want to style the span differently. Hence I would like the class "icon-xyz" to be icon-123, where 123 equals player.id.
Why I want this: I have a big picture with portraits of each player and with setting this class I exactly "cut" out the necessary portrait.
What I tried / question: I went through the Angular docs and Google in search of a functionality of Angular, which would help me here - without success. I found out that React provides a functionality, where components have a "probs" functionality which can access object properties to change styling. I have not found something similar for Angular and now my question is if there is some good solution for my problem or if I should change my approach totally.