Reputation: 9579
I have been studying the todos example for Meteor.
http://www.meteor.com/examples/todos
I vaguely understand how to use Template from the example. But where is this declared? I've tried looking at the packages that Meteor uses to find it. I've also searched Google, but there are too many templating systems.
Where is the best place to learn about Template and how it is used with Meteor?
Upvotes: 5
Views: 2015
Reputation: 11870
Take a look at the templating Smart Package in packages/templating
. It defines the Template
global.
Then, it scans all the .html
files in your project. For each <template>
tag, it compiles the body of the template into a function that returns HTML and stores that function as a property on Template. Later, your JS code will attach helper functions as properties of the Template function (like Template.my_template.my_helper
).
Currently, every template element is interpreted as Handlebars. That will change.
Upvotes: 7
Reputation: 1553
Handlebars is the only templating system right now. Templates are explained throughly in http://docs.meteor.com/#templates.
Today, the only templating system that has been packaged for Meteor is Handlebars.
Upvotes: 2