DEV Community

Discussion on: Tree-shakable dependencies in Angular projects

Collapse
 
chan_austria777 profile image
chan 🤖

What's the difference of functions/constants in a helpers or utilities folder w/c you can import anytime Vs value/factory providers? With functions if it has no dependencies then would it be better to just put it in a helpers folder?

Collapse
 
layzee profile image
Lars Gyrup Brink Nielsen

Thanks for your question, Chan.

Angular is built around dependency injection for inversion of control and testability. The difference is that we can replace those constants and functions in tests or even at runtime when we use an Angular dependency.

Collapse
 
chan_austria777 profile image
chan 🤖

I see, Thanks for the wonderful article.