I'm using ng-admin with a rest API, I have multiple referenced lists which are update frequently in the server side.
Is there a way to refresh referenced lists every 5 seconds or so using ng-admin?
EDIT: I already know about setInterval and $interval. But I can't figure out where in ng-admin I should put it, what file exactly, that's where I'm stuck.
You could use the Angular $interval
service. This is just a wrapper around the native interval javascript function.
$interval(function() {
// fetch results
}, 5000);
This function will run every 5000 milliseconds (5 seconds).
More information about $interval
can be found here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With