@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
3 окт 2024