skip to content
Alvin Lucillo

ViewChild decorator

/ 1 min read

💻 Tech

ViewChild decorator allows access to public methods and variables of a component. One use case is if you want the calling/parent component to trigger data processing in the child component.

@ViewChild(Component1) component1!: Component1;

//...

component1.someFunction();