Chapter 3. Working with templates
This chapter covers
- Creating templates
- Using Meteor’s default templating syntax
- Organizing JavaScript and HTML
- Using event maps to make templates interactive
- Understanding the template life cycle
Everything your web browser renders is HTML eventually. If you open any website in source view you’ll find that each page has hundreds of lines of HTML. Not only is writing everything by hand tedious, error-prone, and highly inefficient, it’s also impossible when you’re working with web applications because much of the content is dynamic and you can’t know in advance what exact code needs to be rendered.
Templates allow you to define blocks of HTML that can be reused as often as you like. As a result, you have ...
Get Meteor in Action now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.