Why Angular 14’s new inject() function is so amazing?
As you have probably already read, Angular 14 shipped some very interesting features: typed forms (which can still be improved, see how here), standalone components, and, the focus of this article, the ability to use the inject( ) function during the so-called constructor phase.
Let’s break the above sentence in 2.
What is the inject() function
The inject() function takes an InjectionToken as a parameter and returns the value for that InjectionToken from the currently…