On-swipe-left only works half the time


#1

My view looks like this:

<ion-view view-title="{{profile.username}}">
  <ion-content id="profile_content" has-bouncing="false" on-swipe-left="onSwipeLeft();">
      <p>hello world</p>
  </ion-content>
</ion-view>

and inside my controller:

$scope.onSwipeLeft = function() {
    alert("swipeLeft");
}

However, it only works half the time. The first time I swipe, the alert shows up. The second swipe, nothing happens. The third time, it does. And so on. Can’t figure out what is causing this behavior.

Thank you.


#2

After some debugging, I found that the problem is the alert function itself and not on-swipe-left. Changing alert to console.log shows that the swipe function works just fine