diff --git a/js/angular/directive/slideBox.js b/js/angular/directive/slideBox.js index 5e0cd4915aa..b3340a8b788 100644 --- a/js/angular/directive/slideBox.js +++ b/js/angular/directive/slideBox.js @@ -31,7 +31,6 @@ * @param {number=} slide-interval How many milliseconds to wait to change slides (if does-continue is true). Defaults to 4000. * @param {boolean=} show-pager Whether a pager should be shown for this slide box. * @param {expression=} pager-click Expression to call when a pager is clicked (if show-pager is true). Is passed the 'index' variable. - * @param {boolean=} disable-scroll Whether to disallow scrolling/dragging of the slide-box content. * @param {expression=} on-slide-changed Expression called whenever the slide is changed. Is passed an 'index' variable. * @param {expression=} active-slide Model to bind the current slide to. */ @@ -63,7 +62,6 @@ function($timeout, $compile, $ionicSlideBoxDelegate) { var slider = new ionic.views.Slider({ el: $element[0], auto: slideInterval, - disableScroll: ($scope.$eval($scope.disableScroll) === true) || false, continuous: continuous, startSlide: $scope.activeSlide, slidesChanged: function() { @@ -82,6 +80,8 @@ function($timeout, $compile, $ionicSlideBoxDelegate) { } }); + slider.enableSlide($scope.$eval($attrs.disableScroll) !== true); + $scope.$watch('activeSlide', function(nv) { if(angular.isDefined(nv)){ slider.slide(nv);