# Sharing models via ember-cli addons?

**URL:** <https://discuss.emberjs.com/t/sharing-models-via-ember-cli-addons/6311>\
**Category:** Ember CLI\
**Created:** [September 22, 2014, 11:34am UTC](https://discuss.emberjs.com/t/sharing-models-via-ember-cli-addons/6311 "2014-09-22T11:34:42Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rwjblue](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/rwjblue/32/9411_2.png) [@rwjblue](https://discuss.emberjs.com/u/rwjblue)\
**Post date:** [September 22, 2014, 12:02pm UTC](https://discuss.emberjs.com/t/sharing-models-via-ember-cli-addons/6311/2 "2014-09-22T12:02:34Z")

</div>

Yes, this is absolutely something that addons are intended to help with.

Make an addon (easiest way is via `ember addon my-product-models` or some other way more imaginative name), and in that addon folder add a `app/models/` folder that contains your shared models. Include that shared model addon with both applications (by adding it to `package.json`).

The files in `app/` of the addon are merged with the ones in the applications `app/` folder so that they end up at the same level in the module system.

Assuming that your addon had an `app/models/foo.js` file, and that you wanted to extend that from `app/models/bar.js` in your actual application you would do the following:

```javascript
import Foo from './foo';

export default Foo.extend();

```

---

_[View the full topic](https://discuss.emberjs.com/t/sharing-models-via-ember-cli-addons/6311)._
