diff options
| author | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2016-01-31 11:47:13 +0100 |
|---|---|---|
| committer | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2016-01-31 11:47:13 +0100 |
| commit | 58e5c44db2f3343c491495d7077f13450db4e324 (patch) | |
| tree | 4993f7121bdbbc78dc0c50c47ebce6931bb8d637 /client/js/controllers/status.js | |
| parent | ae774e381148ef3a3a34d2f3bc51f15b033995f1 (diff) | |
Make status bar dynamic !
Diffstat (limited to 'client/js/controllers/status.js')
| -rw-r--r-- | client/js/controllers/status.js | 18 |
1 files changed, 14 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 |
