3 ms·
Unless you care about the scope/lifecycle of the service. Or want to easily replace its implementation in different contexts (like tests).
by bradstewart 7y ago
Unless you care about the scope/lifecycle of the service. Or want to easily replace its implementation in different contexts (like tests).
- ng12 7y agoMost test frameworks allow you to stub imports. DI is just one of the many wheels Angular has reinvented.