Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return partial template when using AMD #76

Open
baluubas opened this issue Nov 1, 2013 · 0 comments
Open

Return partial template when using AMD #76

baluubas opened this issue Nov 1, 2013 · 0 comments

Comments

@baluubas
Copy link

baluubas commented Nov 1, 2013

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;');
}
ade added a commit to ade/grunt-contrib-handlebars that referenced this issue Jul 31, 2015
ade added a commit to ade/grunt-contrib-handlebars that referenced this issue Jul 31, 2015
ade added a commit to ade/grunt-contrib-handlebars that referenced this issue Jul 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant