If you look in package.json , you will see the ember-export-application-global package, which is installed by default (if not, install it). This does not export your application to a global App object, but to a global object named after your application. That way you can have window.TodoList or window.ShoppingCart instead of window.App . From there you can use this line (similar to Ember 1.xx):
AppName.__container__.lookup('service:store')
You can also do what I do and create an instance initializer for it:
export default { name: 'store-on-app', after: 'ember-data', initialize(instance) { const application = instance.container.lookup('application:main'); const store = instance.container.lookup('service:store'); application.set('store', store); } }
Then you can just user AppName.store .
source share