Beware of whitespace lurking at the beginning of an expression. Whitespace placed before any symbol inside the handlebars will cause an error.
Correct:
{{expression}}{{dateFormat}}
Incorrect:
{{ expression}}{{ dateFormat}} // note the leading whitespace
Error:
{{expression {{field}} // second set of opening braces seen as new expression
Comments
Suggestion: rename this article to "Whitespace in Handlebar Expressions" or something. I thought this was how to deal with data whitespace with handlebars (i.e., trimming string variables of whitespace)
Please sign in to leave a comment.