Hi, I am using ion-item-sliding and i want it to be close after i click the button. However i try to use IonItemSliding.close()
to close the ion-item-sliding, but it said
ERROR Error: Uncaught (in promise): TypeError: item.close is not a function TypeError: item.close is not a function
Below is my code
//test.html
<ion-item-sliding *ngFor="let item of items">
<ion-item-options #item side="end">
<ion-item-option (click)="unread(item.status, item)">click me</ion-item-option>
</ion-item-options>
</ion-item-sliding>
//test.ts
import { IonItemSliding } from '@ionic/angular';
...
unread(s, item: IonItemSliding){
console.log(s);
item.close();
}
This is my reference from ionic 3