良い一日だけのカスタムエンドポイントのペイロードを返し、その後、私はpushpayloadを作るが、私は店からのみペイロードにあるレコードとないすべてのレコードを返す方法。 emberのバージョン2.5には解決策がありますが、私は2.4を使用しています。エンバーは、私は、カスタムエンドポイントへのコールを作っています</p> <p>
私はどのようなワークフローを使用しますか?
アップデート1:ここでは
コードです:
export default Ember.Route.extend({
model(params) {
let adapter = this.store.adapterFor('category');
return Ember.RSVP.hash({
// Calling a custom endpoint
products: adapter.products(params.category_id).then((response)=>{
this.store.pushPayload('product', response);
return this.store.peekAll('product');
//Here is the problem.. i want just the payload records and no all records from store
})
});
}
});
2.5のソリューションは何ですか? – vikram7
詳細をお知らせください。コード? – hernanvicente
@ vikram7私は、質問の著者が 'ds-pushpayload-return'をより詳しく言及していると思います: http://stackoverflow.com/questions/36480907/ember-return-only-custom-endpoint-payload – hernanvicente