I have a collection, and I am looping over it.
<tbody>
<tr ng-repeat="account in vm.pagedAccounts.items"
ng-class="{ 'highlight': (account.rowIsSelected === account) }"
<td>
<input
ng-model="account.rowIsSelected"
ng-value="{{account}}"
name="selectedAccount"
ng-change="vm.selectAccount(account)"
type="radio">
</td>
ng-value
is set to the entire account object
.
Now, the row is being highlighted but the button is not checked.
In controller,
vm.selectAccount = function (account) {
account.rowIsSelected = account;
}
What am I doing wrong?