You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be really neat if Handlebars.js would support If statements with logic expressions in templates by default, without helpers. Then I could do amazing things, like this:
This greatly complicates that language and is something that we do not wish to implement as all functionality can be implemented via subexpressions and is far more extensible. #616 has some discussion on this. Helpers can be implemented to do things such as {{#if (equal a b)}}.
I, too, wish for basic comparisons in Handlebars. I understand the logicless philosophy. I also believe basic comparison support would be more intuitable and allow users to work more efficiently. If users in mass are moving basic comparison logic to a helper, this philosophy isn't doing them a favor or dissuading a perceived suboptimal behavior—it's just creating more work.
It would be really neat if Handlebars.js would support If statements with logic expressions in templates by default, without helpers. Then I could do amazing things, like this:
Also see this blog post on the issue.
The text was updated successfully, but these errors were encountered: