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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With