I am using express-handlebars
and have the following minimal template:
<!DOCTYPE html>
<html>
<body>
{{#if page === 'help'}}YAAAY{{/if}}
</body>
</html>
This fails to parse with:
Error: C:\Users\mike\myapp\views\error.hbs: Parse error on line 6:
...ody> {{#if page === 'help'}}YAAAY{{/i
---------------------^
I understand handlebars isn't expecting an ===
, but isn't that the point of if
?
How can I use an if
statement in handlebars?