Ember Mixin Usage

1. Mixin

App.OneMixin = Ember.Mixin.create({
    actions: {
        bla: function() {….}
    },
    blabla: function() {…}
});
App.TwoMixin = Ember.Mixin.create({…});

2. Controller

App.DemoController = Ember.Controller.extend(App.OneMixin, App.TwoMixin, {
    blablabla: function() {…}
});


你可能感兴趣的:(Ember Mixin Usage)