I am using Angular 1.5 and I have a use case where I want to add directive attributes to HTML conditionally.
To illustrate: if condition is true, want the directive1 and directive2 to be added as an attribute.
<ng-form class="myForm" directive1 directive2>
and when condition is false, I want the directive3 and directive4 to be added as an attribute
<ng-form class="myForm" directive3 directive4>
I have tried doing conditional logic directly but this did not work:
<ng-form class="myForm" {{ condition ? directive1 directive2 :directive3 directive4 }}>
Does anyone has a suggestion to achieve this easily?