Find record from belongsTo association in Ember.js

后端 未结 1 1309
情话喂你
情话喂你 2020-12-16 04:55

How can I get the associated record from an Ember model? Or: how to get the record from the Promise Object?

Customer model

Docket.Cu         


        
相关标签:
1条回答
  • 2020-12-16 05:37

    use another then on the get :)

    var project = this.store.find('project', id).then(function(data) {
      data.get('customer').then(function(c){
        console.log(c);
      }
    });
    
    0 讨论(0)
提交回复
热议问题