Articles in this section

Comment handlebars

Handlebars supports multiple code comment styles in a unique way. Be cautious about selecting the style of code comment as the end braces }} may be interpreted differently based on placement. Use of the exclamation point is critical in commenting out either an individual expression or several lines of code:

{{#each custom_fields}}{{name}}{{!address}}{{!city}}{{!state}}{{!zip}}

Standard Handlebars expression:

 {{expression}}

Handlebars commented expression:

{{!expression}} (note the exclamation !)

Standard Handlebars code comment:

{{!-- Your comment here --!}}

Code Comment examples

{{! This comment will not show up in the output }}
{{!-- This comment will not show in the output --!}
{{! --This {{!comment}} will not show up in the output }}
{{! --This {{comment}} may result in the compiler evaluating everything 
after the second set of braces }} and thus throwing a compilation error.