angular-timer
angular-timer copied to clipboard
Control of multiple timer
Hi, Thanks for the work, angular-timer is a smart way to implement a timer/countdown. In case of multiple timer in a page/controller (one global and others intermediates),how can we start/pause/resume/stop specifics timers ? All I see is broacast actions to all timers.
Thanks in advance for your response.
+1
+1 It could be useful to have some possibility to distinguish multiple timers — for example, by attribute called "timer-id".
Here is my case: there is a page with multiple countdown timers on it, and each timer has its own countdown value. When a timer stops, some action associated with this specific timer must be executed. But it's impossible to understand which timer stopped:
$scope.$on('timer-stopped', function (event, data){
console.log(data);
// data contains only timestamp and timeoutId (internally generated and meaningless)
});
How can I do this with current implementation?
+1
Hi,
I hope this solves your problem : https://github.com/siddii/angular-timer/issues/166
Still this issue not resolved.
@siddii please your help .. can we use something like this:
document.getElementById('chrono').getElementsByTagName('timer')[0].set(60);
I have multiple timers and can not assume the timer id, so it would be awesome if I can change the countdown value directly without affect on other timers.
Many Thanks!