genofire/hs_monolith
genofire
/
hs_monolith
Archived
1
0
Fork 0
This repository has been archived on 2020-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
hs_monolith/webroot/static/js/global.js

17 lines
434 B
JavaScript
Raw Permalink Normal View History

2017-05-12 10:58:43 +02:00
'use strict';
angular.module('microStock')
.controller('GlobalCtrl',['$scope','$http', function($scope, $http){
2017-05-12 10:58:43 +02:00
$scope.loggedIn = false;
$scope.login = function(){
if($scope.loggedIn){
$http.defaults.headers.common["session"] = "logoff";
2017-05-12 10:58:43 +02:00
$scope.loggedIn = false;
}else {
$http.defaults.headers.common["session"] = "testsessionkey";
2017-05-12 10:58:43 +02:00
$scope.loggedIn = true;
}
};
}]);