Conversation
Added "getTemplate" to use this cool jQuery extension with Hogan.JS.
Example:
$.Mustache.load('./templates.htm').done(function() {
var template = $.Mustache.getTemplate('plaintext');
var compiledTemplate = Hogan.compile(template);
var renderedTemplate = compiledTemplate.render();
console.log(renderedTemplate);
});
|
Hi @bennyn, thanks for the Pull Request. I am hesitant to add additional methods to the API, especially a I am however interested in being able to support alternative templating engines; in the 0.3-dev branch I have started looking at how the templating engine (Mustache.js) could be extracted to allow alternative engines (like Hogan) to be used. I will see if I can put some extra time into these ideas, and hopefully this will meet your particular use case. Please let me know if you feel there's a compelling reason for adding Jonny. |
|
In the mean-time, you can access a template via ... sorry, scratch that, templates() just returns an Array of template names (: |
Added "getTemplate" to use this cool jQuery extension with Hogan.JS.
Example: