3 ms·
> afaik it's even deprecated. No, it's not. You use providers on a component when you want to have a new instance of that Service when a new Component instance
by SebastianM 9y ago
> afaik it's even deprecated.
No, it's not. You use providers on a component when you want to have a new instance of that Service when a new Component instance of that type gets created. So you have complete control over the DI.
More details here: https://angular.io/docs/ts/latest/guide/dependency-injection.html#!#injector-config https://angular.io/docs/ts/latest/guide/dependency-injection...