close ion item sliding

Solutions on MaxInterview for close ion item sliding by the best coders in the world

showing results for - "close ion item sliding"
Sara
11 May 2020
1<ion-list>
2  <ion-item-sliding #slidingItem>
3    <ion-item>
4      Item
5    </ion-item>
6    <ion-item-options>
7      <button ion-button (click)="share(slidingItem)">Share</button>
8    </ion-item-options>
9  </ion-item-sliding>
10</ion-list>
11
12// And then:
13
14import { Component } from '@angular/core';
15import { ItemSliding } from 'ionic-angular';
16
17@Component({...})
18export class MyClass {
19  constructor() { }
20
21  share(slidingItem: ItemSliding) {
22    slidingItem.close();
23  }
24}
25