How to get the @index of nested #each in meteor How to get the @index of nested #each in meteor arrays arrays

How to get the @index of nested #each in meteor


You need to use let to capture the index, like:

{{#let rowIndex=@index}}    {{#each cell in row}}        <div class="cell {{cellState @index rowIndex}}">{{this}}</div>    {{/each}}{{/let}}