Skip to content

Instantly share code, notes, and snippets.

@alexdiliberto
Created April 10, 2018 17:46
Show Gist options
  • Save alexdiliberto/f3cf6c1b804f789585b54386ad7e00d5 to your computer and use it in GitHub Desktop.
Save alexdiliberto/f3cf6c1b804f789585b54386ad7e00d5 to your computer and use it in GitHub Desktop.
Ember config service
import Service from '@ember/service';
import { get } from '@ember/object';
import { equal } from '@ember/object/computed';
import config from '../config/environment';
export default Service.extend({
unknownProperty(path) {
return get(config, path);
},
isDev: equal('environment', 'development'),
isProd: equal('environment', 'production'),
isTest: equal('environment', 'test')
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment