How to use swipe event on ion-content?

Hello, I’m using Segments on my pages and I want to swipe through them to give the user a more intuitive experience.

I’ve tried to do it like this:

<ion-content (swipe)="onSwipe($event)">
  <!-- Rest of the page -->

On the controller:

  /* Here I check if the swipe was
   * to right or left and change
   * the current segment */

But the onSwipe(e) function is never triggered.

Any one knows if ion-content supports swipe events?
I’ve used it before in other ion elements.


1 Like