sails-hook-handlebars
v0.0.2
Published
Allows using handlebars on the backend for templating dynamic data. (for use with sailsjs)
Downloads
2
Readme
sails-hook-handlebars
Allows using handlebars on the backend for templating dynamic data. (for use with sailsjs)
installation:
npm install sails-hook-handlebars --save
usage:
sails.hook.handlebars.render(<templatePath>, <context>);
example:
template file
{{!-- assets/templates/myTemplate.hbs --}}
Hello. My name is {{name}}.
javascript file
sails.hook.handlebars.render('myTemplate', {name: "Kevin"});