query (store, type, query, recordArray) Promise
Defined in addon/adapter.js:154
This method is called when you call query on the store. Example app/adapters/application.js
import DS from 'ember-data';
export default DS.Adapter.extend({
query: function(store, type, query) {
return new Ember.RSVP.Promise(function(resolve, reject) {
Ember.$.getJSON(`/${type.modelName}`, query).then(function(data) {
resolve(data);
}, function(jqXHR) {
reject(jqXHR);
});