can
Version:
MIT-licensed, client-side, JavaScript framework that makes building rich web applications easy.
16 lines (13 loc) • 615 B
Markdown
EJS.prototype.render render
can.EJS.prototype 0
Render a view object with data and helpers.
`ejs.render(data[, helpers])`
{Object} [data] The data to populate the template with.
{Object.<String, function>} [helpers] Helper methods referenced in the template.
{String} The template with interpolated data.
Renders an object with view helpers attached to the view.
var rendered = new can.ejs({text: "<h1><%= message %>"</h1>}).render({
message: "foo"
},{helper: function(){ ... }})
console.log(rendered); // "<h1>foo</h1>"
can.