#each not working in nested templates


#1

I’m having an issue where using {{#each}} in a nested template doesn’t work. The template works fine, but not the #each loop. You can find example code here (it won’t work in JSFiddle but pasting the code here wasn’t working). Am I doing something wrong or is this a bug?

Thanks


#2

Your get helper is being declared in the hello template and that’s why it won’t work in the test template, unless you declare another get helper in your test template.


#3

Wow, I can’t believe I missed that. Thanks

Do you know if there’s an easy way to access a parent template’s helper functions? It looks like this addon would do the job but you might as well just do without the plugin and write the helpers again.


#4

I’m not really sure if you can do that without using any addons. One of them is the template-extension which you’ve already found out, another is this blaze components which allows you to write reusable components in blaze.


#5

I’ll have to check that out more, it looks better than the one I found. Thanks for the help, appreciate it.


#6

Just a side note, if you want to host a sample meteor app so that people can help you with a problem you are facing, then I would suggest you use MeteorPad.com, it’s like JSFiddle for Meteor.