In regular handlebars I was able to do:
<div {{bind-attr class="model.isNew:new:old"}}>
How can I do this in Htmlbars? I tried this but it didn't work.
<div class="{{model.isNew:new:old}}">
This was mentioned in the 1.10 release/1.11 beta blog post:
<div class="{{if model.isNew 'new' 'old'}}">
You can also still use the {{bind-attr}}
helper, although I think it might be deprecated.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With