|
@@ -3,8 +3,8 @@
|
3
|
3
|
*/
|
4
|
4
|
|
5
|
5
|
angular.module('app')
|
6
|
|
- .controller('ToolBarController', ['$scope', '$state', '$mdSidenav', 'luticateAuthCache',
|
7
|
|
- function($scope, $state, $mdSidenav, luticateAuthCache) {
|
|
6
|
+ .controller('ToolBarController', ['$scope', '$state', '$mdSidenav', 'luticateAuthCache', 'luticateAuthUsers',
|
|
7
|
+ function($scope, $state, $mdSidenav, luticateAuthCache, luticateAuthUsers) {
|
8
|
8
|
|
9
|
9
|
$scope.toggleSideBar = function()
|
10
|
10
|
{
|
|
@@ -18,4 +18,11 @@ angular.module('app')
|
18
|
18
|
$scope.isLogged = function () {
|
19
|
19
|
return $scope.getCurrentUser() != null;
|
20
|
20
|
};
|
|
21
|
+
|
|
22
|
+ $scope.logout = function () {
|
|
23
|
+ luticateAuthUsers.logout().then(function(data)
|
|
24
|
+ {
|
|
25
|
+ $state.go("home");
|
|
26
|
+ });
|
|
27
|
+ }
|
21
|
28
|
}]);
|