I have an addon which uses a different host for a service in development and at runtime. I believed the solution to this would be to define the hostname in the config/environment.js of the application and to have a the service pick it up as follows:
import ENV from '../config/environment';
export default AjaxService.extend({
host: ENV.APP.serviceHost,
...
This however doesn't work as it believes that the path to the environment.js file is within the scope of the addon instead of the main application. What is the right way to do this when the name of the application in which this addon is included is not known?
I am using Ember 2.11.
Aucun commentaire:
Enregistrer un commentaire