#Angular

  Рет қаралды 16,647

Decoded Frontend

Decoded Frontend

Күн бұрын

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) 📣
bit.ly/angular...
✅ Use 10%-off coupon code: KZbin_DISCOUNT (Only 2 coupons left)
📣 Blazing fast GraphQL Backend just in 1 Day with Hasura Engine 📣
bit.ly/complet...
✅ 20%-off coupon code: HASURA-EASY-START
⚠️ New to Angular?
Get the best onboarding Angular course which I used for easy start with Angular:
bit.ly/angular-...
------------------ See my another videos about Angular ------------------
✅ Check out my video "My TOP 5 Angular Interview Questions"
• TOP 5 Angular Intervie...
✅ Check out my videos about Angular Material Library:
• Angular Material
✅ Check out my videos about Angular CDK:
• Angular Material CDK
#angulartutorial #webdevelopment #dependencyinjection

Пікірлер: 44
@pedrofernandes2005
@pedrofernandes2005 3 жыл бұрын
Very good explanation, and with examples makes it easier to understand where this could be useful. Thanks!
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
Thanks, Pedro :)
@waldBestMusics
@waldBestMusics Жыл бұрын
Fantastic content, keep on going producing video about reusability and angular, very greatfull for this video!
@vietanhvu2945
@vietanhvu2945 3 жыл бұрын
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 ?
@MatiasAlibertti
@MatiasAlibertti 3 жыл бұрын
Amazing content. Thank you!
@navnathjadhav9111
@navnathjadhav9111 3 жыл бұрын
As usual superb explanation..
@tranzienttech8011
@tranzienttech8011 3 жыл бұрын
Excellent explanation,please make video on previous next value of textbox,how to maintain in angular internal storage mechanism
@rajwantsingh4750
@rajwantsingh4750 3 жыл бұрын
please make a video on the angular routing guards.....
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
Good point, thanks! There are a lot of interesting things to discuss there :)
@rboy879
@rboy879 3 жыл бұрын
Men soo good the explanation!!!. I basically an ng pro now :)
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
😄 great to hear that and thanks for feedback!
@igorparampam5984
@igorparampam5984 Жыл бұрын
Спасибо, наконец то смог разобраться.
@DecodedFrontend
@DecodedFrontend Жыл бұрын
Отлично 👍🏻 Рад слышать, что видео оказалось не бесполезным 😊
@VipinRawat_Offcial
@VipinRawat_Offcial 3 жыл бұрын
Waaaw simply amazing👌👌👌👌
@alexeykharchenko4559
@alexeykharchenko4559 3 жыл бұрын
I can't understand the usefull case for that. Why we can't just simply use required service (GalleryCustomLoggerService) inside GallerySlideComponent (inject in constructor)?
@shuvajitmohanty9595
@shuvajitmohanty9595 Жыл бұрын
@DecodedFrontend can you please respond to this question if possible.
@giorgikirvalidze394
@giorgikirvalidze394 2 жыл бұрын
skipself would do exactly same thing as view providers does right ?
@hiteshsuthar1097
@hiteshsuthar1097 Жыл бұрын
Thanks, best wishes ✨❄️🔥🙏
@krzysztoftokarz3684
@krzysztoftokarz3684 Жыл бұрын
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?
@DecodedFrontend
@DecodedFrontend Жыл бұрын
Hi! Much appreciate your feedback :) Could you please describe in a bit more detail what exactly is different when it comes to Standalone components? or maybe you have some reproducible examples in Stackblitz?
@krzysztoftokarz3684
@krzysztoftokarz3684 Жыл бұрын
Never mind... :) i must have missed something because now it works as expected
@navnathjadhav9111
@navnathjadhav9111 3 жыл бұрын
In short does it means view providers is not available for projected content? They are only limited to current component or current component children?
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
Hi, Yes, exactly! you can say it like this :)
@ermahesh2009
@ermahesh2009 Жыл бұрын
Great, decoded
@moisesleonor7730
@moisesleonor7730 3 жыл бұрын
Excellent video 🏅
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
Thanks 🙏🏻
@ilirbeqiri253
@ilirbeqiri253 3 жыл бұрын
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?
@mateuszhaada6837
@mateuszhaada6837 Жыл бұрын
Yes. viewProviders array makes services avaialble only for current component and current component children.
@Yumo3000
@Yumo3000 3 жыл бұрын
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
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
Hi! Do you mean that every app-gallery-slide has its own insurance of the service?
@Yumo3000
@Yumo3000 3 жыл бұрын
@@DecodedFrontend Yeah, I mean that every app-gallery-slide has its own instance of the logger interface.
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
@@Yumo3000 then you have to provide a service in app-gallery-slide component (in @Component annotation) instead of app-gallery component as it is now. If you do so, then angular create a separate instance of service for every slide component
@Yumo3000
@Yumo3000 3 жыл бұрын
​@@DecodedFrontendYeah, that's fine, but I mean, how can I assign the service instance that is using the child, from parent component?
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
If you want to access the children’s service instance from parent Try to use: @ViewChild(GallerySlideComponent) slide: GallerySlideComponent; in parent (GalleryComponent) and then in “slide” you will have an instance of Slide Component and you can access there the service of the slide. Just don’t forget to change access modifier from “private” to “public” in a constructor of the slide component.
@waldBestMusics
@waldBestMusics Жыл бұрын
How can you use the new service in the gallery and in the slide ?, now only is used in the slide component ?
@_cipriangg_
@_cipriangg_ 2 жыл бұрын
Amazing content!
@ihor-pidhornyi
@ihor-pidhornyi 2 жыл бұрын
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
@JavierAcrich
@JavierAcrich 2 жыл бұрын
So, can we conclude that if you have an ng-content in the template, you should use viewProviders ?
@mateuszhaada6837
@mateuszhaada6837 Жыл бұрын
Not always. Only if you want to hide some services from projected content.
@aumpragashgnanaguru5484
@aumpragashgnanaguru5484 3 жыл бұрын
I like ur subscribe 😄
@cipherxen2
@cipherxen2 2 жыл бұрын
Couldn't spot the difference it made. Can anyone help?
Advanced #Angular Patterns - ForRoot & ForChild (2021, Decoded)
32:03
Decoded Frontend
Рет қаралды 48 М.
Angular Dependency Injection in Depth - Resolution modifiers (2021)
14:39
버블티로 부자 구별하는법4
00:11
진영민yeongmin
Рет қаралды 13 МЛН
😜 #aminkavitaminka #aminokka #аминкавитаминка
00:14
Аминка Витаминка
Рет қаралды 223 М.
Сюрприз для Златы на день рождения
00:10
Victoria Portfolio
Рет қаралды 1,4 МЛН
Ozoda - Lada ( Official Music Video 2024 )
06:07
Ozoda
Рет қаралды 28 МЛН
What’s new in Angular v18
20:08
Angular
Рет қаралды 128 М.
Angular Inject Function - New Way to Inject Services in Angular 14?
21:56
Angular Dependency Injection in Depth - Multiple Providers (2020)
16:02
Decoded Frontend
Рет қаралды 22 М.
ProvidedIn root vs any in angular | Angular Tutorial
11:03
WebGentle
Рет қаралды 4,5 М.
TOP 5 Angular Interview Questions and Answers (for experienced, 2020)
21:50
Angular dependency injection in depth -  Dependency providers (2021)
17:19
ForwardRef Function in Angular (Advanced, 2021)
18:40
Decoded Frontend
Рет қаралды 18 М.
Angular Design Patterns - Bridge [Advanced, 2020]
24:34
Decoded Frontend
Рет қаралды 47 М.
NgTemplateOutlet in Angular - Everything You Have to Know (2022)
35:15
Decoded Frontend
Рет қаралды 51 М.
버블티로 부자 구별하는법4
00:11
진영민yeongmin
Рет қаралды 13 МЛН