js.application.applicationController.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openmuc-webui-base Show documentation
Show all versions of openmuc-webui-base Show documentation
WebUI base for the OpenMUC framework.
(function(){
var injectParams = ['$scope', '$state', '$cookieStore', '$alert', '$translate', 'AuthService'];
var ApplicationController = function($scope, $state, $cookieStore, $alert, $translate, AuthService) {
$translate('SUCCESSFULLY_LOGGED_OUT').then(function(text) {
$scope.loggedOutText = text;
});
$scope.isLoggedIn = function() {
return AuthService.isLoggedIn();
};
$scope.logout = function() {
AuthService.logout();
$alert({content: $scope.loggedOutText, type: 'success'});
$state.go('home');
};
$scope.changeLanguage = function (key) {
$translate.use(key);
};
$scope.currentLanguageIsEnglish = function() {
return $translate.use() == 'en';
};
$scope.currentLanguageIsGerman = function() {
return $translate.use() == 'de';
};
};
ApplicationController.$inject = injectParams;
angular.module('openmuc.common').controller('ApplicationController', ApplicationController);
})();
© 2015 - 2025 Weber Informatics LLC | Privacy Policy