How to load multiple templates from handlebars.js partial
问题 Is there an easy way to load a partial, with multiple templates in it, using handlebars.js, just like you can do it using mustache.js and the jQuery plugin from "jonnyreeves" e.g: $.Mustache.load('./templates/greetings.htm').done(function () { $('body').mustache('simple-hello', viewData); }); 回答1: In Handlebars.js you need to register each partial, using Handlebars.registerPartial You can do it like this: Javascript $(document).ready(function() { //Get template from server $.get("http:/