forked from Mirrors/freeswitch
FS-10858 - [verto_communicator] cancel timeout when done to avoid redirect loop
This commit is contained in:
parent
452b7d12d0
commit
726e522434
@ -6,11 +6,19 @@
|
|||||||
.controller('LoadingController', ['$rootScope', '$scope', '$location', '$interval', 'verto',
|
.controller('LoadingController', ['$rootScope', '$scope', '$location', '$interval', 'verto',
|
||||||
function($rootScope, $scope, $location, $interval, verto) {
|
function($rootScope, $scope, $location, $interval, verto) {
|
||||||
console.log('Loading controller');
|
console.log('Loading controller');
|
||||||
$interval(function() {
|
var int_id;
|
||||||
if (verto.data.resCheckEnded) {
|
|
||||||
$location.path('/preview');
|
$scope.stopInterval = function() {
|
||||||
}
|
$interval.cancel(int_id);
|
||||||
|
};
|
||||||
|
|
||||||
|
int_id = $interval(function() {
|
||||||
|
if (verto.data.resCheckEnded) {
|
||||||
|
$scope.stopInterval();
|
||||||
|
$location.path('/preview');
|
||||||
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
})();
|
})();
|
||||||
|
Loading…
Reference in New Issue
Block a user