Answers for "how to ionic 5 sliding items close programmatically"

1

close ion-item-sliding

<ion-list>
  <ion-item-sliding #slidingItem>
    <ion-item>
      Item
    </ion-item>
    <ion-item-options>
      <button ion-button (click)="share(slidingItem)">Share</button>
    </ion-item-options>
  </ion-item-sliding>
</ion-list>

// And then:

import { Component } from '@angular/core';
import { ItemSliding } from 'ionic-angular';

@Component({...})
export class MyClass {
  constructor() { }

  share(slidingItem: ItemSliding) {
    slidingItem.close();
  }
}
Posted by: Guest on May-20-2020

Code answers related to "how to ionic 5 sliding items close programmatically"

Browse Popular Code Answers by Language