walnut_launchpad.html/js/services/auth.js

13 lines
310 B
JavaScript

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;
}
};
}]);