diff options
| author | Yoggzo <yogg@epsina.com> | 2016-02-24 13:23:47 +0100 |
|---|---|---|
| committer | Yoggzo <yogg@epsina.com> | 2016-02-24 13:23:47 +0100 |
| commit | fafb5eeaa4676823680c828ac57adf2e855b7afd (patch) | |
| tree | 58c914ba9b277252daf53c27e878f262cb4579ad /client/js/controllers/status.js | |
| parent | 16e0328884f318d97ac991ee8e70f43ee1c14b38 (diff) | |
| parent | d2f5ae5c83ef5bc41cf430ace79769459b4acbf8 (diff) | |
Merge branch 'develop' into Evan
Diffstat (limited to 'client/js/controllers/status.js')
| -rw-r--r-- | client/js/controllers/status.js | 14 |
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'); + + }; + }]); |
