refactorized rootScope.user

parent 9bdcbd8e
Showing with 1 additions and 3 deletions
......@@ -26,8 +26,6 @@ var dashboardControllers = angular.module('dashboardControllers', ['dashboardCon
dashboardControllers.controller('MainCtrl', function MainCtrl(
$scope, $window, $location, $translate, $rootScope, $timeout<) {
$scope.user = $rootScope.user;
// Use browser language as default
var lang = $window.navigator.language || $window.navigator.userLanguage;
......@@ -68,7 +66,7 @@ dashboardControllers.controller('MainCtrl', function MainCtrl(
delete $window.sessionStorage.token;
delete $window.sessionStorage.user;
$scope.user = {};
$rootScope.user = {};
// Console message
console.log("logged out!");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment