I have encountered a problem with an ng-if statement in my HTML code and I can't seem to figure out why it's not working.
The code snippet looks like this:
<div class="new-asset" data-ng-if="$root.questionData.question_type_id != '1' || $root.questionData.question_type_id != '8'">
Despite trying different variations of the condition, such as:
<div class="new-asset" data-ng-if="($root.questionData.question_type_id != '1' || $root.questionData.question_type_id != '8')">
None of them seem to work. I even attempted moving the condition logic to the controller, but faced issues due to asynchronous loading and dependencies.
While troubleshooting, I noticed that when I remove one of the conditions from the OR statement and keep only one, the code works fine:
<div class="new-asset" data-ng-if="$root.questionData.question_type_id != '1' || $root.questionData.question_type_id != '8'">
Any guidance or assistance on resolving this issue would be greatly appreciated. Thank you.