mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(listView): deregister listView on destroy
This commit is contained in:
7
js/angular/directive/list.js
vendored
7
js/angular/directive/list.js
vendored
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user