Felix
0
Q:

angular elementref

// in template
//<div #myEl></div>

@ViewChild("myEl") el: ElementRef;

ngAfterViewInit(){
  this.el.nativeElement.innerHTML = "Hi";
  console.log(this.el);
}
0

New to Communities?

Join the community