freifunkmanager/public/app/app.js

28 lines
804 B
JavaScript
Raw Normal View History

2016-07-06 22:52:31 +02:00
'use strict';
angular.module('ffhb', [
'ngTable',
'ngResource',
'ngCookies',
'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;
}]).run(function(amMoment,$cookieStore,$rootScope,$http) {
amMoment.changeLocale('de');
$rootScope.globals = $cookieStore.get('globals') || {};
if ($rootScope.globals.currentUser) {
$rootScope.passphrase = '*****';
2016-07-06 22:52:31 +02:00
$http.defaults.headers.common['Authorization'] = 'Basic ' + $rootScope.globals.currentUser.authdata; // jshint ignore:line
}
});