How can I disable my checkbox from AngularJS input? How can I disable my checkbox from AngularJS input? angularjs angularjs

How can I disable my checkbox from AngularJS input?


You need to use ng-disabled="expression" directive, on basic of expression evaluation value it add disabled attribute to that element.Also for better attribute values evaluation you could use ng-attr directive

Markup

<input type="checkbox" ng-attr-name="{{x.filenumber}}" ng-attr-id="{{x.id}}" class ="pdffiles" value="101SP{{x.initials}}.dwg" ng-disabled="x.status == 'disabled'"/>

If x.status does return a bool value then you could directly used ng-disabled="{{x.status}}"