Access hours and minutes with Angular Timer

2

I want to get the hour and minute data of the Angular Timer and play in a variable to save in the bank, how do I?

    
asked by anonymous 07.11.2016 / 04:46

1 answer

3

Stop Timer with a broadcast:

$scope.$broadcast('timer-stop');

At the same time, monitor the event timer-stopped , and capture the object containing the timer state:

$scope.$on('timer-stopped', function (event, data){
    console.log(data);
});

The object will contain the following properties:

  

days
hours
  millis
minutes
  seconds
  timeoutId

    
07.11.2016 / 06:08