|
app.factory('Auth', ['localStorageService', function(localStorageService){
|
|
var user;
|
|
return{
|
|
setUser : function(currentUser){
|
|
user = currentUser;
|
|
},
|
|
isLoggedIn : function(){
|
|
user = JSON.parse(localStorageService.get('userAuth'));
|
|
return (user) ? user : false;
|
|
}
|
|
};
|
|
}]);
|