For any view in Ember.js we need to create controller with appropriate name in order to use this controller, but this is not a case for views inside ContainerView
.
View (inside ContainerView):
App.ChildView = Ember.View.extend({});
Controller:
App.ChildController = Ember.ObjectController.extend({
init: function () {
alert('Hell no! I\'m not going to init!');
return this._super();
}
});
Above doesn't work...
Solution like this.set('controller', App.ChildController.create())
(inside view) is not an option because Ember.Evented
, needs
and probably more stuff doesn't work.
Here is the (not) working example: http://jsfiddle.net/wbednarski/XaPSR/
Any help appreciated!