Created
July 12, 2017 06:08
-
-
Save yaodong/964a759c3f2364ca545f8df6788e2b64 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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