17 lines
371 B
JavaScript
17 lines
371 B
JavaScript
'use strict';
|
|
|
|
angular.module('warehost')
|
|
.controller('MenuHostCtrl',function(session,config,alert,$scope,$rootScope,$http){
|
|
$scope.profil = {};
|
|
alert.set({});
|
|
function load(){
|
|
$http.get(config.api+'/host/profil').then(function(res){
|
|
session.set(res);
|
|
$scope.profil = res.data.data;
|
|
});
|
|
}
|
|
load();
|
|
$rootScope.$on('warehost.session',load);
|
|
|
|
});
|