Can I disable swipe in SlideBox?

Here is another way of doing this:

In your controller add a function:

$scope.disableSwipe = function() {
   $ionicSlideBoxDelegate.enableSlide(false);
};

In your view add the ng-init attribute on the slide-box element

<ion-slide-box ng-init="disableSwipe()">

This will disable the slide-event.
You can now use a controller function to slide to a given index like this:

$scope.slideTo = function(index) {
  $ionicSlideBoxDelegate.slide(index);
};

e.g. use it with ng-click on a button:

<button class="button" ng-click="slideTo(0)">First</button>
12 Likes