How to make an angular form read-only and make it an editable edit button?

Is there a way to make the entire Angular form read-only and then edit when I click on the edit?

+8
angularjs
source share
2 answers

You can individually disable all form elements, as suggested in the current answer / comments, or you can wrap all your form elements in a <fieldset> (more) , and then enable / disable everything in one step:

 <form> <fieldset ng-disabled="myBooleanValue"> <input type="text"> </fieldset> </form> 
+19
source share

You can add ng-disabled="someBoolean" to your form elements and set someBoolean to true when you click the button.

https://docs.angularjs.org/api/ng/directive/ngDisabled

+3
source share

All Articles