handlebars-helper-partial
Handlebars helper for rendering partials.
npm
Install withnpm i handlebars-helper-partial --save
Usage
var helper = ;
Handlebars example
var handlebars = ; // 1. pass your instance of handlebarsvar helper = handlebars; // 2. register the helper, name it whatever you wanthandlebars; // 3. register some partialshandlebars; // 4. use in templateshandlebarstext: 'Click me!';//=> '<button>Click me!</button>'
Pass a specific context to the partial:
handlebarsa: b: c: text: 'Click me!';//=> '<button>Click me!</button>'
Related projects
- handlebars-helpers: 120+ Handlebars helpers in ~20 categories, for Assemble, YUI, Ghost or any Handlebars project. Includes helpers like {{i18}}, {{markdown}}, {{relative}}, {{extend}}, {{moment}}, and so on.
- template-helpers: Generic JavaScript helpers that can be used with any template engine. Handlebars, Lo-Dash, Underscore, or any engine that supports helper functions.
Running tests
Install dev dependencies.
npm i -d && npm test
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Author
Jon Schlinkert
License
Copyright (c) 2015 Jon Schlinkert
Released under the MIT license
This file was generated by verb-cli on March 13, 2015.