Just started using Meteor so that I could skip something basic. In Meteor 1.2, they have the {{@index}} directive.
In the template, if I have:
... {{#each items}} {{@index}} {{> childTemplate}} {{/each}} ... <template name="childTemplate"> {{@index}} </template>
@index in the main template will work, but the one in the childTemplate will not. The work I did to use it was a call to childTemplate going through @index :
{{> childTemplate @ index=@index }}
Is this the right way to do this? Or is there something more meteoric?
source share