Skip to content

Instantly share code, notes, and snippets.

@vadimdemedes
Last active December 15, 2015 07:09
Show Gist options
  • Save vadimdemedes/5220971 to your computer and use it in GitHub Desktop.
Save vadimdemedes/5220971 to your computer and use it in GitHub Desktop.
Rendering templates
var template = new Chute.View.Template({
html: '<h1>{{ title }}</h1>'
});
template.render({ title: 'I am a template' }, function(result){
// result contains rendered template, HTML code
console.log(result); // <div><h1>I am a template</h1></div>
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment