<div *ngFor="let item of list">
<div *ngIf="item == previousItem"></div>
<div *ngIf="item == firstItem"></div>
</div>
How can we make this type of thing work? That is, how can we access other items in the list either (1) in relation to the current index or (2) by absolute index?
EDIT: What if the list was instead an Observable?
<div *ngFor="let item of observable">
<div *ngIf="item == previousItem"></div>
<div *ngIf="item == firstItem"></div>
</div>