2016-08-14 13:37:26 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
angular.module('warehost', [
|
2016-09-11 18:40:03 +02:00
|
|
|
'ngSanitize',
|
2016-08-14 13:37:26 +02:00
|
|
|
'ui.router',
|
|
|
|
'ui.bootstrap',
|
2016-09-11 18:40:03 +02:00
|
|
|
'ui.select',
|
2016-09-13 20:00:06 +02:00
|
|
|
'ui.tree',
|
2016-09-27 11:44:48 +02:00
|
|
|
'hc.marked',
|
|
|
|
'angular-markdown-editor',
|
2016-08-20 01:17:28 +02:00
|
|
|
'ngTable',
|
2016-08-14 13:37:26 +02:00
|
|
|
'config',
|
2016-08-17 22:35:25 +02:00
|
|
|
'session',
|
|
|
|
'alert'
|
2016-08-14 13:37:26 +02:00
|
|
|
])
|
2016-09-27 11:44:48 +02:00
|
|
|
.config(['$urlRouterProvider','$httpProvider','markedProvider',function($urlRouterProvider,$httpProvider,markedProvider){
|
2016-08-14 13:37:26 +02:00
|
|
|
$urlRouterProvider.otherwise('/');
|
|
|
|
$httpProvider.defaults.withCredentials = true;
|
2016-09-27 11:44:48 +02:00
|
|
|
// marked config
|
|
|
|
markedProvider.setOptions({
|
|
|
|
gfm: true,
|
|
|
|
tables: true,
|
|
|
|
sanitize: true
|
|
|
|
});
|
|
|
|
|
|
|
|
// highlight config
|
|
|
|
//hljsServiceProvider.setOptions({});
|
2016-08-14 13:37:26 +02:00
|
|
|
}]).run(function(session,config,$http) {
|
|
|
|
$http.get(config.api+'/status').then(function(res){
|
|
|
|
session.set(res);
|
|
|
|
});
|
|
|
|
});
|