function SetCredentials(email, token, id) {
      $rootScope.globals = {
        currentUser: {
          email: email,
          token: token,
          _id: id
        }
      };

      $http.defaults.headers.common['X-ACCESS-TOKEN'] = token;
      $cookieStore.put('globals', $rootScope.globals);
    }
// Stored in the $cookieStore for use if the app is reloaded
Stored in the $cookieStore for use if the app is reloaded
Stored in the $cookieStore for use if the app is reloaded
function SetCredentials(email, token, id) {
      $rootScope.globals = {
        currentUser: {
          email: email,
          token: token,
          _id: id
        }
      };
      $http.defaults.headers.common['X-ACCESS-TOKEN'] = token;
      $cookieStore.put('globals', $rootScope.globals);
    }
function SetCredentials ( email , token , id ) { $rootScope . globals = { currentUser : { email : email , token : token , _id : id } } ; $http . defaults . headers . common [ 'X-ACCESS-TOKEN' ] = token ; $cookieStore . put ( 'globals' , $rootScope . globals ) ; }
Stored in the $cookieStore for use if the app is reloaded
Stored in the $cookieStore for use if the app is reloaded