以前在jsfiddle上工作的emberjs1.0-pre表单返回“错误”:“请使用POST请求” [英] Previously working emberjs1.0-pre form on jsfiddle returns "error": "Please use POST request"

查看:96
本文介绍了以前在jsfiddle上工作的emberjs1.0-pre表单返回“错误”:“请使用POST请求”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此代码** 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 button Also 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. 您实际上并没有使用1.0,您正在使用主。

  2. 在主服务器中,您需要调用 App.initialize()用于事件侦听器工作

  3. 您不应该设置 {{action} } 帮助器上的按钮。表单视图已经有一个提交方法,当表单上发生提交事件时,该方法将自动调用。 li>
  4. valueBinding 有一个问题。如果您删除 id =new-todo,它似乎是一个Ember错误。

  5. 解决所有这个,我也看到一个Metamorph错误。我没有尝试调试比这更远,因为你现在可能应该使用1.0 pre。

  1. You're not actually using 1.0 pre, you're using master.
  2. In master, you need to call App.initialize() for event listeners to work
  3. You shouldn't be setting up an {{action}} helper on the button. The form view already has a submit method that will automatically be called when the submit event happens on the form.
  4. There's an issue with the valueBinding. It appears to be an Ember bug as it works if you remove the id="new-todo".
  5. 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请求”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