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

Doesn't work with custom interpolation tags? #39

Closed amerikan closed 10 years ago

amerikan commented 10 years ago

I'm using a python web framework called web2py which uses its template interpolation symbols {{ }}. Since angularjs also uses the same interpolation symbols I had to override angularjs defaults to avoid the conflicts with the web2py framework. I did something like this on my module:

myApp.config(function($interpolateProvider) {
    $interpolateProvider.startSymbol('[[');
    $interpolateProvider.endSymbol(']]');
});

Which has been working fine for me.

Now I'm trying to use angular-busy. Everything seems to work fine, however, it's spitting out the spinner and the following text {$message}} (see screenshot below) rather than the actual content. I presume this has to do something with me overriding the default angularjs interpolation symbols? Is there some other configuration I must do to the cgBusy module to accept my custom interpolation symbols? I'm new to angularjs so any advice would be helpful. Thank you!

screen shot 2014-08-25 at 1 51 49 pm

cgross commented 10 years ago

The default template with cg-busy uses {{$message}}. Since you've overridden the symbols you'll need to define/use a custom cg-busy template. If you want to keep the same template that ships with cg-busy, just copy the angular-busy.html in your project somewhere and change the {{}} to [[]]. The docs show you how to configure cg-busy to use a custom template as the new default template.

amerikan commented 10 years ago

Gotcha! Thanks! :+1: