# How to import modules in Ember-cli

**URL:** <https://discuss.emberjs.com/t/how-to-import-modules-in-ember-cli/8825>\
**Category:** Uncategorized\
**Created:** [September 23, 2015, 11:27am UTC](https://discuss.emberjs.com/t/how-to-import-modules-in-ember-cli/8825 "2015-09-23T11:27:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Igor\_Kvasnicka](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/igor_kvasnicka/32/17367_2.png) [@Igor\_Kvasnicka](https://discuss.emberjs.com/u/Igor_Kvasnicka)\
**Post date:** [September 23, 2015, 11:27am UTC](https://discuss.emberjs.com/t/how-to-import-modules-in-ember-cli/8825/1 "2015-09-23T11:27:00Z")

</div>

Hi,

I’ve got an Ember service that uses some constants (basically a JSON). These constants are defined in the same file (module) as the service itself. The thing is, that these constants are used all over the project and I would like to import them separately - without the need to import the service, too.

Here is my service file:

```
 import Ember from 'ember';
 
 export const MY_CONSTANTS = {   
   'CONST_1': 'hello1',
   'CONST_2': 'hello2',
 };
  
 export default Ember.Service.extend({ 
    //some code here 
 });

```

I would like to achieve something like this:

```
  //some other module

  import MY_CONSTANTS from '/path/to/file/above';

  export default Ember.Controller.extend({
    doIt: function(){
        console.log(MY_CONSTANTS.CONST_1); //prints hello1
    }.on('init');
  });

```

I guess this syntax should be possible with ES6, but it is not working for me. Could you please help me?

Thanks

Igor

---

<div class="post-metadata">

**Author:** ![Igor\_Kvasnicka](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/igor_kvasnicka/32/17367_2.png) [@Igor\_Kvasnicka](https://discuss.emberjs.com/u/Igor_Kvasnicka)\
**Post date:** [September 23, 2015, 12:15pm UTC](https://discuss.emberjs.com/t/how-to-import-modules-in-ember-cli/8825/3 "2015-09-23T12:15:34Z")

</div>

nevermind… all I had to do is change this:

```
import MY_CONSTANTS from '/path/to/file/above';

```

to this:

```
import {MY_CONSTANTS} from '/path/to/file/above';

```
