Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get child eleemtn by native element angular

export class App {
  el: ElementRef;
  constructor(el: ElementRef){
    this.el = el; 
  },
  ngAfterViewInit() {
    const hostElem = this.el.nativeElement;
    console.log(hostElem.children);
    console.log(hostElem.parentNode);
  }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #child #eleemtn #native #element #angular
ADD COMMENT
Topic
Name
1+9 =