I am getting num1 and num2 value from service call. I am trying reset interval after clearing it but it does not work this way. I have also tried other ways mentioned in stackoverflow. Nothing works.
function func(){
if (num1 > num2 ) {
console.log(" gt greater than lt");
clearInterval(interval);
flag = true;
setInterval(func,1800000);
$('.class').trigger('point');
return;
}
//do something
}
var interval = setInterval(func,10);
Aucun commentaire:
Enregistrer un commentaire