I have an $interval running to ping a server, but sometimes I want to skip to the next update immediately so I tried flush() with the refresh rate. To force the next call. This would have the added benifit of making sure that two requests were not in transit at the same time.
$interval.flush(refrsh_rate);
When this runs it get this error
TypeError: $interval.flush is not a function
There isn't a ton of documentation on interval, but it seems to be mostly referenced from ngMock. That is for unit testing though. What am I doing wrong? or is there a better way achieving this? Thank you in advance.
Aucun commentaire:
Enregistrer un commentaire