Skip to content

Instantly share code, notes, and snippets.

@yaodong
Created July 12, 2017 06:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yaodong/964a759c3f2364ca545f8df6788e2b64 to your computer and use it in GitHub Desktop.
Save yaodong/964a759c3f2364ca545f8df6788e2b64 to your computer and use it in GitHub Desktop.
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();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment