Angular dependency injection in depth – Dependency providers (2021)

Share this & earn $10
Decoded Frontend
Published at : 06 Nov 2021
17361 views
620
13

Hello guys! Let’s continue to talk about in depth topics of #Angular dependency injection. Today I would like to show you dependency providers like: useClass, useExistiong, useValue and use factory. Likewise resolution modifiers which control how Angular resolves dependency - dependency providers responsible for how Angular should create dependency instances. It allows you to replace different service implementation in runtime which make your application extremely powerful and flexible. I hope you find I lot of use-cases in your applications. Thank you for your attention and enjoy watching! 😉

📣 Become a Pro in Angular Material Theming (Advanced Workshop) 📣
https://bit.ly/angular-material-theming-workshop
✅ Use 15%-off coupon code: YOUTUBE_DISCOUNT (Only 2 coupons left)

📣 Blazing fast GraphQL Backend just in 1 Day with Hasura Engine 📣
https://bit.ly/complete-hasura-course
✅ 20%-off coupon code: HASURA-EASY-START

Angular Dependency Injection – Understanding hierarchical injectors (2020)
https://youtu.be/G8zXugcYd7o

Angular Dependency Injection in Depth - Resolution modifiers (2020)
https://youtu.be/uVGnsmm9g-I

🕒 Time codes:
00:00:00 - Intro
00:01:00 - Quick recap of how we provide dependencies
00:01:18 - Describing the problem
00:03:14 - useClass in Action
00:05:46 - useExisting in Action
00:07:44 - useValue in Action
00:09:06 - A little bit about InjectionToken()
00:12:26 - useFactory in Action
00:15:11 - useValue vs useFactory. What’s the difference?
00:16:24 - multi:true announcement
00:16:43 - Outro

——————- See my another videos about Angular ——————-

✅ Check out my video "My TOP 5 Angular Interview Questions"
https://youtu.be/KhUtM8skC5A

✅ Check out my videos about Angular Material Library:
https://www.youtube.com/playlist?list=PLX7eV3JL9sfkREmy-qxyNqLw73y76nOHm

✅ Check out my videos about Angular CDK:
https://www.youtube.com/playlist?list=PLX7eV3JL9sfkdwkADI4PVDmNins_fO_vp

🔗 Links:
More about Dependency Injection:
https://angular.io/guide/dependency-injection

#angulartutorial #webdevelopment #dependencyinjection

angular dependency injection in depthangular 10 dependency injection providersangular dependency injection factory

That's Life (Remastered 2008)

That's Life (Remastered 2008)

Big Sean - Beware ft. Lil Wayne, Jhene Aiko (Official Music Video)

Big Sean - Beware ft. Lil Wayne, Jhene Aiko (Official Music Video)

Unlawful - La Hara (Official Audio)

Unlawful - La Hara (Official Audio)

Etta James - At Last - Memories Are Made Of

Etta James - At Last - Memories Are Made Of

How to Program in C# - Methods (E06)

How to Program in C# - Methods (E06)

2021: Know Know - At The Same Time 🍷 🍷 🍷  【 OFFICIAL MUSIC VIDEO 】

2021: Know Know - At The Same Time 🍷 🍷 🍷 【 OFFICIAL MUSIC VIDEO 】

Enrique Iglesias - Hero (Official Music Video)

Enrique Iglesias - Hero (Official Music Video)

ΤΑ ΣΑΓΟΝΙΑ ΤΟΥ ΚΑΡΧΑΡΙΑ | Depth #1

ΤΑ ΣΑΓΟΝΙΑ ΤΟΥ ΚΑΡΧΑΡΙΑ | Depth #1

How To Make Dalgona Candy

How To Make Dalgona Candy

Saheed Osupa - Capability

Saheed Osupa - Capability

How to Manage Stress as a Student

How to Manage Stress as a Student

Yella Beezy - "Restroom Occupied (ft. Chris Brown)" (Official Music Video)

Yella Beezy - "Restroom Occupied (ft. Chris Brown)" (Official Music Video)

This INCREDIBLE Police Station Transformation | George Clarke's Remarkable Renovations

This INCREDIBLE Police Station Transformation | George Clarke's Remarkable Renovations

Our Celebs take on the Jungle Run | | I'm a Celebrity...Jungle Challenge

Our Celebs take on the Jungle Run | | I'm a Celebrity...Jungle Challenge

Countless Numbers - Little Lever (@ the Rivoli)

Countless Numbers - Little Lever (@ the Rivoli)

Mobin Master ft. Kim Cooper - Unique (Christian Luke Remix)

Mobin Master ft. Kim Cooper - Unique (Christian Luke Remix)

Row Row Row Your Boat | CoComelon Nursery Rhymes & Kids Songs

Row Row Row Your Boat | CoComelon Nursery Rhymes & Kids Songs

