現在、ApplicationController にイベントを送信するアプリケーション テンプレートにビューがあります。ビューから別のコントローラである PlaylistController に直接送信したいのですが、方法がわかりません。
これは私の現在の ApplicationController です
App.ApplicationController = Ember.ArrayController.extend({
needs:['playlist'],
changeSong: function(delta) {
this.get('controllers.playlist').send('changeSong', delta);
}
});
そして、これはアプリケーション テンプレートにあるビューです。
App.NextSong = Ember.View.extend({
classNames: ['entypo', 'to-end'],
tagName: 'a',
click: function() {
this.get('controller').send('changeSong', 1);
}
});