The inject function in Angular is not just a toy @JoshuaMorony
The inject function in Angular is not just a toy  @JoshuaMorony
Uploaded December 2023 | Updated November 2026, 3 hours ago
My Angular course: angularstart.com

The inject function is a newer way to facilitate dependency injection in Angular, but it provides benefits beyond just being a slightly different syntax for DI. This video discusses one such benefit: being able to use dependency injection within a function.

Get weekly content and tips exclusive to my newsletter: https://mobirony.ck.page/4a331b9076

Want to build mobile apps with Angular?: ionicstart.com

0:00 Introduction
0:29 Utility function with inject
1:12 Why use a function?
1:49 Class based implementation
2:25 Function vs class based approach

#angular

- More tutorials: modernangular.com
- Follow me on Twitter: twitter.com/joshuamorony
The inject function in Angular is not just a toyHow far have I come in 5 years of Angular development?How to deeply understand Angular signals (...or anything)Dont want to go FULL NgRx? Try this...What my Agentic AI workflow did to my codebaseAngular v20 is out... its boring (and thats good)Let me show you my secret RxJS playgroundA quick tip for reacting to @Input changes in AngularWhy we NEED these missing Signals APIs in AngularIs Angular changing TOO much?Tracking down a performance (not memory) leak in JavaScriptWatch this BEFORE updating to signal inputs in Angular
Joshua Morony |

The inject function in Angular is not just a toy

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER