I have below code in ngGrid:
cellTemplate: '<div class="padding-t-5 padding-l-5"><a ui-sref="editCamera({id:row.entity.id})" ><i class="fa fa-edit margin-r-10"></i></a>\n\
<button ng-click="confirmClick() && grid.appScope.deleteRow(row)" confirm-click><i class="fa fa-trash"></i></button></div>'
I wondering how to define the editCamera method mentioned in ui-sref into the controller.
If I add ng-click then how would I pass the id (passed on ui-sref)
I tried to define using $scope.editCamera, but dint worked.
****UPDATE******
What I need is to perform add and edit operations in a same controller, for this I need a different method for the edit operation.