How to access parent @index value in each-loop?
Tried the following:
{{#each company}}
{{#each employee}}
{{../@index}} // how to access company in
It looks like there's a new syntax in Ember v2.2.0. I tried all the answers here and they didn't work for me.
What I found worked was naming the parent loop's index and the child loop's index.
{{#each parents as |parent parentIndex|}}
{{parentIndex}}
{{#each children as |child childIndex|}}
{{parentIndex}}
{{childIndex}}
{{/each}}
{{/each}}