Angular do something when element is visible

73 Views Asked by At

I want to call method when component is visible. Problem is that component is not visible but hook ngAfterViewInit is called anyway. What can I do to call it after component is visible.

ngAfterViewInit(): void {
 methodToBeCalled();
}
0

There are 0 best solutions below