cgross / angular-busy

Show busy/loading indicators on any element during $http requests (or any promise).
http://cgross.github.io/angular-busy/demo
MIT License
1.44k stars 256 forks source link

Promise comparison shouldn't be done with angular.equals #68

Open Amy-Lynn opened 9 years ago

Amy-Lynn commented 9 years ago

From the docs for angular.equals: "During a property comparison, properties of function type and properties with names that begin with $ are ignored." Since promises are storing their data in $$state, the line angular.equals(tracker.promises,options.promise) returns true even when the promises are different:

angular-promises

This means when the promise changes, the tracker might not get reset with the new promise since it thinks the promise didn't change.

bluesliverx commented 8 years ago

I don't know if this is the same problem, but when I change the promise by requesting a new version of the resource, the loading indicator appears indefinitely as if it thinks the promise is not resolved, even after it is. This sounds similar, not sure if I should file another issue or not.