I’m trying to insert separators/dividers at certain spots in my list. I have the list bound to an observable:
<ion-list>
<ion-item button *ngFor="let item of (results | async)" routerDirection="forward" routerLink="/{{ item.itemPage }}">
<ion-label text-wrap>
<h3>{{ item.name }}</h3>
</ion-label>
</ion-item>
</ion-list>
But, I want to know if it’s possible to insert a divider based on the value of one of the elements. for instance, I have item.type = “P” if it’s a protocol and “S” if it’s a separator.
Is this possible? If so, how can it be done, since you’re already in the ITEM loop at that point.
Thank you.