You could try to use ng-class
.
Here is my simple example:
http://plnkr.co/edit/wS3QkQ5dvHNdc6Lb8ZSF?p=preview
<div ng-repeat="object in objects">
<span ng-class="{'disabled': object.status}" ng-click="disableIt(object)">
{{object.value}}
</span>
</div>
The status is a custom attribute of object, you could name it whatever you want.
The disabled
in ng-class
is a CSS class name, the object.status
should be true
or false
You could change every object's status in function disableIt
.
In your Controller, you could do this:
$scope.disableIt = function(obj) {
obj.status = !obj.status
}