Ionic 3 - Pan Events

Viewed 4061

I can't find any documentation on Pan events in Ionic 3, or if they are coming from Cordova or Angular 4?

<div class="swipper" #swipper (panleft)="swipe( $event)" (panright)="swipe( $event)" (panend)="swipe( $event) " (panup)="swipe( $event) " (pandown)="swipe( $event) ">

The panup and pandown events do not get fired all the time and generally very really sticky or even buggy (Testing in Chrome and the iOS Emulator). So as a solution I'm thinking of using touchstart touchend events instead, which would require a rewrite but first I would like to know a bit more about the pan events.

1 Answers

It is there. Here you can see the doc.

Basic gestures can be accessed from HTML by binding to tap, press, pan, swipe, rotate, and pinch events.

Sample from official code base:

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

Related