how to write nested if conditition in ember htmlBars
<div {{bind-attr class=":class1 flag1:'acitve': flag2::'disabled'"}}>
below is ember verison
DEBUG: Ember : 1.13.0 Ember Data : 1.13.7 jQuery : 1.11.1
If you are using Ember 1.13, you should no longer be using bind-attr. Having said that, I don't see a nested if condition, and I just tried the code you have and it worked.
bind-attr
Here's how to do it in newer syntax:
<div class="class1 {{if flag1 'active'}} {{unless flag2 'disabled'}}"> … </div>
Copyright © 2021 Jogjafile Inc.
If you are using Ember 1.13, you should no longer be using
bind-attr
. Having said that, I don't see a nested if condition, and I just tried the code you have and it worked.Here's how to do it in newer syntax: