sum7/warehost-frontend
sum7
/
warehost-frontend
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.
warehost-frontend/public/components/session.js

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;
}
};
}]);