hello, id appreciate some help on the following
i have an array of objects, lets say
var items = [{"id": 1, "name": "one"}, {"id": 2, "name": "two"},{"id": 3, "name": "three"},{"id": 4, "name": "four"},{"id": 5, "name": "five"}]
now i need to create as many rows of TWO divs as necessary ... the final "pseudo" html should look like this
<div class="container"> <div class="row"> <div class="item">1 (one)</div> <div class="item">2 (two)</div> </div>
<div class="row"> <div class="item">3 (three)</div> <div class="item">4 (four)</div> </div>
<div class="row"> <div class="item">5 (five)</div> </div> </div>
the first two rows are fully filled, while the last row only has one item
im thinking nested ng-repeats, but how do i manage the iteration on the single items array ?
Juan B Rodriguez's gravatar image asked Nov 24 2013 at 19:58 in Angularjs by Juan B Rodriguez

0 Answers