jsFiddle Example: Loading Mustache Partial Templates Via Ajax
- July 7, 2014 3:49 PM
- Templating, Examples & Tutorials, jQuery, Javascript
- Comments (2)
Mustache is a great, simple, templating language, but the JS implementation (https://github.com/janl/mustache.js) doesn't make it clear that not only can you load partial templates dynamically, you can load them via Ajax (just not asynchronously). This is an example of using a function instead of an object as the partial argument to Mustache's .render() method.