In order to resolve a dependency, Angular’s DI uses type annotations. To make sure these types are preserved when transpiled to ES5, TypeScript emits metadata. In this lesson we’ll explore how the @Injectable decorator ensures metadata generation for services that have their own dependencies.
The end result is a bit weird in my opinion. The ListComponent is the component configuring the LogService and the ConsoleService but the DataService is the one using them! This breaks all encapsulation don't you think?
Unless you consider the ListComponent the main file of the application where all configurations for injectable components is made. (such as the the FactoryProvider for LogDebugger). Does this mean then that this configuration is GLOBAL for all components? What happens if another component defines another FactoryProvider for LogDebugger?