Last active
August 29, 2015 14:05
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
$.each(Template, function (name, tmpl) { | |
if (name.indexOf('__') === -1) { | |
UI.insert(UI.render(tmpl), $('#' + name + '-spacebars').get(0)); | |
} | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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