cobuild-angular-stack
Version:
Base stack angular sass jade gulp
19 lines (15 loc) • 411 B
JavaScript
(function () {
'use strict';
angular.module('uniko.authSatellizer')
.controller('LogoutCtrl', LogoutCtrl);
LogoutCtrl.$inject = ['$scope', 'Auth'];
function LogoutCtrl($scope, Auth) {
if (!Auth.isAuthenticated()) {
return;
}
Auth.logout()
.then(function () {
$scope.$emit('Account::logout');
});
}
})();