i have html table using ng-repeat show display data array
<table class="table"> <thead> <tr> <th>group</th> <th>select</th> </tr> </thead> <tr ng-repeat="foo in bars"> <td>{{foo.group}}</td> <td><input type="radio" name="foo.group" ng-model="foo.field1"/></td> </tr>
the rows in array bars have group field. want on radio button selected per group.
all appreciated.
it appears you're missing braces on name attribute assign group it.
<table class="table"> <thead> <tr> <th>group</th> <th>select</th> </tr> </thead> <tr ng-repeat="foo in bars"> <td>{{foo.group}}</td> <td><input type="radio" name="{{foo.group}}" ng-model="foo.field1"/></td> </tr>
Comments
Post a Comment