Ember: Data Store Injection

TL;DR: All you need to know is that, when you use Ember.Data, store service is automatically generated, at least for Ember >= 2.7.


app/initializers/ember-data.js calls setupContainer from data/addon/setup-container.js, which calls initializeStoreInjections from /addon/-private/initializers/store-injections.js

lib/system/service.js ->

container/lib/registry.js ->

lib/inject.js ->

container/lib/container.js ->

initializers/store-injections.js ->

setup-container.js ->



Nothing is magic, just somebody wrote the code for you.


Like what you read? Give Alan Dong a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.