Make status bar dynamic !

This commit is contained in:
manzerbredes 2016-01-31 11:47:13 +01:00
parent ae774e3811
commit 58e5c44db2
3 changed files with 36 additions and 5 deletions

View file

@ -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);
});