0

我有一组要循环的项目。我想为每 3 个项目创建一个新行。因此,我希望每 3 个项目有 1 行,而不是每个项目有 1 行。所以HTML看起来像这样......

<div class='row'>
  <div>.. item 1 in the list </div>
  <div>.. item 2 in the list </div>
  <div>.. item 3 in the list </div>
</div>
<div class='row'>
  <div>.. item 4 in the list </div>
  <div>.. item 5 in the list </div>
  <div>.. item 6 in the list </div>
</div>

我似乎无法使用 ng-repeat 来实现这一点,因为它不断为每个项目创建一个新的 div,有没有办法在 AngularJS 中做到这一点?

4

0 回答 0