angular-timer icon indicating copy to clipboard operation
angular-timer copied to clipboard

Defining End Time with angular

Open thenovacreator opened this issue 9 years ago • 13 comments

How do i set the value of the endtime dynamically?

Something like this does not work:

< timer end-time="{{object.time}}" >{{days}} days, {{hours}} hours, {{minutes}} minutes, {{seconds}} seconds.< /timer >

I put in the spaces because in the last issue github escaped the timer tags

thenovacreator avatar Apr 14 '15 13:04 thenovacreator

Have you tried without the {{ syntax? Usually, attributes prefer binding to the object itself rather than what it evaluates to:

<timer end-time="object.time" ..

Side note: You can avoid the escaping by using the ` key on each end of code. If you have a block of code, you can surround it with ```.

AaronBuxbaum avatar Apr 14 '15 21:04 AaronBuxbaum

I have the same issue, with or without {{ }}syntax. Is there anyway to allow two-way-binding for these attributes, it would make the module very useful. Thanks.

TrangNguyen avatar Apr 17 '15 11:04 TrangNguyen

my fix is to parseInt my variable and add it without {{}} syntax. for example:

$scope.mytime = parseInt('1430604000000');

<timer end-time="mytime" ..

that fixed the problem for me

wesley3523 avatar May 01 '15 19:05 wesley3523

I have this issue as well and none of the above solutions worked for me. A notice would have been nice since this directive loses a lot of value without supporting dynamic values.

alexg313 avatar May 19 '15 19:05 alexg313

same here .. no solution works

schrink avatar May 21 '15 00:05 schrink

+1

muei avatar Jul 18 '15 10:07 muei

same problem with or without {{}}. Useless without data-binding.

ghost avatar Aug 21 '15 21:08 ghost

yeap.

captainkovalsky avatar Oct 08 '15 09:10 captainkovalsky

+1

idf avatar Dec 31 '15 07:12 idf

+1

mehlleniumfalke avatar Jan 15 '16 12:01 mehlleniumfalke

+1

kgrvamsi avatar Jul 24 '16 08:07 kgrvamsi

same here !!

ghost avatar Mar 08 '17 10:03 ghost

+1

Jayesh-Linkwok avatar Nov 26 '17 08:11 Jayesh-Linkwok