lundi 22 décembre 2014

Error evaluating App.Product.findQuery

I'm trying to get data from an API like this:



App.Store = DS.Store.extend({
revision: 12,
adapter: DS.RESTAdapter.create({
host: 'http://ift.tt/1HrEJSH'
})
});

App.Product = DS.Model.extend({
name: DS.attr('string')
});

App.ApplicationRoute = Ember.Route.extend({
model: function () {
return App.Product.findQuery({show: 'sku,name', format: 'json', apiKey: 'MyApIkEy123'});
}
});


The error I get in the console is:


Error while processing route: index undefined is not a function (evaluating 'App.Product.findQuery({show: 'sku,name,salePrice', format: 'json', apiKey: 'MyApIkEy123'})')





Aucun commentaire:

Enregistrer un commentaire