Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

angular closest element

constructor(private elRef: ElementRef){}

ngOnInit() {
   const parentElement = this.elRef.nativeElement.closest('.parent-element-class')
}
 
PREVIOUS NEXT
Tagged: #angular #closest #element
ADD COMMENT
Topic
Name
4+9 =