question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Finish event not firing

See original GitHub issue

@cipchk I am trying to fire an onfinished event when the countdown gets over. Here is what my html looks like:

<countdown class="timer" [config]="config" (finished)="finishTest()">$!m!:$!s!</countdown>

The only issue is that the event if fired as soon as the component is loaded. In simple terms, if i kept the config as 10 seconds timer but the finished event is fired in 1st second itself. Any idea what is going wrong and also what other info can I provide for further help?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
OldManSmitherscommented, Nov 22, 2019

Can confirm this is still an issue with Angular 7. The finished event is never firing, though normal events seem to still be working and you can work with those. A workaround for those still having an issue with the finished event:

HTML: <countdown #countdown [config]="{leftTime: 5, demand: false}" (event)="timesUp($event)">$!h!:$!m!:$!s!</countdown>

TS: timesUp(event) { if (event.action == "done") { console.log("Finished"); } }

0reactions
Ankit199commented, Jun 14, 2020

Hi Daniel ,

It’s working fine.

Thanks for support

Get Outlook for Androidhttps://aka.ms/ghei36


From: Daniel Revzo Molnar notifications@github.com Sent: Sunday, June 14, 2020 10:16:58 PM To: cipchk/ngx-countdown ngx-countdown@noreply.github.com Cc: Ankit kumar shukla ankitshukla1992@outlook.com; Comment comment@noreply.github.com Subject: Re: [cipchk/ngx-countdown] Finish event not firing (#13)

Can confirm this is still an issue with Angular 7. The finished event is never firing, though normal events seem to still be working and you can work with those. A workaround for those still having an issue with the finished event:

HTML: <countdown #countdown [config]=“{leftTime: 5, demand: false}” (event)=“timesUp($event)”>$!h!😒!m!😒!s!</countdown>

TS: timesUp(event) { if (event.action == “done”) { console.log(“Finished”); } }

Thanks, working Angular v10 rc! 😃

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/cipchk/ngx-countdown/issues/13#issuecomment-643792041, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADGADEPJN6XDF5SD7BTQYKDRWT5IFANCNFSM4ENBDV7Q.

Read more comments on GitHub >

github_iconTop Results From Across the Web

busboy not firing finish event - Stack Overflow
So, what i see that both the fields and the files are being logged in console but the finish event is not getting...
Read more >
Writable#end does not trigger 'finish' event: why? · Issue #2112
In the setup explained below, it seems that the 'finish' is not triggered or received despite calling end on the stream.
Read more >
Element: transitionend event - Web APIs - MDN Web Docs
The transitionend event is fired when a CSS transition has completed. In the case where a transition is removed before completion, ...
Read more >
On touch end event not working properly on mobile devices
They work perfectly on simulating touch using mouse on Windows. However as soon as I port it on Android, all of sudden the...
Read more >
Why is the animation end event not firing? - Spine
Why is the animation end event not firing? ... If you set an animation, it will continue to be applied until you 1)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found