71104 / jquery-handlebars

A jQuery plugin to render Handlebars.js templates into elements
http://71104.github.io/jquery-handlebars
MIT License
100 stars 39 forks source link

Shorthand for registering partials at initialization didn't work for me. #4

Closed zigomir closed 10 years ago

zigomir commented 10 years ago

With settings like this

$.handlebars({
    templatePath: 'js/templates',
    templateExtension: 'hbs',
    partialPath: 'js/templates/partials',
    partialExtension: 'partial',
    partials: ['element'] // need to register partials
});

resolvePartialPath would always return empty string, since settings.partialPath was not set. Moving settings before registering partials (as you can see in my commit) worked for me. I tried also with separate registering and it worked. Hope I didn't break something else.

71104 commented 10 years ago

Right, thank you! I'm going to merge.