Answers for "angular closest element"

0

angular closest element

constructor(private elRef: ElementRef){}

ngOnInit() {
   const parentElement = this.elRef.nativeElement.closest('.parent-element-class')
}
Posted by: Guest on May-02-2020

Code answers related to "TypeScript"

Browse Popular Code Answers by Language