Q:

angular elementref parent

// Inject the element itself:
constructor(private elRef: ElementRef){}

// access the native elements parent:
ngOnInit() {
  console.log(this.elRef.nativeElement.parentElement);
}
0

New to Communities?

Join the community