In child component, by using EventEmitter we can pass value from child component to parent component.
But I see another case, when we declare ViewChild as below:
@ViewChild('childForm') formComponent: ChildFormComponent;
We also use formComponent to get its data (e.g.: formComponent.listStudent)
Is there any importal point that we need to noticed
Please advices
EventEmitter is primarily used for emitting events from child to parent, while ViewChild is used for accessing child components or elements directly in the parent component. Choose the one that best suits you!