【发布时间】:2016-07-27 01:22:37
【问题描述】:
我有一个 html 表,我正在使用 ng-repeat 来显示来自数组的显示数据
<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>
数组条中的行有一个组字段。我希望为每个组选择唯一的单选按钮。
非常感谢所有帮助。
【问题讨论】:
标签: javascript html angularjs radio-button angularjs-ng-repeat