Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/itsthatguy/sails-hook-handlebars
https://github.com/itsthatguy/sails-hook-handlebars
Last synced: about 6 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/itsthatguy/sails-hook-handlebars
- Owner: itsthatguy
- Created: 2015-03-27T20:40:00.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-03-27T20:48:50.000Z (over 9 years ago)
- Last Synced: 2024-04-08T16:21:35.010Z (7 months ago)
- Language: JavaScript
- Size: 117 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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:
```javascript
sails.hook.handlebars.render(, );
```## example:
### template file
```handlebars
{{!-- assets/templates/myTemplate.hbs --}}Hello. My name is {{name}}.
```### javascript file
```javascript
sails.hook.handlebars.render('myTemplate', {name: "Kevin"});
```