With @ViewChild, we can access information from child component esp values from our child component.
A ViewChild has two params, a selector and an option termed as opts which is an object.
Selector can be a template ref or a component, so in this case it’s DrugComponent.
And in the option we have to set static as false.
In the newer release of Angular presumably Angular 9 the default static is set to false.
On this page of the site you can watch the video online Angular Component Interaction - @ViewChild | Pass Data Between Component | CodeWithSrini with a duration of hours minute second in good quality, which was uploaded by the user CodeWithSrini 09 July 2020, share the link with friends and acquaintances, this video has already been watched 4,622 times on youtube and it was liked by 51 viewers. Enjoy your viewing!