Skip to content

Commit e08572d

Browse files
author
Nicholas E. Ardecky
committed
Adding destroy method to directive for cleaning up charts
1 parent 11bf25d commit e08572d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/zingchart-angularjs.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@
8080
});
8181
}
8282
},true);
83-
83+
84+
$scope.$on('$destroy', function() {
85+
zingchart.exec($scope.id,'destroy');
86+
});
8487
}],
8588
link : function($scope, $element, $attrs){
8689
var id = $element.attr('id');

0 commit comments

Comments
 (0)