Skip to content

Commit

Permalink
Fixat "infinit loop" problem i IE11 med hjälp härifrån: angular/angul…
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikengstrom committed Mar 5, 2015
1 parent 44cd368 commit 7736c5b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,18 @@

'use strict';

angular.module('StatisticsApp').controller('businessLandingPageCtrl', ['$scope', '$window', '$cookies', 'statisticsData',
function ($scope, $window, $cookies, statisticsData) {
angular.module('StatisticsApp').controller('businessLandingPageCtrl', ['$scope', '$location', '$cookies', 'statisticsData',
function ($scope, $location, $cookies, statisticsData) {

statisticsData.getLoginInfo(function (loginInfo) {
if (loginInfo.businesses.length < 1) {
$window.location.href = "#/login";
$location.path("login");
} else {
$location.path("verksamhet/" + loginInfo.defaultVerksamhet.vardgivarId + "/oversikt");
}
$window.location.href = "#/verksamhet/" + loginInfo.defaultVerksamhet.vardgivarId + "/oversikt";
}, function () {
$scope.dataLoadingError = true;
});

}
]);
]);
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ angular.module('StatisticsApp').controller('pageCtrl', [ '$scope', '$rootScope',
$scope.isLoggedIn = $rootScope.isLoggedIn;

$scope.loginClicked = function (url) {
$window.location.href = "#/" + url;
$location.path(url);
};

}
Expand Down

0 comments on commit 7736c5b

Please sign in to comment.