How to start and reset angular timer from controller?

javascript angularjs angular-timer

2167 просмотра

1 ответ

1778 Репутация автора

I want to start timer when user click on recordLogs method and reset timer when user click on stopLogs method. According to angular-timer documentation we can use timer-stop and timer-clear method to achieve these task but i am getting error start and clear undefined on timer when i invoked them from controller. Any idea ?


 <div class="col-md-3">
           <timer interval="1000">{{hours}} hour{{hoursS}}, {{minutes}} minute{{minutesS}}, {{seconds}} second{{secondsS}}.</timer>


$scope.stopLogs = function() {


$scope.recordLogs = function() {
Автор: hussain Источник Размещён: 22.08.2016 08:31

Ответы (1)

1 плюс

741 Репутация автора


Check out examples from here :

Автор: Younis Ar M Размещён: 22.08.2016 08:40
Вопросы из категории :