AngularJS Directives

AngularJS Filters and Elements

AngularJS Tutorials

AngularJS ng readonly Directive

AngularJS ng-readonly Directive



The ng-readonly directive sets the readonly attribute of a form field. If the ng-readonly returns true, then the form field will be readonly. It is necessary as it is more flexible than a simple readonly attribute as we can change its value from true to false and vice versa. It is used in input and textarea.




< input ng-readonly="expression" >< /input >


Further Explanation:-


Value Description
expression An expression that will set the element readonly attribute if it returns true.

Code Explanation

All Tutorials related to AngularJS Directives

All Sections related to AngularJS