Re:Angular v8.0
by nicoburns on Wednesday May 29, 2019 @03:31PM
(#20044362)
I agree that the pattern of "services" is a good one. But you don't really need Angular's DI for this in javascript. You can just use an ES6 module.
[ Parent
| on HN ]
Re:Angular v8.0
by bradstewart on Wednesday May 29, 2019 @03:55PM
(#20044629)
Unless you care about the scope/lifecycle of the service. Or want to easily replace its implementation in different contexts (like tests).