Created
July 12, 2017 13:35
-
-
Save filipenevola/051e63af710a2b3fc371b50f655cf494 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Template.startTimer.onCreated(function () { | |
| this.timer = new ReactiveVar(0); | |
| }); | |
| Template.startTimer.events({ | |
| 'click button'(event, instance) { | |
| setInterval(() => { | |
| instance.timer.set(instance.timer.get() + 1); | |
| }, 1000); | |
| }, | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment