jeudi 18 octobre 2018

How to properly declare attribute name on model? (ember.js)

I have an json api which is returning an attribute name sample-products-buy-x-take-y-count with data type number and I declare it to my model like this:

sampleProductsBuyXTakeYCount: DS.attr('number')

But whenever I inspect my model on Ember inspector the value for the sampleProductsBuyXTakeYCount is undefined while the response from my api has value.

May I know what's wrong with my attribute declaration? Thanks!




Aucun commentaire:

Enregistrer un commentaire