Angular2 Dependency Injection - make sense or it's just overengineering?
问题 As documentation says Dependency Injection is a powerful pattern for managing code dependencies But does Angular's DI has any sense? Let's say we have an HeroComponent living in the HeroModule, and it uses HeroService. To use it in HeroComponent we have to: Import HeroService in HeroModule Inject HeroService in module providers Import HeroService in HeroComponent Add type or add injected service to component's parameters. Why don't just import HeroService into HeroComponent? We can export its