具有可编辑元素的表单在angular-x-editable示例代码中应具有`editable-form`属性

Bif*_*ffy 2 javascript angularjs x-editable

我有一个问题,当我在我自己的项目中尝试x-editable提供的示例代码时:当我尝试在我自己的应用程序中的JSFiddle中完美运行的代码时(只有像控制器名称这样的小修改),我得到了此错误消息:

    Form with editable elements should have `editable-form` attribute. <span class="ng-scope ng-binding editable" editable-text="user.name" e-name="name" e-form="rowform" onbeforesave="checkName($data, user.id)" e-required=""> angular.js:11707:18

Form with editable elements should have `editable-form` attribute. <span class="ng-scope ng-binding editable" editable-select="user.status" e-name="status" e-form="rowform" e-ng-options="s.value as s.text for s in statuses"> angular.js:11707:18

Form with editable elements should have `editable-form` attribute. <span class="ng-scope ng-binding editable" editable-select="user.group" e-name="group" onshow="loadGroups()" e-form="rowform" e-ng-options="g.id as g.text for g in groups"> angular.js:11707:18

Form with editable elements should have `editable-form` attribute. <span class="ng-scope ng-binding editable" editable-text="user.name" e-name="name" e-form="rowform" onbeforesave="checkName($data, user.id)" e-required=""> angular.js:11707:18

Form with editable elements should have `editable-form` attribute. <span class="ng-scope ng-binding editable" editable-select="user.status" e-name="status" e-form="rowform" e-ng-options="s.value as s.text for s in statuses"> angular.js:11707:18

Form with editable elements should have `editable-form` attribute. <span class="ng-scope ng-binding editable" editable-select="user.group" e-name="group" onshow="loadGroups()" e-form="rowform" e-ng-options="g.id as g.text for g in groups"> angular.js:11707:18

Form with editable elements should have `editable-form` attribute. <span class="ng-scope ng-binding editable" editable-text="user.name" e-name="name" e-form="rowform" onbeforesave="checkName($data, user.id)" e-required=""> angular.js:11707:18

Form with editable elements should have `editable-form` attribute. <span class="ng-scope ng-binding editable" editable-select="user.status" e-name="status" e-form="rowform" e-ng-options="s.value as s.text for s in statuses"> angular.js:11707:18

Form with editable elements should have `editable-form` attribute. <span class="ng-scope ng-binding editable" editable-select="user.group" e-name="group" onshow="loadGroups()" e-form="rowform" e-ng-options="g.id as g.text for g in groups">
Run Code Online (Sandbox Code Playgroud)

它阻止我编辑表中的行

这是我用过的小提琴:http: //jsfiddle.net/NfPcH/93/

我在github上阅读了关于这个问题的整个帖子,但没有一个解决方案适合我.怎么可能这个代码在jsfiddle上没有问题而在我的项目中没有问题?这可能是配置问题吗?我使用最新版本的xeditable通过凉亭.

如果有人给我一个提示或指出我正确的方向,我真的很感激.

Bif*_*ffy 6

好的,我解决了我的问题.如果你有类似的问题,这可能会有所帮助:

在我的应用程序中,有另一个标记包围了大部分网站,包括xeditable表.这会导致xeditable的麻烦.所以错误信息恰到好处.我通过删除此表单解决了这个问题.另一种方法是使外部表单也可编辑.

因此,如果您遇到相同的错误消息,请务必查看您的html源代码并查找标记.