lundi 15 février 2016

ember data 2.3.x how to get the metadata with jsonapi

DEBUG: -------------------------------
DEBUG: Ember : 2.3.0
DEBUG: Ember Data : 2.3.1
DEBUG: jQuery : 2.1.4
DEBUG: Ember Simple Auth : 1.0.0
DEBUG: -------------------------------

My server side send the data with jsonapi like this:

  data: [{  
   ... ,  
   1: {  
     attributes: {  
       id: '123',  
       ... ,   
       meta: {  
         price_total: {  
           datasets: ... ,  
           labels: ...  
         }  
       }  
     }  
   },  
   ...  
 }]

I check the document http://ift.tt/1KmABeD , check to get the metadata in my template.

 {{#each model as |fittingItem index|}}  
   ...  
   {{fittingItem.meta}}  
   ...  
 {{/each}}

I could not get meta.

I found some issues http://ift.tt/1PO2l8v , http://ift.tt/1KmAC1T . They also can not solve my problem.

Maybe there is any better way to approach this problem?




Aucun commentaire:

Enregistrer un commentaire