First off, I’m not using em-data for loading my data. I have a model that does an ajax callback and gets back a fairly heavily nested JSON structure. I create some Ember.Objects about of that structure and return them in the then
callback of the ajax call. Then in the route, I am loading it in setupController
like:
App.ReportsIndexRoute = Ember.Route.extend({
setupController: function(){
var summary = App.ReportsAdapter.find();
var controller = this.controllerFor("punctualitySummary");
controller.set("content", summary);
}
});
Unfortunately, when it gets to the template, it doesn’t update once the request is complete. However, if I make it a proper model for the route, the template updates just fine:
App.ReportsIndexRoute = Ember.Route.extend({
model: function(){
return App.ReportsAdapter.find()
},
setupController: function(_,model){
var controller = this.controllerFor("punctualitySummary");
controller.set("content", model);
}
});
This makes me think my approach is completely wrong, but I need to load multiple models for this route. How can I do that without using em-data?
Thanks!