사용자가 recordLogs
방법을 클릭하고 사용자가 stopLogs
방법을 클릭하면 타이머를 재설정하고 싶습니다. 각도 타이머 설명서에 따르면이 작업을 수행하려면 timer-stop
및 timer-clear
메서드를 사용할 수 있지만 컨트롤러에서 호출 할 때 start
및 clear
타이머에서 정의되지 않은 오류가 발생합니다. 어떤 생각? 밖으로컨트롤러에서 각도 타이머를 시작하고 재설정하는 방법은 무엇입니까?
main.html
<div class="col-md-3">
<timer interval="1000">{{hours}} hour{{hoursS}}, {{minutes}} minute{{minutesS}}, {{seconds}} second{{secondsS}}.</timer>
</div>
Ctrl.js
$scope.stopLogs = function() {
$scope.timer-clear();
};
$scope.recordLogs = function() {
$scope.timer-start();
}
당신은 할 수 적어도 개방 콘솔 및 오류 메시지를 참조하십시오. – dfsq