I have an ArrayController which manages a group of objects. I define an itemController on this, so that each individual object is managed by another ObjectController:
App.IndexController = Ember.ArrayController.extend({
itemController: "sampleModel"
});
Inside this ObjectController, I have a delete
action that is meant to delete objects from the enclosing array, using the "parent" ArrayController:
App.SampleModelController = Ember.ObjectController.extend({
delete: function() {
this.get("target.content").removeObject(this.get("content"));
}
});
I don't want to have a global object store. I'm currently using the target
property in order to achieve this kind of behaviour. Is this the idiomatic ember approach?
The complete example can be found here.