<span class="column__list--total fa" ng-class="{'fa-check': skill.done == 1, 'fa-times red': skill.done == 0}" ng-click="skill.disabled || toggleSkill(skill.id, person.id)" ng-hide="$root.user[0].auth == 2"></span>
<span class="column__list--total fa" ng-class="{'fa-check': skill.done == 1, 'fa-times red': skill.done == 0}" ng-show="$root.user[0].auth == 2"></span>
I am currently using the code above. Both elements appear the same visually, but one is hidden when a certain variable equals 2.
This setup allows me to disable the ng-click
functionality on the element based on the condition mentioned earlier.
I wonder if it's possible to achieve the same effect by disabling ng-click
directly when $root.user[0].auth == 2
, instead of having two separate elements.