Return partial template when using AMD
baluubas opened this issue · 0 comments
baluubas commented
I'd love to see the possibility of returning a partial template when wrapping with AMD.
For example something like this:
partials.push('var partialTemplate = ' + compiled + ';');
if (options.partialsUseNamespace === true) {
partials.push('Handlebars.registerPartial('+JSON.stringify(filename)+', '+nsInfo.namespace+'['+JSON.stringify(filename)+'] = partialTemplate);');
} else {
partials.push('Handlebars.registerPartial('+JSON.stringify(filename)+', partialTemplate);');
}
if(options.amd && options.namespace === false) {
partials.push('return partialTemplate;');
}