Benefits of body detoxification | Holistic health | Dhvani Shah | Saregama podcast

Benefits of body detoxification | Holistic health | Dhvani Shah | Saregama podcast

carimi - sensible a la gachette

carimi - sensible a la gachette

Excel INDIRECT Function: Lookup Values in Different Sheets / Excel Tabs

Excel INDIRECT Function: Lookup Values in Different Sheets / Excel Tabs

EXPERIMENT: A lot of Sparklers vs Watermelon

EXPERIMENT: A lot of Sparklers vs Watermelon

From 0 to 100000

From 0 to 100000

[Truth] EP1 | Life of Mark Inspectors in Procuratorate | Chen Xingxu/Ge Yuexi | YOUKU

[Truth] EP1 | Life of Mark Inspectors in Procuratorate | Chen Xingxu/Ge Yuexi | YOUKU

SIT - The minimal we can do for Beirut (Online Charity Event)

SIT - The minimal we can do for Beirut (Online Charity Event)

They're Trying To Mass Murder The Population! - Debating An Anti-Vaxx Freethinker

They're Trying To Mass Murder The Population! - Debating An Anti-Vaxx Freethinker

Baja California: el acuario del mundo

Baja California: el acuario del mundo

Minecraft: EXCELLENT MODERN HOUSE BUILD CHALLENGE - NOOB vs PRO vs HACKER vs GOD / Animation

Minecraft: EXCELLENT MODERN HOUSE BUILD CHALLENGE - NOOB vs PRO vs HACKER vs GOD / Animation

How to track anyone's phone location without them knowing! This was used on me😱

How to track anyone's phone location without them knowing! This was used on me😱

Good morning+More Kids Dialogues | Learn English for Kids | Collection of Easy Dialogue

Good morning+More Kids Dialogues | Learn English for Kids | Collection of Easy Dialogue

Jonathan Nelson - I Believe (Island Medley)(Official Video)

Jonathan Nelson - I Believe (Island Medley)(Official Video)

New Youtube Channel Topic Ideas Bangla 2021 || New Channel Ideas

New Youtube Channel Topic Ideas Bangla 2021 || New Channel Ideas

Tik Toks Only Girls Understand

Tik Toks Only Girls Understand

ரூ10 முதல்.. Gifts Cheapest Price/Surprise Gifts,Valentine Gifts,Customized Gifts/Delivery Available

ரூ10 முதல்.. Gifts Cheapest Price/Surprise Gifts,Valentine Gifts,Customized Gifts/Delivery Available

What is a directory

What is a directory

Splendor : Satbir Aujla (Official Video) Sharry Nexus | Rav Dhillon| Latest Punjabi Songs | Geet MP3

Splendor : Satbir Aujla (Official Video) Sharry Nexus | Rav Dhillon| Latest Punjabi Songs | Geet MP3

Sara Lugo feat. Protoje - Really Like You (Official Video) prod. by Silly Walks Discotheque

Sara Lugo feat. Protoje - Really Like You (Official Video) prod. by Silly Walks Discotheque

if found - Dead of Night (Lyrics)

if found - Dead of Night (Lyrics)

Introduction to Anatomy & Physiology: Crash Course A&P #1

Introduction to Anatomy & Physiology: Crash Course A&P #1

SG Lewis - Hurting (ft. AlunaGeorge)

SG Lewis - Hurting (ft. AlunaGeorge)

Discover a frightfully fun adventure with these LEGO Super Mario Luigi’s Mansion Sets

Discover a frightfully fun adventure with these LEGO Super Mario Luigi’s Mansion Sets

Japanese Breakfast - Essentially (Official Audio)

Japanese Breakfast - Essentially (Official Audio)

T-MOBILE | THIS WILL BE IMPORTANT!!

T-MOBILE | THIS WILL BE IMPORTANT!!

CHROME STEEL (Judas Priest Tribute) - Between The Hammer And The Anvil (Official Music Video)

CHROME STEEL (Judas Priest Tribute) - Between The Hammer And The Anvil (Official Music Video)

Video 9 -Statement of Owner's Equity

Video 9 -Statement of Owner's Equity

Beautiful Relaxing Music • Peaceful Piano Music & Guitar Music | Sunny Mornings by Peder B. Helland

Beautiful Relaxing Music • Peaceful Piano Music & Guitar Music | Sunny Mornings by Peder B. Helland

Keane - Everybody's Changing (Alternate Version)

Keane - Everybody's Changing (Alternate Version)

Mother’s Recipe Bhelpuri Chutney

Mother’s Recipe Bhelpuri Chutney

3 Soft signs of deterioration

3 Soft signs of deterioration

People Who Are At Another Level | Most Amazing Skills And Talent !

People Who Are At Another Level | Most Amazing Skills And Talent !