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 257 forks source link

Cannot read property '$$state' of undefined #83

Closed sondreb closed 9 years ago

sondreb commented 9 years ago

I saw there was an older issue (#44) with this error, I'm getting this exception with all the latest versions of everything. Exception happens when $scope.savePromise is set, not when the timeout is executed.

My packages:

"angular": "1.4.7",
"angular-animate": "1.4.7",
"angular-aria": "1.4.7",
"angular-i18n": "1.4.7",
"angular-resource": "1.4.7",
"angular-material": "0.11.4",
"angular-smart-table": "2.1.4",
"angular-ui-router": "0.2.15",
"angular-winjs": "4.4.0",
"angular-busy": "4.1.0",
"hammerjs": "2.0.4",
"jquery": "2.1.4",
"winjs": "4.4.0"

Code is really simple:

        var defer = $q.defer();
        $scope.savePromise = defer.promise;

        $timeout(function () {
            defer.resolve();
        }, 5000);

Markup:

        <div cg-busy="cr.savePromise"></div>
sondreb commented 9 years ago

I noticed that the NPM release is 4.1.0 and was updated a year ago?

https://www.npmjs.com/package/angular-busy

Stopped using Bower for packages a long time ago... NPM only :+1:

sondreb commented 9 years ago

Until #80 is resolved, you can take the package from github directly to make it work:

"angular-busy": "http://github.com/cgross/angular-busy/tarball/master",

Closing this issue now to avoid duplicates.