I'm using Jaggery.js
writing a web app and using caramel
as the MVC framework. Caramel uses Handlebars as the render engine so that we can use any built in helpers provided by handlebars, such as {{#each}}, {{#if}}
, etc.
But how can I write my custom helpers and register in caramel, so caramel can use it render in the template ?
Is there any samples regarding this ?
Thanks in advance!
I found a way to register handlebars helper in caramel and it can work, but not sure whether is the normal and correct solution.
What i was doing is register the helper in the caramel theme.js (jaggeryapps\myapp\themes\mytheme\theme.js), code is like below: