2016-07-06 22:52:31 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
angular.module('ffhb', [
|
|
|
|
'ngTable',
|
|
|
|
'ngResource',
|
2016-07-13 11:43:27 +02:00
|
|
|
'angularLocalStorage',
|
2016-07-06 22:52:31 +02:00
|
|
|
'ui.router',
|
2016-07-09 10:15:03 +02:00
|
|
|
'ui.bootstrap',
|
2016-07-06 22:52:31 +02:00
|
|
|
'ui-leaflet',
|
2016-07-09 10:15:03 +02:00
|
|
|
'angularMoment',
|
2016-07-06 22:52:31 +02:00
|
|
|
'Authentication',
|
|
|
|
'angular-web-notification',
|
|
|
|
'config'
|
|
|
|
])
|
|
|
|
.config(['$urlRouterProvider',function ($urlRouterProvider){
|
|
|
|
//,$httpProvider) {
|
|
|
|
$urlRouterProvider.otherwise('/nodes/sort');
|
|
|
|
//$locationProvider.html5Mode(true).hashPrefix('!');
|
|
|
|
//$httpProvider.defaults.withCredentials = true;
|
2016-07-14 14:04:51 +02:00
|
|
|
}]).run(function(amMoment,$cookieStore,$rootScope,$http,config) {
|
2016-07-06 22:52:31 +02:00
|
|
|
amMoment.changeLocale('de');
|
|
|
|
$rootScope.globals = $cookieStore.get('globals') || {};
|
2016-07-14 14:04:51 +02:00
|
|
|
$rootScope.autorefresh = config.refresh;
|
2016-07-06 22:52:31 +02:00
|
|
|
if ($rootScope.globals.currentUser) {
|
|
|
|
$http.defaults.headers.common['Authorization'] = 'Basic ' + $rootScope.globals.currentUser.authdata; // jshint ignore:line
|
|
|
|
}
|
|
|
|
});
|