I want to create an ionic delete swipe gesture but it doesn\'t seem to work.
**This is my home page ( i called it myPage.html)**
<
As per the docs, you need to put the ion-item
inside ion-item-sliding
component.
Thus, the structure of your markup should be:
<ion-list>
<ion-item-sliding *ngFor="let item of items">
<ion-item>
{{item.title}}
</ion-item>
<ion-item-options side="right">
<button ion-button (click)="delete(item)">
<ion-icon name="trash"></ion-icon>Delete
</button>
</ion-item-options>
</ion-item-sliding>
</ion-list>
Refer here for the sample: https://stackblitz.com/edit/ionic-eofb82