$rootScope.loop = function(){ $timeout(function(){ $rootScope.dashbSix(); if(!$rootScope.flagOver) { $rootScope.loop(); } else { $rootScope.isFiveZZ(); } },5000) }; $rootScope.loop();
$rootScope.loop = function(){ $timeout(function(){ $rootScope.dashbSix(); if(!$rootScope.flagOver) { $rootScope.loop(); } else { $rootScope.isFiveZZ(); } },5000) }; $rootScope.loop();