0

我正在使用 AngularStrap 复选框按钮,其中复选框项目来自服务器。所以,我正在尝试使用ng-repeat,但我无法看到所选项目的值。请查看我有 3 种复选框 的plunker -

  1. 一个常规的复选框,它可以工作。
  2. 引导复选框使用ng-repeat. 它不反映选定的对象值。
  3. 重复项目的引导复选框。有用。

请帮我修复上面我使用ng-repeat选项的#2。

4

1 回答 1

1

去掉按钮元素周围的额外标签:

http://plnkr.co/edit/jRIedNZdqZ4phdDk21Vw?p=preview

  <div class="btn-group" bs-buttons-checkbox>
            <button ng-repeat="item in items" type="button" class="btn" ng-model="selection.ids[item.id]">{{item.name}}</button>
  </div>
于 2013-07-02T18:41:52.937 回答