how to display a textbox in disabled and read-only to textbox in angularjs?

How to use ng-readonly and ng-disabled in angularjs?

how to display a textbox in disabled and read-only in angularjs?

Hello everyone, I am going to share the code sample for display a textbox in readonly mode using ng-readonly attribute and disabled  to button using ng- disabled in angularjs as given below.

The click for live plunker demo

The example for using ng-readonly and ng-disabled

<!doctype html>
<html lang="en" ng-app="">
    <meta charset="UTF-8">
    <title>how to disable and read-only text-box in angularjs?</title>
    <script src="//"></script>
<body ng-init="isDisabled = true">
    <h1>Check to checkbox for make readonly to the TextBox</h1>
    <input type="checkbox" ng-model="checked">Checked checkbox for Edit TextBox
    <input type="text" ng-readonly="!(checked)" value="" />
    <button ng-disabled={{isDisabled}}>Button</button>


The output go to link

Anil Singh is an author, tech blogger, and software programmer. Book writing, tech blogging is something do extra and Anil love doing it. For more detail, kindly refer to this link..

My Tech Blog -
My Books - Book 1 and Book 2 Powered by Blogger.