actualitzant...

This commit is contained in:
arnaucode
2017-01-25 22:27:33 +01:00
parent 6e914b3ebe
commit 5f16f060c1
23 changed files with 1104 additions and 941 deletions

15
www/js/notifications.js Normal file
View File

@@ -0,0 +1,15 @@
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");
});