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.
Sur cette page du site, vous pouvez voir la vidéo en ligne Angular Component Interaction - @ViewChild | Pass Data Between Component | CodeWithSrini durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur CodeWithSrini 09 juillet 2020, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 4,622 fois et il a aimé 51 téléspectateurs. Bon visionnage!