diff options
Diffstat (limited to 'client/js')
| -rw-r--r-- | client/js/controllers/status.js | 18 | ||||
| -rw-r--r-- | client/js/requests/identity.js | 15 |
2 files changed, 29 insertions, 4 deletions
diff --git a/client/js/controllers/status.js b/client/js/controllers/status.js index 3534912..0767202 100644 --- a/client/js/controllers/status.js +++ b/client/js/controllers/status.js @@ -4,9 +4,19 @@ -mainApp.controller('statusCtrl', function ($scope) +mainApp.controller('statusCtrl', function ($scope,$interval) { - $scope.username="User 1"; - $scope.connection="Online"; - $scope.lastconnection="1 Septembre"; + + // Update status every 2 seconds + $interval(function(){ + var status=identity.fetchStatus(); + $scope.connection=status[0]; + $scope.username=status[1]; + $scope.lastconnection=status[2]; + }, 2000); + + + + + });
\ No newline at end of file diff --git a/client/js/requests/identity.js b/client/js/requests/identity.js index e69de29..369ce85 100644 --- a/client/js/requests/identity.js +++ b/client/js/requests/identity.js @@ -0,0 +1,15 @@ + + +// Make Namespace +var identity = {} ; + + + +// Fetch Status +identity.fetchStatus = function(){ + + // TODO + + return new Array("1", "user1", "25/02/2016"); + +}
\ No newline at end of file |
