Rendering templates within helpers in handlebars
Hey guys! Because there seem to be no answer on this: Passing variables through handlebars partial yet, I'm currently working on a little workaround to get this work. So, the idea is to register a helper function which renders a specific template with possible values. A bit code makes it better to understand. This is how a I'd invoke my helper: <div> {{myHelper}} </div> This helper is registered with this little code: hbs.registerHelper(name, function (args) { args = args || {}; var template = hbs.compile(fs.readFileSync(__dirname + '/' + file, 'utf8')); return template(args); }); I put this