问题描述
此代码** http://jsfiddle.net/wagenet/ACzaJ/8/ **正在工作几天前,当我今天回到这里,它会引发 {错误:请使用POST请求} ,当我点击添加按钮
另外jsfiddle editor.js总是在这行上抛出异常:
function stop(){cc = stop;抛出StopIteration;};
有没有人知道这个问题的原因。
This code ** http://jsfiddle.net/wagenet/ACzaJ/8/ ** was working a few days ago, when i returned to it today, it throws {"error": "Please use POST request"}, when i click add buttonAlso the jsfiddle editor.js always throws exception on this line:function stop(){cc = stop; throw StopIteration;};Does anyone knows the cause of this issue.
非常感谢
更新
请向下滚动查看我发布的许多更新,作为补充彼得的初始
Kindly scroll down to see the many updates i posted as an answer to supplement Peter's initial answer.
推荐答案
这里有一些问题。 b
There are a number of problems here.
- 您实际上并没有使用1.0,您正在使用主。
- 在主服务器中,您需要调用
App.initialize()
用于事件侦听器工作 - 您不应该设置
{{action} }
帮助器上的按钮。表单视图已经有一个提交
方法,当表单上发生提交
事件时,该方法将自动调用。 li>
-
valueBinding
有一个问题。如果您删除id =new-todo
,它似乎是一个Ember错误。 - 解决所有这个,我也看到一个Metamorph错误。我没有尝试调试比这更远,因为你现在可能应该使用1.0 pre。
- You're not actually using 1.0 pre, you're using master.
- In master, you need to call
App.initialize()
for event listeners to work - You shouldn't be setting up an
{{action}}
helper on the button. The form view already has asubmit
method that will automatically be called when thesubmit
event happens on the form. - There's an issue with the
valueBinding
. It appears to be an Ember bug as it works if you remove theid="new-todo"
. - After resolving all of this, I was also seeing a Metamorph error. I didn't attempt to debug farther than this since you probably should just use 1.0 pre for now.
这篇关于以前在jsfiddle上工作的emberjs1.0-pre表单返回“错误”:“请使用POST请求”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!