Skip to content

zoxjs/zox-handlebars

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Handlebars Rendering Engine Plugin for Zox

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published