In my Angular 1.5 project, I am facing a scenario where I need to dynamically add directive attributes to HTML based on certain conditions.
For example, when the condition is true, I want to include directive1 and directive2 as attributes:
<ng-form class="myForm" directive1 directive2>
Conversely, when the condition is false, I wish to add directive3 and directive4 as attributes:
<ng-form class="myForm" directive3 directive4>
I attempted using ternary operators directly in the HTML but it did not yield the expected results:
<ng-form class="myForm" {{ condition ? directive1 directive2 :directive3 directive4 }}>
Can anyone provide me with a straightforward solution to tackle this issue?