@ViewChild() using Component:
@ViewChild() can be used for component communication. A component will get instance of another component inside it using @ViewChild(). In this way parent component will be able to access the properties and methods of child component. The child component selector will be used in parent component HTML template. Now let us discuss example.
@Channel11
#c11videos
#c11techlearnigs
#viewchild #channel11angular