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/environment imported ember-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

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -