Answers for "angular elementref parent"

0

angular elementref parent

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

// access the native elements parent:
ngOnInit() {
  console.log(this.elRef.nativeElement.parentElement);
}
Posted by: Guest on May-02-2020

Code answers related to "angular elementref parent"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language