vendredi 27 mars 2015

Add Controller to needs with Mixin

I'm trying to create a mixin for my controllers that use a lot of the same functions, but I need to make sure all of the controllers have access to some basic controllers too. I do this currently by adding the to needs.



// mixins/item.js

import Ember from 'ember';

export default Ember.Mixin.create({
needs: ['application']
});


The issue is that many of the controllers have additional controllers that are included with needs. From what I've tested, the needs in the controllers overrides what's set in the mixin.


Is there anyway to merge the needs?





Aucun commentaire:

Enregistrer un commentaire