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
Raw Permalink Normal View History

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