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

Overriding default values not working #79

Closed morfin closed 9 years ago

morfin commented 9 years ago

This is how I'm trying to override value, but I still getting "Please Wait...".

What am I doing wrong ?

angular.module('app').run(function(){
     angular.module('app').value('cgBusyDefaults',{
            message: 'Loading...'
        });
));

What is happening is that cgBusy injects the default value:

angular.module('cgBusy').value('cgBusyDefaults',{});

Instead of the value I defined. Looks like mine does not exist when the directive is called.

Any idea?

muzuro commented 8 years ago

Hi, i have same issue. What was solution of problem?

morfin commented 8 years ago

Solution was:

angular.module('app').run(function(cgBusyDefaults){
    cgBusyDefaults.message= 'Your override value here';
    ....
});

As you can see, cgBusyDefaults is already instantiated, so no need to instantiate it yourself.