I have a table as follows:
<tr ng-repeat="user in users">
<td>{{user.fields.first_name}}, {{ user.fields.last_name }}</td>
<td>
<input type="checkbox">
</td>
</tr>
and the json is as follows:
{
"users":
[
{ "fields": {"first_name": "sam", "last_name": "smith"}, "model": "auth.user", "pk": 3},
{ "fields": {"first_name": "tom", "last_name": "moody"}, "model": "auth.user", "pk": 4}
]
}
I want to have a functionality to add the pk's of the selected checkboxes to a scope variable. Since i don't have a boolean field for the selected in my json, how will i approach this?
pk'sand bind it to theng-clickto checkbox and do rest. May be this works.