mercredi 18 novembre 2015

ng-readonly not working in angular checkbox

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




Aucun commentaire:

Enregistrer un commentaire