如何知道事务提交失败的时间?
var obj = App.store.findAll(App.Todo).get('firstObject');
var t = App.store.transaction();
t.add(obj);
obj.set('summary','New Summary');
t.commit();
// 403 or 401 is returned from the server (request failed)
a.get('isLoading'); // true
a.get('isError'); // false用例:我希望用户看到他的操作(保存对象)失败了。
发布于 2012-09-13 20:32:22
事实上,到目前为止,ember-data的RESTAdapter不会处理提交请求中的错误。
你可能会对the following PR感兴趣,它提出了错误处理支持。
https://stackoverflow.com/questions/12391139
复制相似问题