# Moving to ember-cli

**URL:** <https://discuss.emberjs.com/t/moving-to-ember-cli/7080>\
**Category:** Ember CLI\
**Created:** [January 14, 2015, 7:15pm UTC](https://discuss.emberjs.com/t/moving-to-ember-cli/7080 "2015-01-14T19:15:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rudi](https://avatars.discourse-cdn.com/v4/letter/r/50afbb/32.png) [@Rudi](https://discuss.emberjs.com/u/Rudi)\
**Post date:** [January 14, 2015, 7:15pm UTC](https://discuss.emberjs.com/t/moving-to-ember-cli/7080/1 "2015-01-14T19:15:16Z")

</div>

I’m moving an existing ember project to ember-cli and that is giving a few headaches.

First is that I’m not using ember-data, but straight Ember.Objects. Where should they live, they seem second class citizens in ember-cli.

Second one is (my bad) that I had variables defined on the app namespace, where should they go? I need data binding on those, and be able to access them in routes, controllers and objects. They are general settings that are valid through the whole site.

Can anybody point me in the right direction?

---

<div class="post-metadata">

**Author:** ![backspace](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/backspace/32/9927_2.png) [@backspace](https://discuss.emberjs.com/u/backspace)\
**Post date:** [January 14, 2015, 7:51pm UTC](https://discuss.emberjs.com/t/moving-to-ember-cli/7080/2 "2015-01-14T19:51:33Z")

</div>

Classes in the `models` directory don’t have to be Ember Data models, they can be whatever.

You can use dependency injection to provide access to global objects. Set one up in an initializer and choose to inject it into all routes or controllers, for instance.

---

<div class="post-metadata">

**Author:** ![Rudi](https://avatars.discourse-cdn.com/v4/letter/r/50afbb/32.png) [@Rudi](https://discuss.emberjs.com/u/Rudi)\
**Post date:** [January 14, 2015, 8:27pm UTC](https://discuss.emberjs.com/t/moving-to-ember-cli/7080/3 "2015-01-14T20:27:18Z")

</div>

Thanks backspace!

Will the injected service also be accessible in an Ember.Object?

---

<div class="post-metadata">

**Author:** ![backspace](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/backspace/32/9927_2.png) [@backspace](https://discuss.emberjs.com/u/backspace)\
**Post date:** [January 14, 2015, 8:52pm UTC](https://discuss.emberjs.com/t/moving-to-ember-cli/7080/4 "2015-01-14T20:52:57Z")

</div>

hmm, I can’t be certain, but I doubt it. Framework-related objects have access to the container, which I think is how dependencies are injected. A plain `Ember.Object` isn’t instantiated with access to the container. Perhaps your plain objects should inherit from some base class you create that lets you supply the dependency at the time of instantiation.

Hopefully someone else will read this and have a clearer idea of how to accomplish what you need.
