I am trying to tell whether an item in an *ngFor
is the first or last element to style a container. Is there a way to do something like this?
<md-expansion-panel *ngFor="let item of items" *ngClass="{ 'first' : item.isFirst }">
<content></content>
</md-expansion-panel>
Thanks for any help offered!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…