作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当我在自己的项目中尝试 x-editable 提供的示例代码时,我遇到了一个问题:当我在我自己的应用程序中尝试在 JSFiddle 中完美运行的这段代码时(只有一些小的修改,例如 Controller 的名称),我收到此错误消息:
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">
它阻止我编辑表格中的一行
这是我使用的 fiddle : http://jsfiddle.net/NfPcH/93/
我通读了 github 上关于这个问题的整个帖子,但没有一个解决方案对我有用。这段代码怎么可能在 jsfiddle 上没有问题但在我的项目中没有问题?会不会是配置问题?我通过 bower 使用最新版本的 xeditable。
如果有人给我提示或指出正确的方向,我将不胜感激。
最佳答案
好的,我解决了我的问题。如果您有类似的问题,这可能会有所帮助:
在我的应用程序中,还有另一个标签包围了大部分网站,包括可编辑表。这会给 xeditable 带来麻烦。所以错误信息是正确的。我通过删除此表单解决了它。另一种方法是使外部表单也可编辑。
因此,如果您遇到相同的错误消息,请务必检查您的 html 源代码并查找标签。
关于javascript - 具有可编辑元素的表单在 angular-x-editable 示例代码中应具有 `editable-form` 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32483680/
我是一名优秀的程序员,十分优秀!