mercredi 24 août 2016

Ember controller actions does not get triggered if defined in it's mixin

My Ember controller looks like below;

import Ember from 'ember';
import SomeMixin from '../mixins/some-mixin';

export default Ember.Controller.extend(SomeMixin, {
    actions: {
        someAction: function() {
            // Why does this not get triggered if I have 'actions' object defined in SomeMixin
        }
    }
})

My question is if I defined actions object in SomeMixin (with some different action names), then the 'actions' defined in the controller are completely ignored and do not get triggered at all.

Again, the action names are not the same and I did try both with return and without any return from the controller action.

Also I have 2 mixins actually; SomeMixin1 & SomeMixin2




Aucun commentaire:

Enregistrer un commentaire