I am using angular button in a ng-grid. I need to know how can i identity which button was clicked from within the grid.
I guess part of the complexity is that the button is clicked before the row is selected (Just my analysis,probably wont help with the solution :)
A snap shot of how the grid looks
A plunker illustrating the problem here
I have been able to find out how to resolve my question,basically pass in "row" as an argument on your function for ng-click. ng-click="save(row)"
Before
.. ng-click="edit(selectedItem)" >Edit</button> '
After
.. ng-click="edit(row)" >Edit</button> '
I have updated the plunker here to reflect the same
row.entity
will give me the entity bound to this row of the grid