How to make angular decorators minification friend

2020-07-11 05:41发布

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) {

1条回答
ゆ 、 Hurt°
2楼-- · 2020-07-11 05:56

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

$provide.decorator("$exceptionHandler" , [ "$delegate","$injector", 
    function($delegate,$injector) {
查看更多
登录 后发表回答