Skip to main content
Version: 2.x.x

Rendering

Rendering a template compiles a template and then calls it with the data you pass to it.

Syntax

TypeDoc doc page

Example

var myTemplate = 'Hi, my name is <%= it.name %>'
Eta.render(myTemplate, { name: 'Johnny Appleseed' })

// Returns "Hi, my name is Johnny Appleseed"