mardi 6 janvier 2015

Ember data load model from DS.PromiseArray

I want to load Ember model using Ember query record.


my code:



model: function(params) {
return this.store.find("user", {username: params.username}).then(function(result){
return result.get('firstObject');
});
},


I am using ActiveModel Adapter.


In console i see "generated -> route:login Object {fullName: "route:login"}"


on debugging, I can see result.get('firstObject') is getting loaded properly but setupController is not called.





Aucun commentaire:

Enregistrer un commentaire