Created
April 10, 2018 17:46
-
-
Save alexdiliberto/f3cf6c1b804f789585b54386ad7e00d5 to your computer and use it in GitHub Desktop.
Ember config service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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