delay failed on ajax call
See original GitHub issueI am trying to delay the ajax call.
RxJS version: 5.52
Code to reproduce:
ajax.get(url).delay(1000);
Expected behavior: Delay 1s
Actual behavior: No delay
Additional information: I found the walkaround way at here by
Observable.timer(1000).flatMapLatest(ajax.get(url))
But it would be great to fix it.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
delay in ajax success not working - Stack Overflow
Using setTimeout( function, time ) is the best solution. But if you want to animate the button, you can make it with jQuery...
Read more >How to set timeout for ajax by using jQuery? - GeeksforGeeks
In responsive interface, the programmer needs to delay the ajax request to achieve some task before the response. This can be achieved by ......
Read more >Delay AJAX call for X seconds - SitePoint
jQuery code snippet to delay AJAX call for X seconds. Could be used for events that require action before getting data from the...
Read more >Ajax (remote data) - The jQuery replacement for select boxes
Simply use the ajax.delay configuration option to tell Select2 how long to wait after a ... success, failure) { var request = new...
Read more >slow jquery ajax response - Google Groups
Hi all, I have a jquery ajax call below to bitly that on occasion takes over 2 minutes to finish when it fails...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
in this case
when you called
a$.subscribe
, ajax would execute immediately.delay
operator here is just take the response of ajax and delay to pass it tonext
operator
.subscribeOn
take a scheduler, which means it would change yoursubscribe time scheduler
.it just equal to:
remember, whenever you call
subscribe
on aObservable
, thesource
of thisObservable
would execute immediately, onlysubscribeOn
operator could change it.This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.