Angular: Empty Fiddle
http://angularjs.org/
HTML
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script>
<div ng-controller="MyCtrl">
<button ng-style="ngStyleDisabled(item.is_active)">Action Button</button>
</div>
JavaScript
var myApp = angular.module('myApp',[]);
//myApp.directive('myDirective', function() {});
//myApp.factory('myService', function() {});
myApp.controller('MyCtrl', ['$scope', function($scope) {
$scope.item = {
'is_active': 0
};
$scope.ngStyleDisabled = function(status) {
if (status == 1) {
return {};
} else if (status == 0) {
return {
'cursor': 'not-allowed',
'pointer-events': 'none'
};
}
};
}]);