lundi 20 juin 2016

Emberjs Fragment Array : access array properties from controller

I am using Emberjs Model Fragments and one of my model contain a fragmentArray.

When I get my model from the store and try to display the array informations with the handlebar helper it is working perfectly.

But if I want to iterate through this array from the controller, I am not able to get his basics properties.

I tried several things as Array.forEach, Array.objectAt but none of them succeed ...

So my question is : how to reproduce the iteration of handlebars on my controller to get my array data on the controller ?

On the controller I am able to get some basics data as string or other fragments using model.get('place').get('name'). So my model is loaded correctly and accessible.

It is only the array who bother me.




Aucun commentaire:

Enregistrer un commentaire