ユーザーが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