When you have a table using md-data-table, How do you get the data for a particular row. Basically each row has a menu button and once they click on that button the data in that row should be saved in a variable:
1 Answer
html :
<td md-cell>
<label>{{item.count}}</label>
<i ng-click="setSomeVar(item)">you_icon</i>
</td>
method in controller :
$scope.setSomeVar = function(item)
{
$scope.someVar = item.count;
}
2 Comments
Flash
Thanks for the response. The row would be an array of objects using the md-data table with this example: codepen.io/anon/pen/vgNdJb but instead of a check box there would be a button
Nikita Glusuchenko
so, there is a icon or button, you can put here whatever you want, it should work