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

后端 未结 3 2482
面向向阳花
面向向阳花 2021-02-19 22:22

Is there a way to make the entire Angular form read only and then editable when clicking edit?

3条回答
  •  遥遥无期
    2021-02-19 23:02

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

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

提交回复
热议问题