Open cgetner-zz opened 10 years ago
i get this same error with end-time
but start-time works fine
<h3> Start :
<timer start-time="event.start">
{{days}} days, {{hours}} hours, {{minutes}} minutes, {{seconds}} seconds.
</timer>
</h3>
<h3>
End : <timer end-time="event.end">{{days}} days, {{hours}} hours, {{minutes}} minutes, {{seconds}} seconds.</timer>
</h3>
$scope.event.start = "2014-12-11T20:30:36.914Z"
$scope.event.end = "2014-12-30T18:30:00.000Z"
end-time
works fine if value is hard-coded in controller but not if it is loaded from server async
thanks
Same here, tried using a function as well as a variable which I manually update. But nothing works. Even static values dont work.
Me three.. I was configuring how to store the timer value using localStorage so that when the page reloads, the timer will still at the second the page was refreshed. But setting the time on 'start-time' didn't work either. Who's here to help?
Have you tried this change?
https://github.com/joebordes/angular-timer/commit/0229d84493c8e47a8e98ab430ad67124327bd92f
it seems to work for me....
@joebordes, doesn't seem to work on my end..
Have a look at the plunkr I created:
http://plnkr.co/edit/4QeZYsgDcxpkvgUjgHL6?p=preview
that is the current code of angular-timer and the time does not set by code, fork it, add my change to the timer.js file and try again.
It seems to be working for me. I had a problem whereas I was setting the time only but you have to set the full date.
HTH
BTW, the issue is here: https://github.com/siddii/angular-timer/issues/194
Trying to display a time since a user took a specific action.
If I put in a constant value for start-time the timer works. If I put in a variable the timer always starts at zero every time the page loads.