Skip to content

Instantly share code, notes, and snippets.

@d48
Last active December 17, 2015 20:19
Show Gist options
  • Save d48/5666791 to your computer and use it in GitHub Desktop.
Save d48/5666791 to your computer and use it in GitHub Desktop.
assign loaded dependencies to params in function callback
bls.utils().require( ['/path/to/handlebars.js', '/path/to/template.html'], function( hb, template1) {
// use handlebars via hb var
hb.compile(someTemplateVar, data);
// use template via template1 var
document.getElementById(templateHandle).innerHTML = template1;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment