yaodong
7/12/2017 - 6:08 AM

ember-mixin-super.js

FooMixin = Ember.Mixin.create({
  init: function () {
    this._super(); // This will call Em.Object#init in the super chain
    console.log('FooMixin#init');
  }
});

BarMixin = Ember.Mixin.create({
  init: function () {
    this._super(); // This will call FooMixin#init in the super chain
    console.log('BarMixin#init');
  }
});

// Displays:
//   FooMixin#init
//   BarMixin#init
Em.Object.extend(FooMixin, BarMixin, {}).create();