我正在使用引导,并想通过数组ng-repeat,但我需要得到每个循环的2个值。例如,我希望b.name预订[0],另一个b.name预订[1]。我目前正在添加每一行然后添加值。吴重复与阵列中的每个重复的两个值
<div class="row" ng-repeat="b in booking">
<div class="col-sm-6">
<label><input icheck type="checkbox" ng-model="basicIntake.email_subscription">
{{b.name}}
</label>
</div>
<div class="col-sm-6">
<label><input icheck type="checkbox" ng-model="basicIntake.email_subscription">
{{b.name}}
</label>
</div>
</div>
你想要偶数和奇数索引差异吗? – valbrux
如果是每次创建一行有2个col-sm-6的行时,只需使用一行并循环显示col-sm-6就可以了 – Groben