@ViewChild/@ViewChildren in Angular (Tutorial 35)
ฝัง
- เผยแพร่เมื่อ 15 ก.ย. 2024
- @ViewChild/@ViewChildren decorator provides us with a easy and simple way to access and manipulate the properties and methods of a Child Component from a container or root component.
By using @viewchild we can achieve the following things,
• Accessing template of same component
• Accessing the template of child component
The @ViewChild query returns the first matching element from the DOM and updates the component variable on which we apply it.
we must supply the query selector, which can be a string or a type as the first argument to the ViewChild
Please watch my other video that I have created to explain the functionality of Subject and its variants in RxJS, so that you can understand it easily in Angular.
RxJS Subject: • RxJS Subject | What is...
RxJS BehaviorSubject : • BehaviorSubject | Beha...
RxJS Replay Subject: • ReplaySubject | Replay...
Angular Subject and BehaviorSubjet: • Subject and BehaviorSu...
Promises vs Observables: • Promises vs Observable...
Promises vs Observables shorts: • Promise vs Observable ...
DON'T CLICK HERE: shorturl.at/AFGJT
This code is available on github:
github.com/nis...
This Book will help you to understand angular more: amzn.to/3f1nf9q
I have used below FAKE API in demo to illustrate the AsyncSubject:
restcountries....
►Subscribe Now: / nishasingla 🔔 Stay updated!
Watch complete playlist here: • Introduction- Angular ...
Follow us on:
Facebook: / angularjs4beginners
LinkedIn: / nisha-singla-82407aa0
Instagram: / passion4code
#viewchildren #viewchild #nishasingla
Very simple and clear video
such a wonderful explanation...
very well explained (y) Keep up the good work.
Thanks 😊
Great 🎉
Amazing Explanation in very easy words. hats off to you . such a great tutorial.
Thank you so much for your comment 😀😀👍🏻
Finally really understanding these concepts and where everything is supposed to go and how it gets accessed. After countless of tutorials, articles and Maximilian's Schwarzmuller's famous Udemy course put on repeat for these concepts (he does NOT know how to properly explain concepts), you are like a breath of fresh air! Thank you! Going to check out if you also explain the ContentChild concept as well. have an amazing day Nisha! :)
Really glad to know that you finally got what you were looking for ..
Checkout this video Content Projection with ng-content (Tutorial 36)
th-cam.com/video/b71prZA8sQ0/w-d-xo.html
Stay connected 🤞🏻😀
Yes I too agree with Cora..Max famous course is not at all digestive for freshers like me ..He never explains basic concepts properly 👀😅..Thanks to you as finally after wasting 2 days I understood some important concepts!! I'm super excited to learn angular from your videos now!!
checkout procademy utube channel for angular hes great for freshers
I couldn't agree more about Nisha -- and I knew she was different inside of 60 seconds of this video. I was working on an exercise that went through the "Difference between Template-Driven and Reactive Forms in Angular" -- and I was running into some compilation errors. One of them involved @ViewChild -- and it was a blessing in disguise because that issue led me here.
As for Maximilian, through immense experience -- my advice would be to never get too hung up on a particular teacher (regardless of reputation). I'm not commenting one way or the other on his courses -- I'm simply saying that if you find yourself repeating the instruction, find someone else who works better for you. I'm sure you know that now, but I wanted to mention it anyway.
For example: I was watching an excellent Udemy course on OOP in C#. The course is great for what it is -- but it doesn't dive into detail (which is fine because it wasn't designed that way). But I had a couple of questions along the way -- where I wanted more detail. That led me to this guy (who blew my mind -- once again, inside of 60 seconds).
PART 1: Constructors in C#.NET Part 1 | C#.NET Tutorial | Mr. Bangar Raju.
That guy dives into detail like nothing I've ever seen -- and he makes every second count. Moreover, by the end of each video -- I understood everything he explained (which is incredibly rare for complexity at that level -- for me, anyway). Once again, that's not a knock on other instructors -- as their instruction is obviously working for some people. And of course, I'm not saying we shouldn't be critical of instructors -- I'm just saying that it often comes down to just finding the right ones for you.
Speaking of which: I already have plenty of good resources on Angular, but I feel quite fortunate to have found Nisha -- as she set herself apart right out of the gate. Gotta love how that works: The frustration of resolving compilation issues and digging deeper to understand -- led me someone who can help me better understand.
. . .
@@akd2487 Probally that guy does not fully understand the concepts...otherwise he can explain it clearly!
Thank you, finally someone who explains @ViewChild clearly.
thank you much 😀😀
Superb....Good explained...
Great explanation. Thanks for clearing all my doubts on @viewchild and @viewchildren
Excellent
Never understood this viewchild and viewchildren until i saw this video. Thanks a lot.
I'm glad my video was able to help you understand this subject.
Simply amazing !!!! love your teaching style
You are really amazing, i have been stuck in this viewchild from very long and you made me understand in single go.. Thank you
Good to know it helped you 😀😀
can i get your number
very simple but detailed and easy to understand tutorials. thanks a lot !!!
Nisha, you are an excellent trainer with expertise in the subject. You explained such complex concepts/topics of angular effortlessly. I am a big fan of you. I watched your whole angular series and only one word, it is awesome. I have never seen such a detailed explanation of Angular Topics. You really made our life easy. Thank you so much and Hope you will continue to share your knowledge with strugglers.
very well explained. thanks
Very nice tutorial... thankyou somuch
Wow really a great tutorial because its a good description of viewchild n viewchildren. Thanks a lot
Thanks! This video cleared up a lot of my doubts!
Explain in simple way, Thanks
Nice explanation easy to understand the concept
Having watched the whole course before, I now use it as a reference.
Thanks again for putting it out there.
Still helping developers a year in 👍🏾
Excellent simple Explanation .
Today only I got to know your channel... Really all your videos are amazing and you know it's superb superb all concepts are very clean and clear... Thanks a lot and really God bless you for your wonderful work
Thank you so much.. Glad to know you like it :)
Stay connected
Very great.. Ur way of explanation is too good.. Thanks for the video
Thank you 🙏
Exactly!!
Thanks ☺️
Excellent tutorial! Thank you 👍
Thanks
Good job mam🎉
Amazing content ...very helpful .
Highly recommended for beginners
This is such a clear explanation, you could easily start with angular development using this series
Thanks for so simple explanation
😀😀
Great
Very nicely explained.
The comparison with JS helped a lot.
Good job
Thank you 😊…
Frankly speaking, this short really saved me.
thanks a lots
Got good clarity of viewchild and viewchild, never been this clear, thanks :)
Keep going!!
Glad it helped!
greate ...
Wow, this is amazing. Described the concept very clearly and into the point. Now I fully understand the concept upto this point. Keep up with great work.
Thanks for your teaching 🎉
Top 🤗
Thanks from the bottom of my heart
🙏🙏😊😊
Nice Explaination
Thank you 😊
Very well explained..... thank u :)
wow how easily you explained
thanks for such vedios.😊🙂
This is the best explanation of @ViewChild() ✨❄️🤍
you are a blessing for angular beginners, thank you so much for your hard work
you are the best. so far I have seen many videos for angular but nobody made it so clear about life cycle hooks thank you so much for keeping it so clean.
awesome 😊
Simple & to the point. Keep up the good work Nisha.
OMG this woman is the best Angular Tutor I've seen!
Thank you so much for your excellent videos!
Thank you so much for showing this response 😀😀🙏🙏✌🏻
you are a blessing for angular beginners like me, thank you so much!!!
Quality content Nisha. Completely understood. Subscribed.
Thanks for connecting 😀😀
Super Madam. Thanks for giving valuable Info
😀😀
excellent explaination
Wow! Crisp and Clear 👍
I always consider this topic difficult and always try to skip. But you are great, you made me understand it very easily and never forget type. Thank you so much....
Thank you 😊
thanks for the video it really helped me.
Great ..Nice.. Very easily you explained Ma'am.. 👍
Very good explanation.
Thanks 😊
mindblowing explanation.
you are awesome
thank you very much
😊😊🙏🙏
thanks a lot. You made me tension free.
Thank you 😊
great Nisha... more thanks for this video.... kindly do video for headers and interceptor concept...
Just a small additional note. Instead of putting ref to a child component we could just put this in our .ts file ->
*@ViewChild(CounterComponent) child: CounterComponent* instead of *@ViewChild('childView) child: CounterComponent*
In this way we are omitting the usage of ref in .html file. Btw, video is super helpful and clear. Thanks :)
Hey thanks for your suggestion.. Appreciate 👍🏻👍🏻😊😊
Thank you ma'am for this knowledge
Best explanation so for this topic
Awesome Nisha... thanks for the clean and clear explanation
Just Amazing Nisha. Kudos to you !! Thanks a lot
wow Nisha , this is really good !! keep up the good work . loads of good wishes to you
Thanks a lot 😊
wow, very well explained :D
Very nice explanation
Very nicely explain
Great video, Thanks!!
Best Explanation
Mam amazing teaching..... Pls continue the angular series.... It will be helpful for everyone.......
Thank you 🙏 sure
Hey Thanks for the explanation , it was really helpful , these concepts were initially hard to learn and grasp with other instructors , and now you've made it super simple to understand thanks for your effort, and also it would be great if you could teach on connecting angular CRUD app to mysql database , hoping to learn a lot from you !
So beautifully explained!
just want to say THANK YOU (with heart symbol)
Clear explanation
Thank you 🙏
It helped me a lot to understand the concept clearly. thankyou for your efforts ... 🔥
Thank you 😊
Your teaching soo simple
Mam your voice is clear and beautiful, I can understand clearly all the concepts, thanks for sharing the knowledge!!
Nisha you are doing marvelous job i loved it super I never saw such types of angular videos in TH-cam great job
Thank you so much 🙂
great tutorial ! thanksss
Wow.. I got this concept.. thanks
Glad to know 😀😀
kept it really simple to understand. cheers
You are explaining all concepts really well Nisha.
Thank you
Appreciated your explanation
perfect..
Thanks 🙏
Great 👏
Good tutorial
amazingg!!
Thank you 😊
Literally..I am addicted to ur videos..such great & wonderful explanation I ever watched on TH-cam..thank u so much for ur efforts..it make our life easier technically..🥰👍
Addiction is not good for health. LoL
Thank you so much. This is a great content!
Hey thanks 😊
Your teaching technique is great and also you have very depth knowledge, I have subscribed your channel and looking to learn more complex things about Angular. Thank you
very well explained
wow❤
Wonderful.
Thank you 😊
Thanks a lot
Hey Nisha, you're so good at explaining and you made my day dear. Please post video on resolvers if possible.
Thanks Swathi 😀😀
nice mam
very well explained
😘😘😘😘