We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I try this package like:
<template name="welcomeIndex"> Clock: {{clock}} </template> ---------------------- Template.welcomeIndex.helpers({ clock: function () { var ExerciseClock = new ReactiveClock("ExerciseClock"); ExerciseClock.start(); ExerciseClock.stop(); ExerciseClock.setElapsedSeconds(30); var elapsedSeconds = ExerciseClock.elapsedTime({format: '00:00:00'}); return elapsedSeconds; } });
don't show??? pl help me.
The text was updated successfully, but these errors were encountered:
You should declare outside of the helper since it will run multiple times and recreate the ExerciseClock object every time it runs.
<template name="welcomeIndex"> Clock: {{clock}} </template>
var ExerciseClock = new ReactiveClock("ExerciseClock"); Template.welcomeIndex.created = function () { ExerciseClock.setElapsedSeconds(30); ExerciseClock.start(); }; Template.welcomeIndex.destroyed = function () { ExerciseClock.stop(); }; Template.welcomeIndex.helpers({ clock: function () { return ExerciseClock.elapsedTime({format: '00:00:00'}); } });
Sorry, something went wrong.
thanks for your reply, how to format with date like moment js ("DDD MMM YYYY").
moment js
It does not track the date, only elapsed seconds. You will have to add the elapsed seconds to the start time yourself and format using momentjs.
No branches or pull requests
I try this package like:
don't show???
pl help me.
The text was updated successfully, but these errors were encountered: