Earlier, I discovered that it is possible to create mixes when creating a new mix, such as:
App.SomeNewMixin = Ember.Mixin.create(App.SomeOldMixin, { someMethod: function() { return true; } });
Now I'm trying to use two existing mixins, but it seems that Mixin.create only supports 2 parameters.
App.SomeNewMixin = Ember.Mixin.create(App.SomeOldMixinOne, App.SomeOldMixinTwo, { someMethod: function() {
This seems like a serious limitation of Ember Mixins. There are almost no Ember.Mixin coverage in Ember docs, so I'm not sure how to do this. I tried using Ember.Mixin.apply in the init function of SomeNewMixin, also to no avail.
App.SomeNewMixin = Ember.Mixin.create({ init: function() { this._super(); this.apply(App.SomeOldMixinOne); this.apply(App.SomeOldMixinTwo); } someMethod: function() { return true; } });
It would be useful to know about possible solutions!
source share