diff --git a/js/angular/controller/slideController.js b/js/angular/controller/slideController.js index 6dfc1714b5..ed8fd0b76b 100644 --- a/js/angular/controller/slideController.js +++ b/js/angular/controller/slideController.js @@ -7,8 +7,7 @@ function(scope, element, $q) { var self = this; scope.$on('$destroy', function() { - element.removeData(); - detachSlide(); + attachSlide(); }); element.on(ionic.CSS.TRANSITIONEND, onTransitionEnd); diff --git a/js/angular/service/attachDrag.js b/js/angular/service/attachDrag.js index 665e984ab7..bdb760a1c7 100644 --- a/js/angular/service/attachDrag.js +++ b/js/angular/service/attachDrag.js @@ -20,9 +20,9 @@ IonicModule var dragEndGesture = ionic.onGesture('dragend', handleDragEnd, element[0]); scope.$on('$destroy', function() { - ionic.offGesture(dragStartGesture); - ionic.offGesture(dragGesture); - ionic.offGesture(dragEndGesture); + ionic.offGesture(dragStartGesture, 'dragstart', handleDragStart); + ionic.offGesture(dragGesture, 'drag', handleDrag); + ionic.offGesture(dragEndGesture, 'dragend', handleDragEnd); }); var dragState; diff --git a/test/html/slideBox.html b/test/html/slideBox.html index 079541a648..1e679b7b02 100644 --- a/test/html/slideBox.html +++ b/test/html/slideBox.html @@ -45,7 +45,7 @@