My code statement looks like this:
this.elRef.nativeElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.scrollTo(0, 0);
How could I access an HTML element of an ancestor of the child component(my parent is at the top of the tree)?
I tried with suggested @Host method but seems like I'm getting the copy of Host component, not the parent root element.
Do we have a better syntax for the above statement?