The inject function in Angular is not just a toy
Channel:
Subscribers:
81,900
Published on ● Video Link: https://www.youtube.com/watch?v=C-UOmVfzBbw
My Angular course: https://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?: https://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: https://modernangular.com
- Follow me on Twitter: https://twitter.com/joshuamorony
Other Videos By Joshua Morony
Tags:
tutorial
tutorials
coding
coding tutorials
angular
angular tutorials
mobile
mobile apps
apps
html5
ios
android
hybrid
web apps
progressive web applications
programming
performance
ui
ux
animations
screencast
rxjs
nx
ngrx
architecture
signals
advanced