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.
2016-08-14 13:37:26 +02:00
|
|
|
'use strict';
|
|
|
|
angular.module('session', [])
|
|
|
|
.factory('session', ['$rootScope',function($rootScope) {
|
|
|
|
return {
|
|
|
|
get: function (){
|
|
|
|
return $rootScope.session;
|
|
|
|
},
|
|
|
|
set: function (res){
|
2016-10-17 23:43:14 +02:00
|
|
|
/*
|
|
|
|
if($rootScope.session != undefined && $rootScope.session.profil == undefined && res.data.session != undefined){
|
|
|
|
$rootScope.$broadcast('warehost.session');
|
|
|
|
}*/
|
2016-08-14 13:37:26 +02:00
|
|
|
$rootScope.session = res.data.session;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}]);
|