1 用class找到
import { ElementRef} from '@angular/core';
private el: ElementRef,
this.el.nativeElement.querySelector('.domclass')
2.指定位置找到
<div #div3></div>
import { ViewChild} from '@angular/core';
@ViewChild('div4', { static: false }) d3: any;
this.d3.nativeElement