I am using Ionic 5 / Angular and I have a list of ion-item's. Each one has a button.
The code example below:
<ion-list>
<ion-item>
<ion-label>One</ion-label>
<ion-button slot="end" (click)="selfhide()">
<ion-icon slot="icon-only" name="close-outline"></ion-icon>
</ion-button>
</ion-item>
<ion-item>
<ion-label>Two</ion-label>
<ion-button slot="end" (click)="selfhide()">
<ion-icon slot="icon-only" name="close-outline"></ion-icon>
</ion-button>
</ion-item>
<ion-item>
<ion-label>Three</ion-label>
<ion-button slot="end" (click)="selfhide()">
<ion-icon slot="icon-only" name="close-outline"></ion-icon>
</ion-button>
</ion-item>
</ion-list>
I need to be able to click on any and for it to self hide.
So if I clicked on the button of the first ion-item then that ion-item will disappear.
How can I do this?