I\'ve been experimenting with Meteor and ran into something I couldn\'t figure out. For fun, I was trying to make a slot machine. I had the following HTML:
&
All of the previous answers are overkill or outdated. Here's how you can pass static parameters into templates, directly from HTML+Spacebars code, as of Meteor 0.8.x:
{{> slot number="1"}}
{{> slot number="2"}}
...
{{number}}
All you have to do is pass key="value" parameters in the {{> template}} inclusion call:
{{> slot number="1"}}
Learn more at Spacebars Secrets: Exploring Meteor Templates.
If you want to pass the caller template's data to the child/nested/called template, here's how to do it: pass nothing. Instead, from the nested template, access the parent data context, ../:
{{> slot number="1"}}
{{> slot number="2"}}
...
Machine name: {{../name}}
{{number}}