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.

Walk-through

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 ->

initialize-store-service.js#L11

Takeaway

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

References

A single golf clap? Or a long standing ovation?

By clapping more or less, you can signal to us which stories really stand out.