Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish event not firing #13

Closed
newkillerbeast2017 opened this issue Jan 22, 2018 · 6 comments
Closed

Finish event not firing #13

newkillerbeast2017 opened this issue Jan 22, 2018 · 6 comments

Comments

@newkillerbeast2017
Copy link

newkillerbeast2017 commented Jan 22, 2018

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

@cipchk
Copy link
Owner

cipchk commented Jan 22, 2018

Sorry, i can't understand what you saying, i create a online demo further explanation.

@cipchk cipchk closed this as completed in db58979 Apr 5, 2018
cipchk added a commit that referenced this issue Apr 5, 2018
cipchk added a commit that referenced this issue Apr 5, 2018
cipchk added a commit that referenced this issue Apr 5, 2018
@Ankit199
Copy link

this is not working with angular 8 .. I am also facing same issue .
ngx-countdown (finished) event is not firing

@OldManSmithers
Copy link

OldManSmithers commented 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"); } }

@LuisPeregrinaPSL
Copy link

In the demo you used angular 5. As of now Angular is in version 9.

In the documentation you have a (done) event, not even that is being triggered. Which brings the issue that the doc says (done) instead of (finished).

@revzo
Copy link

revzo commented Jun 14, 2020

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! :)

@Ankit199
Copy link

Ankit199 commented Jun 14, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants