I've used the index below to select the first value in the result set (see
yellow
highlight), if it's not already selected.
<li ng-repeat="address in addresses | filter:vm.addressSearch">
<div class="checkbox">
<input type="radio" name="address-list" id="address-{{address.addressId}}"
ng-click="vm.setAddress( address.addressId )"
ng-checked="address.addressId === vm.cart.addressId || $index==0?true:false
">
</div>
</li>
Now the first addresses radio button will be selected on load, but my
validation does not detect it as selected, it has to be clicked again to go
through.
Is there a reason for this?
Thanks, Cody
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.