首页 > 解决方案 > 在angular js中使用bootstrap和ng重复对元素进行排序

问题描述

我正在尝试使用 ng repeat 在 angularjs 中对我的数据进行排序,其中所有数据开始填充第一列,如果有更多则进入第二列。(如表格 A)

像这样:

form A                        form B
0    3     and not like this  0   1
1    4                        2   3
2    5                        4   5


in this order.
help???

this is the code that i tried: note that this displays the products giving them col-xs-6 (like form B)which is not what i want(form A)

<div class="container">
  <div class="row">
    <div ng-repeat="product in products">
      <div>
        <div >
         <div class="col-xs-6">
           {{product}}
         </div>
        </div>    
      </div>      
    </div>
  </div>
</div>

标签: angularjs-ng-repeat

解决方案


推荐阅读