如何始终启用角度可编辑的编辑状态

问题描述:

我正在使用angular-xeditable编辑表单中的元素.我希望所有元素始终处于可编辑"模式,例如在用户开始编辑之前,无需按下编辑"按钮.

I am using angular-xeditable to edit elements within a form. I would like to have all the elements in "editable" mode at all times, e.g. no "edit" button needs to be pushed before the user starts editing.

我一直试图在控制器中使用$ show()来启用表单中的元素,但是似乎元素再次进入查看状态,例如,当尝试保存值时使用"onaftersave"等

I have been trying to use the $show() in my controller to enable the elements in the form, however it seems like the elements goes into viewing state again for example when using "onaftersave" when trying to save the values etc.

我如何做才能始终处于编辑模式,而用户永远不需要启用编辑就可以开始编辑值?

How do I do in order to always be in edit mode where the user never needs to enable editing in order to start editing the values?

可能尝试在HTML中添加shown=true:

Possibly try adding shown=true in your html:

<form editable-form shown="true">