如何让我的web api理解ember数据返回的格式?
ember数据发送方式如下:
{client: {firstName:"",lastName:""}}
据我所知,web api正在寻找
{firstName:"",lastName:""}
答案 0 :(得分:1)
App.ApplicationSerializer = DS.RESTSerializer.extend({
serializeIntoHash: function (hash, type, record, options) {
Ember.merge(hash, this.serialize(record, options));
}
});