chore(listView): deregister listView on destroy

This commit is contained in:
Adam Bradley
2014-10-09 20:26:02 -05:00
parent 2deec085bb
commit b820b96092

View File

@@ -117,6 +117,13 @@ function($animate, $timeout) {
}
});
$scope.$on('$destroy', function() {
if(listView) {
listView.deregister && listView.deregister();
listView = null;
}
});
if (isDefined($attr.canSwipe)) {
$scope.$watch('!!(' + $attr.canSwipe + ')', function(value) {
listCtrl.canSwipeItems(value);