Ответ 1
Я просто поместил общие действия в хеш actions
на mixin, и Ember позаботился о правильном слиянии хэшей действий с любыми контроллерами, которые расширяют mixin.
App.PaginatedListController = Ember.Mixin.create({
queryParams: ['page'],
page: 0,
actions: {
nextPage: function() {
this.incrementProperty('page');
},
previousPage: function() {
this.decrementProperty('page');
},
}
});
App.PostsController = Ember.ArrayController.extend(App.PaginatedListController, {
actions: {
// controller specific actions here
}
});