title: Can't keep the $rootScope value after refresh
body: <p>I'm new to angularJS and working over an application where i switch over multiple languages.
  After i change the language and refresh the page it will switch to the default language (i.e)English.
  Please suggest how do i keep the value of $rootScope so that it will not change after refreshing the page</p>
  
  <p>My CTRL---------</p>
  
  <p>myApp.controller('recordCtrl',function($scope, $translate, $http,altaMdlSvcs,$rootScope,$cookieStore,altaPageActionSvcs,$location,$rootScope,$stateParams) {
      $scope.globalLang = '';</p>
  
  <pre><code>$http.get("metadata/record.json").then(function(response) {
      $scope.recordArray = response.data.records;
  });
  $http.get("metadata/language.json").then(function(response) {
      $rootScope.languages = response.data;
  });
  
  
  var locale = localStorage.getItem("token");
  //$translate.use(locale);
  
  
  $scope.changeLanguage = function (langObj) {
      $scope.globalLang = langObj.lang.langCode;
      localStorage.setItem("token", $scope.globalLang);
      console.log("lower"+$scope.globalLang+"................");
      $translate.use(langObj.lang.langCode);
  };
  $scope.openModel = function(langObj) {
      var requestMap = {
              "templateHtml" : '/I18nDemo/html/model.html',
              "controllerName" : 'modelCtrl',
              "doAction" : $scope.changeLanguage,
              "lang" : langObj,
              "parent" : $scope
      };
      altaMdlSvcs.customOpen(requestMap);
  };
  </code></pre>
  
  <p>});</p>