sails-hook-handlebars

0.0.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i sails-hook-handlebars

Weekly Downloads

0

Version

0.0.2

License

ISC

Last publish

Collaborators

  • itg