Multiple Each on Blaze


#1

HI,

I’ve been trying to use blaze Each with a Each inside

{{#each colA}}
   {{#each colB}}
      {{this}} // refer the outer Loop?
   {{/each}}
{{/each}}

like this guy asked on this Stack Post but when i try that the app brokes. Seems its pretty old… 2012.

Is there an effective way to do that ?

Thanks!


#2

Well, i found the solution…

{{ this }} is the last path (inside collection)

and

{{ .. }} is the outer path.

So you can call

  {{#each a}}
    {{#each b}}
        {{ .. }}
        {{ this }}
    {{/each}}
  {{/each}}

Thanks.