src code

instance method Spah.DOM.Document#addTemplate

Spah.DOM.Document#addTemplate(name, body, type) → void

name (String): A unique name for this template body (String): The template itself type (String): The rendering engine that should be used to render this template. Underscore, Mustache and Handlebars templates are all supported. The default type is “Mustache” - pass “Handlebars” if you want to use Handlebars for rendering this template.

This method is only present if the “Populate” modifier is registered on the document (this is enabled by default.)

Adds a template to the document, ready to be used by the Populate modifier when rendering templated content.