Give it a ViewChild reference :
<div #myDiv id="tutor-price" (click)="passCharge(r.value['charge'])"><span id="month">? 8?</span> <span id="price"> {{r.value['charge']}} </span></div>
In your component :
@ViewChild('myDiv') myDiv: ElementRef<HTMLElement>;
triggerFalseClick() {
let el: HTMLElement = this.myDiv.nativeElement;
el.click();
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…