小编Hac*_*chi的帖子

带有ng-repeat的ui.bootstrap.buttons

将ui.bootstrap.buttons转换为与ng-repeat一起使用似乎存在问题.ui.bootstrap.buttons示例和文档在这里:http://angular-ui.github.io/bootstrap/

基本上,默认示例很有效:http://plnkr.co/edit/2O81y57GtfP6EPNH9qYa?p = preview

<div class="btn-group">
    <label class="btn btn-primary" ng-model="radioModel" btn-radio="'Left'">Left</label>
    <label class="btn btn-primary" ng-model="radioModel" btn-radio="'Middle'">Middle</label>
    <label class="btn btn-primary" ng-model="radioModel" btn-radio="'Right'">Right</label>
</div>
Run Code Online (Sandbox Code Playgroud)

但当它转换为使用ng-repeat时,它就会破坏:http://plnkr.co/edit/nzx1VTGN4Q59JlFCU53V?p = preview

<div class="btn-group">
    <label ng-repeat="test in ['Left', 'Middle', 'Right']" class="btn btn-primary" ng-model="radioModel" btn-radio="'{{test}}'">{{test}}</label>
</div>
Run Code Online (Sandbox Code Playgroud)

twitter-bootstrap angularjs

3
推荐指数
1
解决办法
5917
查看次数

标签 统计

angularjs ×1

twitter-bootstrap ×1