3 ms·
I think the reason is Handlebars is supposed to look and act like Mustache and templates aren't named in Mustache, so they don't get named in "regular" Handleba
by nfriedly 14y ago
I think the reason is Handlebars is supposed to look and act like Mustache and templates aren't named in Mustache, so they don't get named in "regular" Handlebars:
var getHtml = Handlebars.compile("<div>yad yada...</div>");
And then following the rule of least surprise, if templates aren't partials during normal usage, then they shouldn't be with precompilation.
At least that's my guess. I didn't figure out my trick until digging through the source to figure out what was different. (Not much - just how/where they're stored & referenced.)
- ahoge 14y agoAhm... yea, I forgot that I put them into `Handlebars.templates` myself if they aren't there yet (i.e. during development).