4
我正在使用Backbone.js并使用带有选项的提取,但它似乎没有得到错误或成功回调,但数据正在返回。Backbone.js获取回调
this.user.fetch({data: {username : this.username.val(), check : 'true'}}, {
error: function(model, response) {
console.log(response);
},
success: function(model, response) {
console.log(response);
}
});
这就是我所设置的,我错过了什么吗?它从来没有遇到错误或成功,但它确实做了ajax请求并且它正在返回数据。
谢谢!
啊,谢谢!它并没有返回实际的响应,而是发生在错误函数中,并且它从模型中返回一些验证响应。 – dzm 2012-04-06 03:07:42
这似乎是一个单独的问题。很高兴你有这个照顾! – x1a4 2012-04-06 04:14:52