Since updating to [email protected]
const config = this.container.lookupFactory('config:environment');`
no longer works. I can't use:
import ENV from 'your-application-name/config/environment';
because I don't actually know what the application-name is as I am using this in an addon and also some blueprints.
What is the alternative?
The answer by @jax does not provide the solution. I found the solution on EmberJS forums:
Ember.getOwner(this).resolveRegistration('config:environment');
See http://emberjs.com/api/classes/RegistryProxyMixin.html#method_resolveRegistration
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With