Angular Dependency Injection: A Story Of Independance
Angular 14 introduces the inject function, a powerful and radical feature that allows developers to make references of objects or classes available anywhere.
Before the inject function, dependency injection in Angular was mostly handled via class constructors.
The inject function can be used in various contexts, such as initializer for class fields, factory functions, and injection tokens.