谁能解释为什么前两个按钮组有效,而第三个无效?
<div class="btn-group">
<button ng-repeat="company in companies"
class="btn"
ng-model="radioModel.id"
btn-radio="company.id">
{{company.name}}
</button>
</div>
<div class="btn-group">
<button class="btn btn-two"
ng-model="radioModel.id"
btn-radio="2">
two
</button>
<button class="btn btn-two"
ng-model="radioModel.id"
btn-radio="3">
three
</button>
</div>
<div class="btn-group">
<button ng-repeat="company in companies"
class="btn btn-{{ company.name }}"
ng-model="radioModel.id"
btn-radio="company.id">
{{company.name}}
</button>
</div>
$scope.companies = [ { id: 2, name: "two"}, {id: 3, name: "three"} ];
$scope.radioModel = { id: 3 };
此示例使用 AngularUI Bootstrap 0.5.0。如果我将其更改为 0.3.0,一切都会按预期进行。