mercredi 7 juin 2017

Iterating over DS.hasMany in Ember data

I have a real struggle with Ember.

In my model I have an attribute:

options: DS.hasMany('UserOptions', {async: false})

In a view linked to this model I can easily access this property by e.g.:


    something....


and that works like a charm.

However when I try to access this model value in controller with: this.get('model.options') instead of getting a lovely array of payment options, I get an ember model array of objects, and there's no way I can access the actual data.

Do you guys have any idea how do I access this data in controller and process it?

Thanks!




Aucun commentaire:

Enregistrer un commentaire