Ember.js のどのビューでも、このコントローラーを使用するには適切な名前でコントローラーを作成する必要がありますが、これは 内のビューには当てはまりませんContainerView
。
ビュー (ContainerView 内):
App.ChildView = Ember.View.extend({});
コントローラ:
App.ChildController = Ember.ObjectController.extend({
init: function () {
alert('Hell no! I\'m not going to init!');
return this._super();
}
});
上が動かない…
(内部ビュー)のようなソリューションthis.set('controller', App.ChildController.create())
はオプションではありEmber.Evented
ませneeds
ん。おそらくそれ以上のものは機能しません。
これが(そうではない)実際の例です:http://jsfiddle.net/wbednarski/XaPSR/
どんな助けでも大歓迎です!