@ViewChild/@ViewChildren in Angular (Tutorial 35)

Поделиться
HTML-код
  • Опубликовано: 10 фев 2025
  • @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

Комментарии • 213

  • @Faildragon
    @Faildragon 3 года назад +3

    Thank you, finally someone who explains @ViewChild clearly.

  • @HemanthHemszz
    @HemanthHemszz 3 года назад +1

    Never understood this viewchild and viewchildren until i saw this video. Thanks a lot.

    • @NishaSingla
      @NishaSingla  3 года назад

      I'm glad my video was able to help you understand this subject.

  • @indian7082
    @indian7082 Месяц назад

    Iam big fan of your videos.. Excellent explanation.

  • @krishnag6199
    @krishnag6199 2 года назад

    Very nice tutorial... thankyou somuch

  • @VijayKumar-fq4ie
    @VijayKumar-fq4ie Год назад

    Wow really a great tutorial because its a good description of viewchild n viewchildren. Thanks a lot

  • @nagendirank8010
    @nagendirank8010 2 года назад

    Nice explanation easy to understand the concept

  • @nitinprachandacogz5795
    @nitinprachandacogz5795 2 года назад +1

    very well explained. thanks

  • @vivekgupta309
    @vivekgupta309 Год назад

    very simple but detailed and easy to understand tutorials. thanks a lot !!!

  • @NayanJoshi24
    @NayanJoshi24 3 года назад +3

    very well explained (y) Keep up the good work.

  • @neelamvishvakarma3609
    @neelamvishvakarma3609 2 года назад +2

    Amazing Explanation in very easy words. hats off to you . such a great tutorial.

    • @NishaSingla
      @NishaSingla  2 года назад

      Thank you so much for your comment 😀😀👍🏻

  • @fanan5023
    @fanan5023 2 года назад

    Frankly speaking, this short really saved me.
    thanks a lots

  • @jayantiroy1476
    @jayantiroy1476 3 года назад +1

    Thanks for so simple explanation

  • @bedtimeanimationadventures
    @bedtimeanimationadventures 2 месяца назад

    Ramdomly I found this video and its crystal clear for me thanks😊

  • @omkarmankar1524
    @omkarmankar1524 Месяц назад

    well explained. thanks

  • @colossal_velocity
    @colossal_velocity 2 года назад +1

    Excellent tutorial! Thank you 👍

  • @MaheshSuryawanshi-r1v
    @MaheshSuryawanshi-r1v 5 месяцев назад

    Very simple and clear video

  • @joshuatye1027
    @joshuatye1027 2 года назад

    Thanks for your teaching 🎉

  • @arpit846
    @arpit846 10 месяцев назад

    Explain in simple way, Thanks

  • @subhashthenua7404
    @subhashthenua7404 2 года назад

    wow how easily you explained
    thanks for such vedios.😊🙂

  • @sourabhpandit6724
    @sourabhpandit6724 9 месяцев назад

    Excellent simple Explanation .

  • @rohitpandey9986
    @rohitpandey9986 Год назад

    Wow! Crisp and Clear 👍

  • @31sar
    @31sar 3 года назад +1

    Thanks from the bottom of my heart

  • @poornivaishu780
    @poornivaishu780 2 года назад +1

    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

    • @NishaSingla
      @NishaSingla  2 года назад

      Thank you so much.. Glad to know you like it :)
      Stay connected

  • @Adnan3035
    @Adnan3035 3 года назад +1

    Very good explanation.

  • @437pavankalyan2
    @437pavankalyan2 6 месяцев назад

    such a wonderful explanation...

  • @vj-angular
    @vj-angular 3 года назад +2

    Very great.. Ur way of explanation is too good.. Thanks for the video

  • @codewithvamshee6634
    @codewithvamshee6634 3 года назад +1

    Super Madam. Thanks for giving valuable Info

  • @sliceoflife2014
    @sliceoflife2014 2 года назад

    Great ..Nice.. Very easily you explained Ma'am.. 👍

  • @varunkumar1961
    @varunkumar1961 Год назад

    you are a blessing for angular beginners, thank you so much for your hard work

  • @rahulsingh12
    @rahulsingh12 Год назад

    Simple & to the point. Keep up the good work Nisha.

  • @arslanghummann
    @arslanghummann 2 года назад +1

    great tutorial ! thanksss

  • @tanveeransari989
    @tanveeransari989 Год назад

    mindblowing explanation.
    you are awesome

  • @rsodeyi
    @rsodeyi Год назад

    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 👍🏾

  • @naragoud428
    @naragoud428 2 года назад

    excellent explaination

  • @NitinTalwar-v3z
    @NitinTalwar-v3z Год назад +1

    kept it really simple to understand. cheers

  • @vaibhavsarode2426
    @vaibhavsarode2426 3 года назад +1

    Nice Explaination

  • @zihadurrahmman4227
    @zihadurrahmman4227 2 года назад +1

    thanks a lot. You made me tension free.

  • @ivtechnet6661
    @ivtechnet6661 3 года назад +1

    Very well explained..... thank u :)

  • @coradragut4505
    @coradragut4505 3 года назад +26

    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! :)

    • @NishaSingla
      @NishaSingla  3 года назад +1

      Really glad to know that you finally got what you were looking for ..
      Checkout this video Content Projection with ng-content (Tutorial 36)
      ruclips.net/video/b71prZA8sQ0/видео.html
      Stay connected 🤞🏻😀

    • @akd2487
      @akd2487 2 года назад +4

      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!!

    • @maheshshirsat9075
      @maheshshirsat9075 2 года назад

      checkout procademy utube channel for angular hes great for freshers

    • @rickmemmer5625
      @rickmemmer5625 Год назад

      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.
      . . .

    • @codewithme172
      @codewithme172 Год назад

      @@akd2487 Probally that guy does not fully understand the concepts...otherwise he can explain it clearly!

  • @prashantchavan962
    @prashantchavan962 2 года назад +1

    Simply amazing !!!! love your teaching style

  • @shreyasbhargava55
    @shreyasbhargava55 2 года назад

    Very nicely explain

  • @hiteshsuthar1097
    @hiteshsuthar1097 Год назад +1

    This is the best explanation of @ViewChild() ✨❄️🤍

  • @dhaneshdhanawade
    @dhaneshdhanawade Год назад

    Best explanation so for this topic

  • @abhisheksoni6012
    @abhisheksoni6012 6 месяцев назад

    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.

  • @ZahidHussain-hj2dk
    @ZahidHussain-hj2dk 2 года назад

    Amazing content ...very helpful .
    Highly recommended for beginners

  • @sameerrout1723
    @sameerrout1723 2 года назад

    Your teaching soo simple

  • @theshivrajofficial8444
    @theshivrajofficial8444 2 года назад

    Thank you ma'am for this knowledge

  • @stavroskefaleas6320
    @stavroskefaleas6320 3 года назад +2

    OMG this woman is the best Angular Tutor I've seen!
    Thank you so much for your excellent videos!

    • @NishaSingla
      @NishaSingla  3 года назад

      Thank you so much for showing this response 😀😀🙏🙏✌🏻

  • @rakeshswain16
    @rakeshswain16 Год назад

    Awesome Nisha... thanks for the clean and clear explanation

  • @akash.deep1001
    @akash.deep1001 2 года назад

    Just Amazing Nisha. Kudos to you !! Thanks a lot

  • @ranjithkumar4170
    @ranjithkumar4170 8 месяцев назад

    Very nice explanation

  • @naturalworld5513
    @naturalworld5513 2 года назад

    Mam your voice is clear and beautiful, I can understand clearly all the concepts, thanks for sharing the knowledge!!

  • @poojaas5939
    @poojaas5939 3 года назад +11

    You are really amazing, i have been stuck in this viewchild from very long and you made me understand in single go.. Thank you

  • @pruthvirajmekala2611
    @pruthvirajmekala2611 2 года назад

    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.

  • @Stylehackswithpal
    @Stylehackswithpal 3 года назад +1

    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....

  • @Deen.youth.
    @Deen.youth. Год назад

    Good job mam🎉

  • @shrikhan2215
    @shrikhan2215 2 года назад

    you are a blessing for angular beginners like me, thank you so much!!!

  • @akashchoudhary681
    @akashchoudhary681 2 года назад

    thanks for the video it really helped me.

  • @pranitachikorde603
    @pranitachikorde603 2 года назад +1

    This is such a clear explanation, you could easily start with angular development using this series

  • @ashokece7642
    @ashokece7642 3 года назад +1

    Wow.. I got this concept.. thanks

  • @Uzair_Anwar2299
    @Uzair_Anwar2299 Год назад

    Appreciated your explanation

  • @rohanayush
    @rohanayush 2 года назад

    So beautifully explained!

  • @ecevetri9545
    @ecevetri9545 Год назад

    Best Explanation

  • @mytop3467
    @mytop3467 2 года назад

    Good tutorial

  • @pankajmenkudale
    @pankajmenkudale 7 месяцев назад

    Superb....Good explained...

  • @jaydeeppatil9120
    @jaydeeppatil9120 2 года назад

    Great 👏

  • @always_curious7527
    @always_curious7527 3 года назад +1

    Got good clarity of viewchild and viewchild, never been this clear, thanks :)
    Keep going!!

  • @PrafullakumarSahuprofile
    @PrafullakumarSahuprofile 3 года назад +1

    Quality content Nisha. Completely understood. Subscribed.

    • @NishaSingla
      @NishaSingla  3 года назад

      Thanks for connecting 😀😀

  • @ashishnayak2666
    @ashishnayak2666 3 года назад +1

    Clear explanation

  • @CheeJinOng
    @CheeJinOng 2 года назад

    very well explained

  • @narainsankar
    @narainsankar Год назад

    Great explanation. Thanks for clearing all my doubts on @viewchild and @viewchildren

  • @gauridesai8274
    @gauridesai8274 2 года назад +1

    wow Nisha , this is really good !! keep up the good work . loads of good wishes to you

  • @mdgosoddin192
    @mdgosoddin192 Год назад

    Excellent knowledge.

  • @easycode937
    @easycode937 10 месяцев назад

    very well explained
    😘😘😘😘

  • @florianuhlmann1653
    @florianuhlmann1653 3 года назад +2

    Very nicely explained.
    The comparison with JS helped a lot.
    Good job

  • @maheshlowe907
    @maheshlowe907 2 года назад +1

    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.

  • @riteshk9879
    @riteshk9879 3 года назад

    awesome 😊

  • @SuryaPraK45H
    @SuryaPraK45H Год назад

    Thanks! This video cleared up a lot of my doubts!

  • @adarshdwivedi5395
    @adarshdwivedi5395 Год назад

    Great 🎉

  • @vineethaboyidi9789
    @vineethaboyidi9789 2 года назад +1

    Great video, Thanks!!

  • @novidade16
    @novidade16 2 года назад

    you are the best

  • @rajeevkalangi2472
    @rajeevkalangi2472 3 года назад +1

    Wonderful.

  • @harinip3157
    @harinip3157 3 года назад +1

    Nisha you are doing marvelous job i loved it super I never saw such types of angular videos in RUclips great job

  • @sajithashankar4825
    @sajithashankar4825 2 года назад +1

    You are explaining all concepts really well Nisha.

  • @nagababuk2197
    @nagababuk2197 2 года назад +1

    It helped me a lot to understand the concept clearly. thankyou for your efforts ... 🔥

  • @mohamedasiq3750
    @mohamedasiq3750 3 года назад +1

    thank you very much

  • @ksas323
    @ksas323 2 года назад

    Top 🤗

  • @DebasmitSamal294
    @DebasmitSamal294 7 месяцев назад

    Excellent

  • @jaywantnarwade
    @jaywantnarwade 11 месяцев назад

    nice explanation, most of doubt clear

  • @sornamanickam1692
    @sornamanickam1692 3 года назад +1

    Mam amazing teaching..... Pls continue the angular series.... It will be helpful for everyone.......

  • @GospelBeats
    @GospelBeats 3 года назад +1

    First off, Thank you so much for breaking down the concept of @ViewChild in Angular! I have a question, at 18:15 in the video, in the viewchild.component.html, on the line: Counter {{ child?.counter }}. Why did you add the question mark?

    • @NishaSingla
      @NishaSingla  3 года назад

      Thanks 😊
      ? Is basically for optional chaining , just to avoid error when object is undefined
      You can read more about this here
      ruclips.net/video/3yZuXLjWPjU/видео.html

    • @GospelBeats
      @GospelBeats 3 года назад

      @@NishaSingla Awesome! Thank you!

  • @hashtagrahul15
    @hashtagrahul15 2 года назад

    wow, very well explained :D

  • @chaka1530
    @chaka1530 3 года назад +4

    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 :)

    • @NishaSingla
      @NishaSingla  3 года назад +1

      Hey thanks for your suggestion.. Appreciate 👍🏻👍🏻😊😊

  • @alissoncode9352
    @alissoncode9352 3 года назад +1

    Thank you so much. This is a great content!

  • @vasanthapandiyanm2405
    @vasanthapandiyanm2405 3 года назад +1

    great Nisha... more thanks for this video.... kindly do video for headers and interceptor concept...

  • @tousifbiswas1115
    @tousifbiswas1115 9 месяцев назад

    greate ...

  • @poojabalsaraf4800
    @poojabalsaraf4800 3 года назад +1

    Literally..I am addicted to ur videos..such great & wonderful explanation I ever watched on RUclips..thank u so much for ur efforts..it make our life easier technically..🥰👍

  • @chaplinchowdhury2240
    @chaplinchowdhury2240 2 года назад

    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

  • @Muslim-zm8sx
    @Muslim-zm8sx 2 года назад

    Great

  • @swathikulkarni2749
    @swathikulkarni2749 3 года назад +1

    Hey Nisha, you're so good at explaining and you made my day dear. Please post video on resolvers if possible.