angular-timer icon indicating copy to clipboard operation
angular-timer copied to clipboard

Control of multiple timer

Open kolxo opened this issue 10 years ago • 5 comments

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.

kolxo avatar Jul 02 '14 06:07 kolxo

+1

zacharynevin avatar Dec 27 '14 07:12 zacharynevin

+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?

bevalorous avatar Apr 01 '15 06:04 bevalorous

+1

sett21 avatar Apr 16 '15 11:04 sett21

Hi,

I hope this solves your problem : https://github.com/siddii/angular-timer/issues/166

polomarcus avatar Apr 19 '15 17:04 polomarcus

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!

samaphp avatar Mar 25 '17 10:03 samaphp