I\'ve been beating my head against this problem all day, and I feel like I\'m close to a solution but just can\'t quite make it happen. I\'m using Ember.js with Ember-Data and
It appears like you're accessing the models before they are finished loading (You can see this in the property, isUpdating). If you feel like lazily looking at this you can use ember run later to just see the items a wee bit later. Or you can set the model on the controller and render it and let ember update the view when the models are finished loading...
Ember.run.later(function(){
data.forEach(function(item){
console.log(item);
});
}, 2000);
App.ApplicationRoute = Ember.Route.extend({
activate: function(){
this.controllerFor('supervisors').set("model", App.Supervisor.find());
}
});
http://jsbin.com/ijiqeq/12/edit
Good luck with Ember!
someArray: function(){
var arr = Ember.A();
this.get('model').forEach(function(item){
item.get('sites').forEach(function(site){
arr.pushObject(someObject); //some object that is represents each specific combination
});
});
}.property('model')