How can I apply mixin in this.after("initialize".. with compose

37 views
Skip to first unread message

Dobrin Ganev

unread,
Aug 26, 2015, 12:12:33 AM8/26/15
to Twitter Flight
Hi,
I need to be able to apply mixins to component in the after initialize function. Something like that;

var mix = require('flight/lib/compose');
var thisComponent;
    this.after("initialize", function () {
                 thisComponent = this;
                require([this.attr.config.path + '/components/component_data/mixinOne.js',
                           this.attr.config.path+   '/components/component_data/mixinTwo.js'],
            function ( mixinOne, mixinTwo) {
                    mix.mixin(thisComponent, [mixinOne, mixinTwo]);
               
                });
            }); 

I am using dojo AMD and all mixins are available on require callback.

Thanks
Dobrin


Reply all
Reply to author
Forward
0 new messages