In meteor, I can install various template helpers, for example:
Template.story.title = function () { return "title"; }; <template name="story"> <h3>{{title}}</h3> <p>{{description}}</p> </template>
This is great, but if I have many variables, I would not want to set them separately, I want to transfer the context to the main template.
How to do it?
Template.story.data = function () { return {title:"title", description:"desc"}; }; <template name="story"> <h3>{{title}}</h3> <p>{{description}}</p> </template>
This does not work. THANKS
javascript meteor
Harry
source share