update(){
this.timeInterval = interval(2000).pipe(startWith(0), switchMap(() => this.deviceService.getDeviceList())
).subscribe((success: any) => {
this.rowData = success;
console.log("hello")
},
retry(2)
);
}
I have this code which fetches the details after every 2sec. but i want to pause this method whenever user opens up any popup and again start it once he closes the pop. Not getting how can i achieve this in angular?