O'Reilly logo

Meteor: Full-Stack Web Application Development by Marcelo Reyna, Isaac Strack, Fabian Vogelsteller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Inserting templates with Spacebars

Spacebars is Meteor's templating language. All Document Object Model (DOM) elements in Meteor are created programmatically using Meteor's default templating engine, Blaze. Elements can therefore be created using pure JavaScript. Using JavaScript to create HTML elements, however, isn't exactly quick and easy.

Inspired by the popular HTML templating language Handlebars, Spacebars makes it incredibly easy to structure and declare your HTML elements using templates. And, it gives you access to all the reactive and dynamic features of Meteor. This recipe will show you how to create templates using the Spacebars syntax.

Getting ready

You will need Meteor installed and have a project created. We recommend that you have ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required