mercredi 21 mars 2018

ember injection doesnt work on ember in repo engine

i've move all the service file from ember app (parent app) to ember in repo addon. the question is how to inject (inject in inject initializer) the service from addon to my ember in repo engines app... , i try this but it doesnt work :(( , i can't get this.commonService from route (on ember in-repo-engine)

import commonService from 'commons/services/common-service';
export function initialize(application) {
  application.register('common-service:main', commonService);
  application.inject('route', 'commonService', 'common-service:main');
}
export default {
  name: 'engine-initializer',
  initialize
};




Aucun commentaire:

Enregistrer un commentaire