diff --git a/dist/js/ionic-angular.js b/dist/js/ionic-angular.js index 586ff6f444e..4b1592996e4 100644 --- a/dist/js/ionic-angular.js +++ b/dist/js/ionic-angular.js @@ -26578,6 +26578,10 @@ angular.module('ionic.ui.virtualRepeat', []) // When the user scrolls, we move the `state.firstActive` dom.bind('momentumScrolled', sfVirtualRepeatOnScroll); + scope.$on('$destroy', function () { + dom.unbind('momentumScrolled', sfVirtualRepeatOnScroll); + }); + // The watch on the collection is just a watch on the length of the // collection. We don't care if the content changes. scope.$watch(sfVirtualRepeatWatchExpression, sfVirtualRepeatListener, true); diff --git a/js/ext/angular/src/directive/ionicVirtualRepeat.js b/js/ext/angular/src/directive/ionicVirtualRepeat.js index f012fef329f..f3debc52fde 100644 --- a/js/ext/angular/src/directive/ionicVirtualRepeat.js +++ b/js/ext/angular/src/directive/ionicVirtualRepeat.js @@ -313,6 +313,10 @@ angular.module('ionic.ui.virtualRepeat', []) // When the user scrolls, we move the `state.firstActive` dom.bind('momentumScrolled', sfVirtualRepeatOnScroll); + scope.$on('$destroy', function () { + dom.unbind('momentumScrolled', sfVirtualRepeatOnScroll); + }); + // The watch on the collection is just a watch on the length of the // collection. We don't care if the content changes. scope.$watch(sfVirtualRepeatWatchExpression, sfVirtualRepeatListener, true);