Skip to content

Commit

Permalink
Merge pull request #6 from JetMuffin/patch
Browse files Browse the repository at this point in the history
Add 'objectEquality' params to watcher to enable watch on array (pop and shift)
  • Loading branch information
Brian Hines committed Apr 29, 2016
2 parents 15d8547 + 49f0f62 commit 4bf7f77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion angular-peity.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var buildChartDirective = function(chartType) {
var watcher = scope.$watch('data', function(){
span.textContent = scope.data.join();
jQuery( span ).change();
});
}, true);

scope.$on('$destroy', function(){
watcher();
Expand Down

0 comments on commit 4bf7f77

Please sign in to comment.