mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
user $timeout with $location
This commit is contained in:
parent
9189089031
commit
27bc361415
1 changed files with 3 additions and 3 deletions
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
angular.module('zeppelinWebApp').controller('LoginCtrl', LoginCtrl);
|
||||
|
||||
function LoginCtrl($scope, $rootScope, $http, $httpParamSerializer, baseUrlSrv, $location) {
|
||||
function LoginCtrl($scope, $rootScope, $http, $httpParamSerializer, baseUrlSrv, $location, $timeout) {
|
||||
'ngInject';
|
||||
|
||||
$scope.SigningIn = false;
|
||||
|
|
@ -41,10 +41,10 @@ function LoginCtrl($scope, $rootScope, $http, $httpParamSerializer, baseUrlSrv,
|
|||
|
||||
//redirect to the page from where the user originally was
|
||||
if ($location.search() && $location.search()['ref']) {
|
||||
setTimeout(function() {
|
||||
$timeout(function() {
|
||||
var redirectLocation = $location.search()['ref'];
|
||||
$location.$$search = {};
|
||||
window.location.hash = '#' + redirectLocation;
|
||||
$location.path(redirectLocation);
|
||||
}, 100);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue