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

$cgBusyFulfilled property should be renamed to $$cgBusyFulfilled. #64

Closed jean-merelis closed 7 years ago

jean-merelis commented 9 years ago

$cgBusyFulfilled property should be renamed to $$cgBusyFulfilled. This way, it is stripped by $resource when sending json to the server.

cgross commented 9 years ago

Huh? That property is added to the promise..? Is the promise being sent back to the server?

jean-merelis commented 9 years ago

I use with $resource, and $resource is sending it. Example

//html:     <div cg-busy="busypromisse">...</div>

//first I get a entity with $resource
 $scope.busypromisse = Org.get({id: $routeParams.id},
        function (entity) {
            $scope.entity = entity;
        }, function (err) {
           console.log('error')
        });  

//So, when I save changes, $resource send that property too.

    $scope.save = function () {
        $scope.busypromisse = $scope.entity.$save(
                function (entity) {
                    $scope.entity = entity;
                },
                function (err) {
                     console.log('an error');
                });
    };
johannesjo commented 8 years ago

The issue still persists! Would be nice to get a fix!