#Angular dependency injection in depth – View Providers (2021, Advanced)

preview_player
Показать описание
Dependency Injection is a huge and advanced topic in #angular and if you have been following my channel you should know pretty much everything about it. However, there is one remaining thing to cover - View Providers. I would not say it is widely used feature but it is definitely worth to figure out what gives us View Providers and when it could be useful. Please leave your feedbacks in comments and let's get started to explore further Angular DI. Enjoy!

📣 Become a Pro in Angular Material Theming (Advanced Workshop) 📣
✅ Use 10%-off coupon code: YOUTUBE_DISCOUNT (Only 2 coupons left)

📣 Blazing fast GraphQL Backend just in 1 Day with Hasura Engine 📣
✅ 20%-off coupon code: HASURA-EASY-START

⚠️ New to Angular?
Get the best onboarding Angular course which I used for easy start with Angular:

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

✅ Check out my video "My TOP 5 Angular Interview Questions"

✅ Check out my videos about Angular Material Library:

✅ Check out my videos about Angular CDK:

#angulartutorial #webdevelopment #dependencyinjection
Рекомендации по теме
Комментарии
Автор

Very good explanation, and with examples makes it easier to understand where this could be useful. Thanks!

pedrofernandes
Автор

Fantastic content, keep on going producing video about reusability and angular, very greatfull for this video!

waldBestMusics
Автор

Amazing content, such a gem on youtube, how can I miss your channel all this time. Could you make a video about how to get better after familiar with angular basic ?

vietanhvu
Автор

Excellent explanation, please make video on previous next value of textbox, how to maintain in angular internal storage mechanism

tranzienttech
Автор

please make a video on the angular routing

rajwantsingh
Автор

Men soo good the explanation!!!. I basically an ng pro now :)

rboy
Автор

Спасибо, наконец то смог разобраться.

igorparampam
Автор

I can't understand the usefull case for that.
Why we can't just simply use required service (GalleryCustomLoggerService) inside GallerySlideComponent (inject in constructor)?

alexeykharchenko
Автор

skipself would do exactly same thing as view providers does right ?

giorgikirvalidze
Автор

Hello Dmytro! First of all, your content is great and your explainations are very clear. However i tried to check it in Angular 15 and standalone components and it looks like the bevahior is different. Could you please check this out? Is this some kind of bug with standalone components?

krzysztoftokarz
Автор

In short does it means view providers is not available for projected content? They are only limited to current component or current component children?

navnathjadhav
Автор

Great Content! But what would happen if the slides' components are declared inside the gallery component's template. Will the service will be available also to them?

ilirbeqiri
Автор

Pretty cool!! but what if i want to user different services instances on the app-gallery-slide component. Thanks for theses videos theyre super usefull

Yumo
Автор

How can you use the new service in the gallery and in the slide ?, now only is used in the slide component ?

waldBestMusics
Автор

What if we remove providers from the component where we are using gallery with gallery slides. Does "viewProviders" make providing own service optional? So what I mean, it's like es6 default argument value, if we not provide this argument, default value will be used in the function

ihor-pidhornyi
Автор

So, can we conclude that if you have an ng-content in the template, you should use viewProviders ?

JavierAcrich
Автор

Couldn't spot the difference it made. Can anyone help?

cipherxen