$timeout not delaying

941 views
Skip to first unread message

Iyer

unread,
Aug 17, 2012, 8:54:22 AM8/17/12
to ang...@googlegroups.com
Trying to delay calling a function with $timeout. But it seems to fire immediately, regardless of the time set.

guill...@gmail.com

unread,
Aug 17, 2012, 9:15:41 AM8/17/12
to ang...@googlegroups.com, sethu....@gmail.com
you call it when you call $timeout ;), remove the ()

sethu....@gmail.com

unread,
Aug 17, 2012, 9:22:14 AM8/17/12
to ang...@googlegroups.com, sethu....@gmail.com


Thanks for your response. I have to pass a parameter to the delayed function. That is why I had (). Have an updated jsfiddle on what I need to do.


On Friday, August 17, 2012 8:54:22 AM UTC-4, Iyer wrote:
Trying to delay calling a function with $timeout. But it seems to fire immediately, regardless of the time set.


On Friday, August 17, 2012 8:54:22 AM UTC-4, Iyer wrote:
Trying to delay calling a function with $timeout. But it seems to fire immediately, regardless of the time set.


On Friday, August 17, 2012 8:54:22 AM UTC-4, Iyer wrote:
Trying to delay calling a function with $timeout. But it seems to fire immediately, regardless of the time set.


On Friday, August 17, 2012 8:54:22 AM UTC-4, Iyer wrote:
Trying to delay calling a function with $timeout. But it seems to fire immediately, regardless of the time set.


On Friday, August 17, 2012 8:54:22 AM UTC-4, Iyer wrote:
Trying to delay calling a function with $timeout. But it seems to fire immediately, regardless of the time set.


On Friday, August 17, 2012 8:54:22 AM UTC-4, Iyer wrote:
Trying to delay calling a function with $timeout. But it seems to fire immediately, regardless of the time set.


On Friday, August 17, 2012 8:54:22 AM UTC-4, Iyer wrote:
Trying to delay calling a function with $timeout. But it seems to fire immediately, regardless of the time set.


guill...@gmail.com

unread,
Aug 17, 2012, 9:52:05 AM8/17/12
to ang...@googlegroups.com, sethu....@gmail.com
You can just declare an anonymous function:  http://jsfiddle.net/g/CzJhe/5/ 

sethu....@gmail.com

unread,
Aug 17, 2012, 10:05:51 AM8/17/12
to ang...@googlegroups.com, sethu....@gmail.com, guill...@gmail.com
Thanks a lot Le vndredi, works like a charm.

madhurb...@gmail.com

unread,
Nov 5, 2016, 5:37:05 AM11/5/16
to Angular, sethu....@gmail.com, guill...@gmail.com
can you help me with the timeout delay thing.Its not working for me too. I m just calling timeoutservice with a function and delay value but it doesnt delays.

Luís Loureiro

unread,
Nov 9, 2016, 8:27:13 AM11/9/16
to Angular, sethu....@gmail.com, guill...@gmail.com
Did you see the response from Guillaume?
Have you tried to do like in the fiddle?

Regards,
Luís Loureiro
Reply all
Reply to author
Forward
0 new messages