How would I use AngularJS ng-repeat with Twitter Bootstrap's scaffolding?

前端 未结 5 1995
既然无缘
既然无缘 2020-12-24 12:39

How would I use AngularJS ng-repeat to display the following HTML (Twitter Bootstrap Scaffolding)? Essentially, every third record I need to close the <

5条回答
  •  太阳男子
    2020-12-24 12:46

    Here's a way:


    {{projects[$index+0]}}

    {{projects[$index+1]}}

    {{projects[$index+2]}}

    This way will also work if you have for example 7 data items: on the last 3 data, it will only show item 7 and not try to show the nonexistant item 8 and 9.

    http://jsfiddle.net/4LhN9/68/

    EDIT: Updated to use ng-if & angular 1.2.12

提交回复
热议问题