Meteor blaze each inside each

951 views Asked by At

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

ColA being one collection

ColB another different collection (not inside ColA)

{{#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!

1

There are 1 answers

1
kaoskeya On BEST ANSWER

Assuming

ColA has: title, author

ColB has comment, user

{{#each colA}}
    {{#each colB}}
        {{ ../title }} by {{ ../author }}
        {{ comment }} by {{ user }} // refer the outer Loop?
    {{/each}}
{{/each}}