$ionicSwipeDelegate different behavior on final slide


#1

So I use the $ionicSwipeDelegate to create a 3 panel tutorial at the beginning of my app. I want to have the final panel, when the swipe it, to trigger a $state.go to my login page. How would this be possible? I’ve tried this: but I can’t get it to even fire the console log.

  if ($scope.slideIndex == 3) {
    onGesture('swipeleft', function() {
      // console.log('blamo!');
      $location.path('/');
    }, 'ion-slider')
  }

#2

got it to work. HTML:

 on-swipe-left="swipeLeft()"

and in the controller

  $scope.swipeLeft = function() {
    console.log("blamo!")
    $location.path('/');
  }