2017-01-16 5 views
0

JS 코드를 최소화하기 위해 gulp 명령 세트를 작성했습니다. 특정 JS 파일에 다음 코드 세그먼트를 포함하지 않으면 제대로 작동합니다.Angular modalInstance.opened 메소드에서 Minification 오류가 발생했습니다.

//============================== Ledger Card Modal =================================== //KR: Check 
    vm.ledgerCardWindowOption = function (matterReferenceNo) { 
     var busy = busyIndicatorService.setAsBusy('CompanyName.main'); 
     vm.ledgerCardGlyphicon = true; 
     $scope.modalInstance = $modal.open({ 
      scope: $scope, 
      templateUrl: 'app/ledgerCard/ledgerCardView.html', 
      backdrop: 'static', 
      controller: 'ledgerCardController as vm', 
      windowClass: 'ledgercard-modal-window', 
      resolve: { 
       ledgerCardModal: function() { 
        var data = { matterReferenceNo: matterReferenceNo, formType: "Modal" }; 
        return data; 
       } 
      } 
     }); 
     $scope.modalInstance.opened.then(() => busy.resolve(),() => busy.resolve()); // This is the bad line 
    }; 
    //============================== Ledger Card Modal End =================================== 
    //==============================auto height fix=================================== 

오류 메시지 :

events.js:72 
     throw er; // Unhandled 'error' event 
      ^
Error 
    at new JS_Parse_Error (eval at <anonymous> (C:\dev.net14\DevelopmentPhase2\CompanyName.WebMain\node_modules\uglify-js\tools\node.js:30:4), <anonymous>:1533:18) 
    at js_error (eval at <anonymous> (C:\dev.net14\DevelopmentPhase2\CompanyName.WebMain\node_modules\uglify-js\tools\node.js:30:4), <anonymous>:1541:11) 
    at croak (eval at <anonymous> (C:\dev.net14\DevelopmentPhase2\CompanyName.WebMain\node_modules\uglify-js\tools\node.js:30:4), <anonymous>:2088:9) 
    at token_error (eval at <anonymous> (C:\dev.net14\DevelopmentPhase2\CompanyName.WebMain\node_modules\uglify-js\tools\node.js:30:4), <anonymous>:2096:9) 
    at unexpected (eval at <anonymous> (C:\dev.net14\DevelopmentPhase2\CompanyName.WebMain\node_modules\uglify-js\tools\node.js:30:4), <anonymous>:2102:9) 
    at expr_atom (eval at <anonymous> (C:\dev.net14\DevelopmentPhase2\CompanyName.WebMain\node_modules\uglify-js\tools\node.js:30:4), <anonymous>:2617:13) 
    at maybe_unary (eval at <anonymous> (C:\dev.net14\DevelopmentPhase2\CompanyName.WebMain\node_modules\uglify-js\tools\node.js:30:4), <anonymous>:2791:19) 
    at expr_ops (eval at <anonymous> (C:\dev.net14\DevelopmentPhase2\CompanyName.WebMain\node_modules\uglify-js\tools\node.js:30:4), <anonymous>:2826:24) 
    at maybe_conditional (eval at <anonymous> (C:\dev.net14\DevelopmentPhase2\CompanyName.WebMain\node_modules\uglify-js\tools\node.js:30:4), <anonymous>:2831:20) 
    at maybe_assign (eval at <anonymous> (C:\dev.net14\DevelopmentPhase2\CompanyName.WebMain\node_modules\uglify-js\tools\node.js:30:4), <anonymous>:2855:20) 

나는 위의 코드에 나쁜 줄을 지적했다,하지만 난 거기에 어떤 문제가 있는지 알아낼 수 없습니다. 누구든지 설명해 주시겠습니까?

답변