javascript - Error while importing config file in Ember Addon -
i working on addon ember can't find right way import config file.
i import config file way, service:
import env '../config/environment'; i testing addon dummy/app folder, when try use service, following error:
uncaught error: not find module
ember-my-addon/config/environmentimportedember-my-addon/services/my-service
it should grab config file dummy/app/config/environment.js, or config file of app installed addon.
what best practice import file?
you can use addon ember-get-config
alternatively, can use solution posted here:
http://discuss.emberjs.com/t/best-practices-accessing-app-config-from-addon-code/7006/19?u=gaurav0
Comments
Post a Comment