Recursive function with timeout and check RxJs Observable value polling
问题 I have the recursive function: repeatAlert that is called again if data.answered === null : .... Edit this.repeatAlert(id).subscribe( val => console.log(val)); console.log('1stCall Alert: ', new Date().getMinutes()); .... find(id: number): Observable<any> { return this.http.get(`${this.resourceUrl}ByAlertId/${id}` } repeatAlert(id: number) { this.find(id).subscribe((data: AlertInt) => { if (data.answered === null ) { this.sendNotification('Alert ', data.text); console.log('Call Alert: ', new