Skip to content

Instantly share code, notes, and snippets.

@gabrielhpugliese
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabrielhpugliese/d5c8070474117fdad33f to your computer and use it in GitHub Desktop.
Save gabrielhpugliese/d5c8070474117fdad33f to your computer and use it in GitHub Desktop.
Trying to find a good way to append Blaze templates to custom divs
$(function() {
$.each(Template, function (name, tmpl) {
if (name.indexOf('__') === -1) {
UI.insert(UI.render(tmpl), $('#' + name + '-spacebars').get(0));
}
});
});
<div id="main-spacebars">
<script type="text/spacebars" name="main">
You spent <b>{{seconds}}</b> seconds on this page.
</script>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment