javascript - How can I make a function that calls another function every 60 seconds? -
i have function:
isauthenticated = (): boolean => {     xxx };   i using angularjs , know how can make function such
keepcheckingauthentication()   that call authenticated() function every 60 seconds?
you can use $interval function (wrapper of window.setinterval() in angularjs)?
the documentation of $interval function here
in case keepcheckingauthentication() function , can adjust other parameters accoding needs? help?
example:
$interval(myfunctionatinterval, 5000) // scheduled every 5 seconds, instance  funtion myfunctionatinterval() {...}      
Comments
Post a Comment