angularjs - Angular ng-grid click event not triggered -


in below plunkr, there ng-grid records. each row in ng-grid has remove button, on clicking button listener not getting called.

[http://plnkr.co/edit/ffefzp8ygv1pmd8pgqgv?p=preview][1] 

please tell why listener not called on click

the problem if using variable $index in template. try this:

ng-click="grid.appscope.removerow(row)" 

and then, in removerow function, receiving row object. find in data object , delete it.

var index = $scope.mydata.indexof(row.entity); $scope.gridoptions.data.splice(index, 1); 

Comments