1@ViewChild('myButton') myButton : ElementRef;
2
3triggerClick() {
4 let el: HTMLElement = this.myButton.nativeElement as HTMLElement;
5 setTimeout(()=> el.click(), 5000);
6}
7
1<button #myButton id="refresh" class="btn- fa fa-refresh" aria-hidden="true" value="referesh" (click)="triggerClick()"> Refresh</button>
2