2017-04-27 3 views
0

modalInstance을 사용하려고합니다. 나는 다음 있습니다 : 정확히 내가 할 노력하고있어인수 'formErrorLogController'는 정의되지 않은 함수입니다.

$scope.openClaimLogError = function (deni_arr) { 
    $scope.data = { 
     deni_arr : deni_arr 
    }; 

    modalInstance = $modal.open({ 
     templateUrl: 'app/shared/templates/formErrorLog.html', 
     controller: 'formErrorLogController', 
     resolve: { 
      data: function() { 
       return $scope.data.deni_arr; 
      } 
     } 
    }); 
}` 

This code is in Controller1.js 

And in Controller2.js I have the following: 

`'use strict'; 
    app.controller('formErrorLogController', 
    function ($scope, $cookies, claimsService, $modal, $filter, data) {}` 

내가 그것을 인쇄 할 수 있도록 두 번째 컨트롤러에 데이터를 전송하는 것입니다.

가 왜 오류 같은합니까 : Error: [ng:areq] Argument 'formErrorLogController' is not a function, got undefined

+0

당신은 스크립트 참조 – Aravind

+0

@Aravind를 포함하지 않았을 것입니다. 좀 더 설명해 드리겠습니다 : form_page.html의 컨트롤러 (controller1.js)에 form_page.html 및 formErrorLog.html.html (위와 같음)이 있습니다. 전달할 완료되지 않은 필드가있는 배열이 있습니다. formErrorLog.html의 컨트롤러 (controller2.js)는 모달에 표시됩니다. –

+0

@FineasSilaghi in index.html? – tanmay

답변

0

오류가이 컨트롤러 누락이 말한다 있기 때문에, 당신은 <script src="..."></script>를 사용하여 같이 index.html의 컨트롤러 파일 중 하나를 포함 놓친 것. 그것을 확인하십시오.

관련 문제