2017-12-26 1 views
0

내가 내 모달에서이 작업을 수행하려고 :모달 HTML에서 함수를 호출하는 방법은 무엇입니까?

<td colspan="4" class="text-center">{{$rootScope.getDate(proposal.date_from)}}</td> 
 

 
<td colspan="4" class="text-center">{{getDate(proposal.date_to)}}</td>

첫번째 TD 출력 아무것도 두 번째 TD 출력을 {{GETDATE (proposal.date_to)}} 어떻게 제대로 함수를 호출하는 문자열 로 ? 두 스코프 모두 정의 됨

답변

0

컨트롤러에 getDate 기능을 $scope에 연결하십시오 ($scope.getDate = function(date) { ... }과 같음). 이 후 <td colspan="4" class="text-center">{{getDate(proposal.date_to)}}</td> 형식을 사용하여 getDate으로 전화 할 수 있습니다.

관련 문제