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?
👨🏫 Co-Founder of This is Learning, Organizer of AarhusJS
✍️ Writer, Speaker, FOSS Maintainer 📗 Author
🏆 Microsoft MVP 🌟 GitHub Star
🌊 Nx Champion 🦸 Angular Hero of Education
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.
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?
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.
I see, Thanks for the wonderful article.