Issue
Can I use ng-readonly directive in a checkbox?
The checkbox is writable even after it is decorated with ng-readonly.
Html:
<input type="checkbox" ng-model="model" ng-readonly="test" /> {{model}}
Controller:
myApp.controller('MyCtrl', function($scope) {
$scope.test = true;
});
Added Fiddle
Solution
if you want to disable it use this:
<input type="checkbox" ng-disabled="true" ng-model="test" />
Answered By - macrog
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.