I have a situation where I need to make an image unclickable under certain circumstances, but I am struggling to find a way to do this using AngularJS:
<a href="#" ng-click="doSomething($event)">
<img src="myImage.png">
</a>
However, I would like to disable the click action on the image in some cases. Normally, I would use ng-disabled/enabled, but that doesn't work for anchor elements. Is there another method I can use to achieve this? This is what I have tried so far:
<a href="#" ng-click="doSomething($event)" ng-disabled="true">
<img src="myImage.png">
</a>
If anyone has any suggestions on how to accomplish this task, I would greatly appreciate it.