cgross/angular-busy

Overriding default values not working

morfin opened this issue · 2 comments

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?

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

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.