Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4829

[solved] findRecord then not waiting for resolve

$
0
0

@rafael wrote:

I have a findRecord method with the json api convention that looks like this:

this.store.findRecord('book', 2).then((book) =>{
    console.log(book.get('name'));
});

The console log is always printing undefined, but the name value is actually beeing send. book only returns the id and nothing more. I tested with Ember.$ ajax and I got everything. The model structure is also correct.

Is this the normal behavior? This is driving me mad for hours...
Thanks.

EDIT:

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4829

Trending Articles