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

angular.module('app.notifications', ['pascalprecht.translate'])
.controller('NotificationsCtrl', function($scope, $stateParams, $translate, $filter) {
if(localStorage.getItem('c_token')){// adding token to the headers
// $http.defaults.headers.common['X-Access-Token'] = localStorage.getItem('c_token');
}
$scope.storageusername=localStorage.getItem("c_username");
$scope.users= JSON.parse(localStorage.getItem('c_users'));
$scope.user = $filter('filter')($scope.users, {username: $stateParams.username}, true)[0];
$scope.notifications=$scope.user.notifications;
console.log($stateParams.username);
console.log($scope.notifications);
console.log("notifications page");
});