Sharing models via ember-cli addons?

Suppose I keep my-model in addon folder only and don’t export it in app folder of my ember addon. And in my main ember app I do store.find('my-model').

Obviously store will not be able to do find my-model because it’s in addon’s namespace. How do I achieve store.find for my-model with namespace.

my-model exists in vendor.js as define('my-addon/models/my-model', ....)

Hi All, I finally did an example blog app using addons, which you can find here :
git clone https://github.com/callistaenterprise/cadec-2015-ember.git
git checkout addons

Project setup is :

  • blogs-app - contains main app
  • blogs-client - main client code, only controllers/templates
    • blogs-domain - domain model for blogs
  • login-client - login client code, controllers/templates
  • user-client
    • user-domain - domain model for users, also used by the login-client

Maybe a bit of an overkill but gives you the basic idea for how to split up the concerns of maybe a bigger app or multiple applications that could grow and grow. /Stephen.

You saved mi day! :slight_smile: