My ng-click for the button in the ui-grid line is as follows.
ng-click="getExternalScopes().delete($event, row)
The $ scope variable is introduced in my controller, and the first line creates a link (I believe) to the outer scope.
app.controller("MyController", function ($scope) { $scope.$scope = $scope;
HTML looks like it refers to an external area.
<div ui-grid="gridOptions" class="someClass" external-scopes="$scope" ui-grid-selection ui-grid-resize-columns></div>
Here is my whole cellTemplate if it helps ...
<div class="ui-grid-cell-contents ng-binding ng-scope"><button class="btn btn-danger {{getExternalScopes().deleteButtonClass(row)}} btn-xs btn-block" ng-click="getExternalScopes().delete($event, row)"><span class="glyphicon glyphicon-trash"></span></button></div>
source share