cristiandley
cristiandley

Reputation: 589

Meteor blaze each inside each

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!

Upvotes: 2

Views: 952

Answers (1)

kaoskeya
kaoskeya

Reputation: 1091

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}}

Upvotes: 6

Related Questions