I want to use a dynamic delay for interval:
var tabDelay = 1500;
var timer = $interval(function() {
if (some if) {
tabDelay = 5000;
} else {
tabDelay = 1000;
}
}
},tabDelay);
But seems that this is not the right way. How could I use dynamic values for $interval delay in angularJs?