Advertisement
Guest User

Untitled

a guest
Sep 30th, 2014
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     if(localStorage.users) {
  2.       $scope.users = JSON.parse(localStorage.users);
  3.     } else {
  4.       $scope.users = {
  5.         "user": [
  6.           {
  7.             "uid" : 0,
  8.             "firstName" : "Andrei",
  9.             "lastName" : "Horodinca",
  10.             "emailAddress" : "ah@kirkeweb.dk",
  11.             "password" : "lalala",
  12.             "loggedIn" : false,
  13.             "isAdmin" : false,
  14.             "profileInfo" : true,
  15.             "birthday" : "28/09/1993",
  16.             "location" : "Copenhagen, Denmark",
  17.             "bio" : "Lorem ipsum dolor sit amet."
  18.           }
  19.         ]
  20.       };
  21.  
  22.       localStorage.setItem("users", JSON.stringify($scope.users));
  23.     }
  24.  
  25.     if(typeof $routeParams.uid == "undefined") {
  26.       $scope.users.user.uid = -1;
  27.     }
  28.     else {
  29.       $scope.users.user.uid = $routeParams.uid;
  30.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement