New Way to Inject Services in Angular 14?

💥 Angular courses made by Dmytro - https://bit.ly/df-courses 💥
✂️ Use coupon YOUTUBE_DISCOUNT to get a 10%-off discount ✂️

Angular 14 is about to be released and it brings a lot of new cool features. One of that features is injected() function that has been existing since Angular 9 but with Angular 14 it gets more areas where it could be applied. About that, we are going to talk in this video and have a look at some base use cases. What do you think about it? Let's discuss it in the comments!

🕒 Time Codes:
00:00:00 - Intro;
00:00:50 - How we could use inject() before Angular 14;
00:05:39 - Scenario 1 - Injectiong Injection Tokens;
00:08:37 - Scenario 2 - Simplifying Inheritance;
00:13:58 - Scenario 3 - Inject Function/Composition Function;
00:18:26 - Final Notes;
00:20:29 - Outro;

Source code on GitHub:
https://github.com/DMezhenskyi/angular-inject-function/tree/final-state

↙️ Short Frontend Snacks every week here:

Twitter - https://twitter.com/DecodedFrontend
Instagram - https://www.instagram.com/decodedfrontend
LinkedIn - https://www.linkedin.com/in/dmezhenskyi

🔗 Useful links about this topic
Chau Tran (@Nartc1410) https://nartc.me/blog/inheritance-angular-inject
Younes Jaaidi (@yjaaidi) https://marmicode.io/blog/angular-inject-and-injection-functions

#angular #webdevelopment #ng

Home