Ember does a bunch of useful, powerful, magical things that makes life easy. However, I find myself often a loss to understand how the magic works or how to hook into it. I think I struggle most to understand how & when things are instantiated, how they magically know of each other (e.g. the app knows all it's models & controllers), and how to instantiate things manually and give them access to all the other classes. Here are some examples:
- If I create an instance of a controller, how do I make sure it has access to the app containers?
- In Ember-CLI, how does Ember know about all the models/controllers/etc I create? When I write
export default PostController, how does Ember register that as a controller and add it to the container?
- In Ember-CLI, filenames & folder names make a difference. If files are named something unexpected, the documentation writes that they need to be imported automiatcally. Where would such an import statement go? What is the code path that the abnormally named class has to ski