You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
698 B

7 years ago
  1. angular.module('app.notifications', ['pascalprecht.translate'])
  2. .controller('NotificationsCtrl', function($scope, $stateParams, $translate, $filter) {
  3. if(localStorage.getItem('c_token')){// adding token to the headers
  4. // $http.defaults.headers.common['X-Access-Token'] = localStorage.getItem('c_token');
  5. }
  6. $scope.storageusername=localStorage.getItem("c_username");
  7. $scope.users= JSON.parse(localStorage.getItem('c_users'));
  8. $scope.user = $filter('filter')($scope.users, {username: $stateParams.username}, true)[0];
  9. $scope.notifications=$scope.user.notifications;
  10. console.log($stateParams.username);
  11. console.log($scope.notifications);
  12. console.log("notifications page");
  13. });