Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make angular decorators minification friendly?

How to can I make this code that I have minification friendly?

MyModule.config(['$provide',function($provide) {
    $provide.decorator("$exceptionHandler", function($delegate,$injector) {

I can't seem to do this:

  $provide.decorator("$exceptionHandler" , "$delegate","$injector", function($delegate,$injector) {
like image 343
FutuToad Avatar asked May 30 '14 04:05

FutuToad


Video Answer


1 Answers

You are missing the [. The pattern is the same that you successfully applied for config:

$provide.decorator("$exceptionHandler" , [ "$delegate","$injector", 
    function($delegate,$injector) {
like image 68
Thilo Avatar answered Nov 08 '22 05:11

Thilo