Skip to content

Manage the isRunning flag and allow clearing a countdown#43

Merged
siddii merged 1 commit intosiddii:masterfrom
r1chardj0n3s:master
Feb 4, 2014
Merged

Manage the isRunning flag and allow clearing a countdown#43
siddii merged 1 commit intosiddii:masterfrom
r1chardj0n3s:master

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