zox-handlebars
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

Handlebars support for Zox.js

npm i zox zox-plugins zox-handlebars

Use handlebars templates:

<div class="article">
    <h1>{{title}}</h1>
    {{#if date}}<p class="date">{{formatDate date 'default'}}</p>{{/if}}
    <div class="body">{{{body}}}</div>
</div>

Write custom helpers and decorators:

@HandlebarsHelper('ifEquals')
export class IfEqualsHelper implements IHandlebarsHelper
{
    public handle(context, lvalue, rvalue, options): string
    {
        return lvalue == rvalue ? options.fn(context) : options.inverse(context);
    }
}

Package Sidebar

Install

npm i zox-handlebars

Homepage

zoxjs.com/

Weekly Downloads

3

Version

1.0.4

License

MIT

Unpacked Size

14 kB

Total Files

9

Last publish

Collaborators

  • zoranravic