0.0.2 • Published 9 years ago

sails-hook-handlebars v0.0.2

Weekly downloads
3
License
ISC
Repository
github
Last release
9 years ago

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"});