-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about minDuration and delay #49
Comments
@cgross Any idea what I might be doing wrong here? |
@cgross I did not have the time yet to fully dig into the source code, but looking at this line, I think this might be the reason for the behavior I am seeing. If I understand it correctly, the promise that resets the |
I think you was doing just fine. It was a bug. My version of tracker.active tracker.active = function(){
if (tracker.delayPromise){
return false;
}
if (tracker.delayJustFinished && tracker.promises.length === 0) {
return false;
}
if (tracker.durationPromise) {
addPromiseLikeThing(tracker.durationPromise);
return true;
}
return tracker.promises.length > 0;
}; |
👍 Thanks! |
Hi,
I am not quite sure if I properly understood the usage of
minDuration
anddelay
.My configuration (
cgBusyDefaults
):What I would like to achieve: only show the busy indicator if the promise takes longer than 300ms to resolve, and then show it at least for 700ms. But in my application, the busy indicator is always shown after the given delay, even if the tracked promise resolves much faster than the delay. Even if I change
delay
to some really high value like 2 seconds, the busy indicator is just shown after this amount of time...Version used: angular-busy 4.1.1 and AngularJS 1.2.16.
Thanks for any hints!
The text was updated successfully, but these errors were encountered: