Meteor - #each iteration of an array with another HTML element inserted after each nth item
问题 I'm iterating over an array of items in Meteor using Blaze using the #each iterator, and I want to insert an HTML element after each nth (10th) item. I figured I could use @index to access what index of the array I'm at, but don't really know how to insert another element every 10th element. {{#each getArray}} <div class="item" data-value="{{someHelper @index}}">{{this}}</div> {{/each}} 回答1: Based on your comment, it seems like you'd want to make a custom helper that returns whether or not