To prevent disable-based ng-click functionality, you can do the following: -
<div ng-repeat="item in list.items" ng-disabled="item.condition" ng-click="goToFunction(item)"> item.value </div> $scope.goToFunction = function(item){ if(item.condition == false){ // Dont do anything }else{ //do something }
In this case, when the div is disabled, the click function will do nothing, otherwise it will do.
source share