Here is the ng-repeat markup being used:
<tbody>
<tr ng-repeat=
"(k, v) in loanapps | filter:SelectedStatus | filter:SelectedBorrower track by $index">
<td>{{v.Id}}</td>
<td><a ui-sref="adminloandetails({loanid:{{v.Id}}})">{{v.Name}}</a></td>
<td class="hidden-xs">{{v.AmountYouWishToBorrow | currency:"€"}}</td>
<td><span ng-class=
"{'label label-default': v.LoanStatus == 'Waiting for Meeting', 'label label-success': v.LoanStatus == 'Under Review'}">
{{v.LoanStatus}}</span></td>
<td>{{v.ApplicationDate | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td><a ui-sref="adminloandetails({loanid:{{v.Id}}})" class=
"btn dark btn-sm btn-outline sbold uppercase">View</a></td>
</tr>
</tbody>
While the filter correctly updates all data, it seems that the v.Id
within the ui-sref attribute is not updating according to the row value. The id passed to the adminloandetails view remains the same as the previous value.
Interestingly, the first td element containing the id is updated correctly; only the v.Id within the ui-sref attribute is not updating.
Does anyone have any suggestions on what changes need to be made?