dimanche 5 avril 2015

How to wrap each pair in the div inside {{#each}} loop

Question is how to wrap every two subsequent items inside {{#each}} loop in a div to get this layout <ul> <div> <li>first item</li> <li> second item</li> </div> <div> <li>third item</li> <li> fourth item</li> </div> // etc... </ul>


for that model [ {id: 1, name: 'first item'}, {id: 2, name: 'second item'}, {id: 3, name: 'third item'}, {id: 4, name: 'fourth item'}, // etc... ]





Aucun commentaire:

Enregistrer un commentaire