title: How to maintain scope variable of a controller used in master page after the ui-state changes in angular js?
body: <p>I have a master page(Index.html) in which I'm using </p>
  
  <pre><code>&lt;div&gt;
    &lt;ul class="nav navbar-nav navbar-right"&gt;
      &lt;li&gt;&lt;a ui-sref="signout.searchAsset"&gt; Sign Out&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a ui-sref="signin.searchAsset"&gt; Sign In&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#"&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;h4 &gt;Headset - Signin  ({{$scope.UserFullname}})&lt;/h4&gt;&lt;/li&gt;                   
    &lt;/ul&gt;
  &lt;/div&gt;
  &lt;div class="container"&gt;
  &lt;!-- views will be injected here --&gt;
  &lt;div ui-view&gt;&lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>Script.js file--></p>
  
  <pre><code>angular.module('aegis', ['ngAnimate', 'ui.router', 'ngSignaturePad', 'ngDialog', 'ui.select', 'ngStorage'])
  
  
  
  // configuring our routes 
  // =============================================================================
  .config(function ($stateProvider, $urlRouterProvider) {
  
      $stateProvider
  
          // route to show our basic form (/form)
          .state('signout', {
              url: '/signout',
              templateUrl: 'app/components/headset/view-signout-form.html',
              controller: 'SignoutController'
          })
  
          // nested states 
          // each of these sections will have their own view
          // url will be nested (/form/profile)
          .state('signout.searchAsset', {
              url: '/searchAsset',
              templateUrl: 'app/components/headset/view-signout-search-asset.html'
          })
          // url will be /signout/searchEmployee
           .state('signout.searchEmployee', {
              url: '/searchEmployee',
              templateUrl: 'app/components/headset/view-signout-search-employee.html')          
           .state('index', {
              url: '/index',
              templateUrl: 'index.html'  
             Controller : 'loginController'
            })
             .controller('SignoutController', function ($scope, $http, $state, ngDialog, $location, $window, appConfig, $localStorage, AuthService) {   
  
              $scope.formData = {};
              $scope.formData.accepted = false;
               $scope.formData.assetFound = false;   
  
            }).controller('LoginController', function ($scope, $http, $state, appConfig, $localStorage, AuthService) {
    $scope.UserFullname = AuthService.CurrentSession().Fullname;
             AuthService.getSession();    
             $scope.login = function () {
             AuthService.login($scope.username, $scope.password);
           }     
  
  });
  </code></pre>
  
  <p>When i first login my page goes to index.html then the value in $scope.UserFullname id displayed but when i click on any link(Sign in),the state changes and the value in $scope.UserFullname is empty. How can i maintain the value in $scope.UserFullname even if the state changes? </p>