mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
virtualRepeat directive cleanup
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user