angular
.module('vertoControllers')
- .controller('LoadingController', ['$rootScope', '$scope', '$location',
- function($rootScope, $scope, $location) {
+ .controller('LoadingController', ['$rootScope', '$scope', '$location', '$interval', 'verto',
+ function($rootScope, $scope, $location, $interval, verto) {
console.log('Loading controller');
- $rootScope.$on('res_check_done', function() {
- $location.path('/preview');
- });
+ $interval(function() {
+ if (verto.data.resCheckEnded) {
+ $location.path('/preview');
+ }
+ }, 1000);
}
]);
})();
login: $cookieStore.get('verto_demo_login') || "1008",
password: $cookieStore.get('verto_demo_passwd') || "1234",
hostname: window.location.hostname,
- wsURL: ("wss://" + window.location.hostname + ":8082")
+ wsURL: ("wss://" + window.location.hostname + ":8082"),
+ resCheckEnded: false
};
function cleanShareCall(that) {
}
});
- $rootScope.$emit('res_check_done');
+ data.resCheckEnded = true;
} else {
console.debug('There is no instance of verto.');