我有一个问题,当我在我自己的项目中尝试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">
它阻止我编辑表格中的行
这是我用过的小提琴: http://jsfiddle.net/NfPcH/93/
我在github上阅读了关于这个问题的整个帖子,但没有一个解决方案适合我。 怎么可能这个代码在jsfiddle上没有问题而在我的项目中没有问题?这可能是配置问题吗?我使用最新版本的xeditable通过凉亭。
如果有人给我一个提示或指出我正确的方向,我真的很感激。
答案 0 :(得分:1)
如果您在其他表单(嵌套表单)中使用<video id="really-cool-video" class="video-js vjs-default-skin" controls poster="@Model.MediaThumbnailUrl"
preload="auto" style="width: 100%; min-height: 380px; height: 100%;" autoplay
data-setup='{}'>
<source src="/api/Stream/myfilenamehere/mp4" type="video/mp4">
<p class="vjs-no-js">
To view this video please enable JavaScript, and consider upgrading to a web browser
that supports HTML5 video.
</p>
</video>
,则会发生此错误。我发现解决方案如下:issues #157。
使用<form editable-form></form>
代替普通<div ng-form editable-form></div>
代码可以解决此问题。