Edit This Code:
<!DOCTYPE html>
<html>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<body ng-app="">
Click here to make the input field readonly:<input type="checkbox" ng-model="all"><br>
<br>

<input type="text" ng-readonly="all">

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy