Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AngularJS Minfication Error with $provide.decorator

I have the following code (to force hashbang in the urls) in my app.config which is creating issues in minification:

app.config(["$provide", function ($provide) {
    ..
    $provide.decorator('$sniffer', function ($delegate) {
        $delegate.history = false;
            return $delegate;
    });

}]);

I know it's got something to do with DI and I have defined "$provide" not sure what else needs to be done. Any help would be highly appreciated.

like image 482
Arslan Akram Avatar asked Aug 30 '26 10:08

Arslan Akram


1 Answers

Check with this

app.config(["$provide", function ($provide) {
    ..
    $provide.decorator('$sniffer', ['$delegate', function ($delegate) {
        $delegate.history = false;
            return $delegate;
    }]);

}]);
like image 72
Vigneswaran Marimuthu Avatar answered Sep 02 '26 06:09

Vigneswaran Marimuthu