17 lines
433 B
JavaScript
17 lines
433 B
JavaScript
'use strict';
|
|
angular.module('session', [])
|
|
.factory('session', ['$rootScope',function($rootScope) {
|
|
return {
|
|
get: function (){
|
|
return $rootScope.session;
|
|
},
|
|
set: function (res){
|
|
/*
|
|
if($rootScope.session != undefined && $rootScope.session.profil == undefined && res.data.session != undefined){
|
|
$rootScope.$broadcast('warehost.session');
|
|
}*/
|
|
$rootScope.session = res.data.session;
|
|
}
|
|
};
|
|
}]);
|