OK, that Angular example triggered me. This is exactly why I couldn't make heads or tails of my Angular caching issue - because all answers on SO were like this.
This kind of non-documentation, coupled with the fact that Angular is IMO overengineered, drives me crazy.
I had to do some Java stuff in university so I knew the concept of dependency injection. But in JavaScript it isn't used that often.
Probably because "classes" are simply functions there and you can store a function in a variable and pass it around without thinking about its "real" name, which already decouples things quite nicely.