vendredi 19 août 2016

Composing promises in Ember

I'm having some problems with composing promises in Ember (I guess). Following the Rookie mistake #1 from here I wrote:

.then(
      () => {
        return this.get('store').findRecord('staffMember', 13);
      }
     )
.then(
      record => {
        console.log(record);
      }
    );

As I understand the second then should be called only when the findRecordis resolved and it should show the record retrieved. Instead it shows the promise in the console. Why?




Aucun commentaire:

Enregistrer un commentaire