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

Partials #6

Closed
justinmc opened this issue Nov 12, 2014 · 1 comment
Closed

Partials #6

justinmc opened this issue Nov 12, 2014 · 1 comment

Comments

@justinmc
Copy link

Does browserify-handlebars support partials? I tried using Handlebars.registerPartial('myPartial', myPartialTemplate()), but I got the error The partial myPartial could not be compiled when running in runtime-only mode.

I'm requiring handlebars like this require('handlebars/runtime').default as noted in issue #1.

@ndesorden
Copy link

Maybe a little late, but:

var handlebars = require('handlebars/runtime').default;
var template = require('../views/template.handlebars');
var templatePartial = require('../views/template-partial.handlebars');
handlebars.registerPartial('myPartial', templatePartial);
var html = template(...);

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

2 participants