Issue
I have N number of rows in a table. When I click on the "save" button I need to get the "id" of each row.
Solution
You can simply send id
as the parameter of the function. For example if you call sendId()
just send the parameter of sendId(your_id_here)
.
Example:
<div ng-repeat="list in lists">
<button ng-click="sendId(list.id)">
</div>
If you want to send index of current element:
<div ng-repeat="list in lists">
<button ng-click="sendId($index)">
</div>
Answered By - squiroid
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.