A few useful SystemJS loader plugins for loading various resources
Basic Handlebars template loading, exports the template function
Hello, {{name}}!
var hbs = require("./test1.hbs!");
alert(hbs({name: "World"}));
Loads a number of Handlebars templates from a HTML file, exports a hash of template functions keyed by 'id'.
<script id="hello" type="text/x-handlebars-template">
Hello, {{name}}
</script>
<script id="goodbye" type="text/x-handlebars-template">
Goodbye, {{name}}
</script>
var hbs = require("./test2.html!hbss");
alert(hbs.hello({name: "World"}));
alert(hbs.goodbye({name: "World"}));
Loads CSS as text and inserts it as a <style>
rather than referencing in a <link>
.