summaryrefslogtreecommitdiff
path: root/client/js/controllers/status.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/js/controllers/status.js')
-rw-r--r--client/js/controllers/status.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/client/js/controllers/status.js b/client/js/controllers/status.js
index 2930e34..e01df34 100644
--- a/client/js/controllers/status.js
+++ b/client/js/controllers/status.js
@@ -6,9 +6,17 @@
* @param {$scope} $scope The $scope service from angular
* @param {Identity} The Identity service
*/
-mainApp.controller('statusCtrl', ['$scope','Identity', function ($scope, Identity)
+mainApp.controller('statusCtrl', ['$scope','Identity', '$rootScope', function ($scope, Identity, $rootScope)
{
+
+ // Give profile to model
$scope.profile=Identity.profile;
-
-
+
+ // Function to logout
+ $scope.logout=function(){
+ Identity.logout();
+ $rootScope.$broadcast('logoutEvent');
+
+ };
+
}]);