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

Manage the isRunning flag and allow clearing a countdown #43

Merged
merged 1 commit into from
Feb 4, 2014

Conversation

r1chardj0n3s
Copy link

This merge request implements management of the isRunning flag which may be used for (amongst other things, perhaps) hiding or displaying the timer display depending on whether the timer is running using a simple ng-show="isRunning", for example:

  <timer autostart="false" interval="1000" countdown="timerLimit">
    <div ng-show="isRunning">
      Time left to complete this section: {{ millis | date:'m:ss' }}
    </div>
  </timer>

It also adds an event that an application may use to clear a running timer. This allows the application to cancel / stop the timer (and hide it if the above flag is used) but not generate the "stopped" event back out of the timer.

When combined, these two elements allow the display of a countdown timer on a page when appropriate, and hide it when not, and cancel it without generating a "timed out" error when appropriate.

@siddii
Copy link
Owner

siddii commented Feb 4, 2014

Cool... Thanks for the PR 👍

siddii added a commit that referenced this pull request Feb 4, 2014
Manage the isRunning flag and allow clearing a countdown
@siddii siddii merged commit 3f1e7d4 into siddii:master Feb 4, 2014
@siddii
Copy link
Owner

siddii commented Feb 4, 2014

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

Successfully merging this pull request may close these issues.

2 participants