This is my form
<form name="myForm">
<input ng-disabled="true" type="text" >*
</form>
However I am trying to understand why this input field is not disabled?
I also tried with a $scope, so in the CTRL:
$scope.diss=true;
and in html :
<form name="myForm">
<input ng-disabled="diss" type="text" >*
</form>
It still doesnt work, any hint?
Here's a simple working example of the ng-disabled
directive:
<form ng-app>
<input ng-disabled="checked" type="text" />
Click me to disable: <input type="checkbox" ng-model="checked"><br/>
</form>
I could not use ng-disabled with angular prior to version 1.2.x (I am on 1.0.8) because my jQuery version was 1.4.2.
angularJS 1.0.x requires jQuery 1.6 or newer.
Upgrading either your jQuery or angularJS will fix the issue - angularJS 1.2.x detects your jQuery version and will fallback to its internal jQLite.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With