On-swipe-left only works half the time

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>

and inside my controller:

$scope.onSwipeLeft = function() {

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.

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