<div *ngFor="let item of items">
<div>Title</div>
<div class="show-more" (click)="toggleContent(item)">Show more</div>
<div class="extra-content" [hidden]="!item.showContent">
<p>lorum ipsum bla bla bla</p>
</div>
</div>
How can you toggle the extra content div by clicking on the show-more div element in a way that is unique to each item in the collection.
Avoid using a global variable as it would trigger all the items in the collection simultaneously.