Re:Opinionated Comparison of React, Angular2, and Aurelia
by SebastianM on Friday April 07, 2017 @03:21AM
(#14057790)
> 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...
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...