I am facing a challenge where I need to add 2 different class names under specific conditions to an element:
ng-class="(commentItem.comment | escapeHtml | direction)"
The first condition works well, as it retrieves the text content of the given HTML string using the "escapeHtml" filter and then determines the direction of the text using the "direction" filter. Now, I also need to add another class to the same element based on this condition:
ng-class="{'hidden': commentItem.isEditing}"
How can I combine both conditions within a single ngClass directive?
Note
I believe using the syntax {"exp1": condition1, "exp2": condition2} may not be feasible in this case because the filter in the first condition already returns the class name.