I currently have an Observable timer:
private poller(): Observable<PrepareData> {
return Observable.timer(0, 5000).switchMap(() => this.http.get("/cgi/dashboard.php")).map(res => res.json());
}
I'd like to have it so a get request is done 5 seconds after the last one completed. Any easy way to do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…