Search code examples
javascriptgruntjshandlebars.jsassemble

Are there any helpers that permit handlebars bindings to be ignored / not compiled?


I'm using assemble with grunt to build handlebars templates, but I've got some areas that I don't want to be compiled, so that they can be rendered afterwards in the browser.

Are there any special tags/helpers that can do that ?


Solution

  • You can escape the handlebars so they're excluded during the assemble build, then use them in the frontend...

    {{! rendered by assemble }}
    <h1>{{foo}}</h1>
    
    \{{! rendered on the browser }}
    <h2>\{{bar}}</h2>