Extra Layer for your favorite templating engine.
More details here: http://boertel.github.com/Barbe.js/
The main features are:
same as ICanHaz.js - https://github.com/HenrikJoreteg/ICanHaz.js
<script id="template-name" type="text/html" data-anchor="anchor-name">...</script>
success: function (response) {
...
[return response;]
}
<div class="barbe-loader"></div>
var engine = {};
engine.mustache = {
render: Mustache.to_html,
compile: undefined,
type: ['text/html']
};
engine.hogan = {
render: function (self, context, partials) {
return self.render(context, partials);
},
compile: function (str) {
return Hogan.compile(str);
},
type: ['text/html']
};
engine.handlebars = {
render: function (self, context, partials) {
return self(context);
},
//compile: Handlebars.compile,
compile: function (str, name) {
Handlebars.registerPartial(name, str);
return Handlebars.compile(str);
},
type: ['text/html']
};