ionic3中的gestures 手势事件- ioni3c长按事件

ionic3中的gestures 手势事件如下:


ionic3中的gestures 手势事件包括: tap, press, pan, swipe, ionic3rotate, and pinch events等事件


tap    ionic3点击事件

pressc    ionic3长按事件

pan    滑动的时候触发的事件,滑动触发多次

swipe滑动事件 滑动触发一次

rotate 旋转事件 

pinch  捏合(pinch)手势


 <ion-card (tap)="tapEvent($event)">
    <ion-item>
      Tapped: {{tap}} times
    </ion-item>
  </ion-card>

  <ion-card (press)="pressEvent($event)">
    <ion-item>
      Pressed: {{press}} times
    </ion-item>
  </ion-card>

  <ion-card (pan)="panEvent($event)">
    <ion-item>
      Panned: {{pan}} times
    </ion-item>
  </ion-card>

  <ion-card (swipe)="swipeEvent($event)">
    <ion-item>
      Swiped: {{swipe}} times
    </ion-item>
  </ion-card>



export class BasicPage {

  public press: number = 0;
  public pan: number = 0;
  public swipe: number = 0;
  public tap: number = 0;
  constructor() {

  }
  pressEvent(e) {
    this.press++
  }
  panEvent(e) {
    this.pan++
  }
  swipeEvent(e) {
    this.swipe++
  }
  tapEvent(e) {
    this.tap++
  }

}