forked from France-ioi/AlgoreaPlatform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalgorea.js
25 lines (22 loc) · 1014 Bytes
/
algorea.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
'use strict';
// Make sure to include the `ui.router` module as a dependency
var app = angular.module('algorea', ['ui.router', 'ui.bootstrap', 'ui.sortable', 'franceIOILogin', 'ngSanitize','small-ui-confirm', 'anguFixedHeaderTable', 'jm.i18next']);
app.factory('$exceptionHandler', ['$log', function($log) {
return function (exception, cause) {
$log.error(exception, cause);
ErrorLogger.log(exception.message, exception.fileName, exception.lineNumber, exception.columnNumber, exception);
}
}]);
app.factory('preventTemplateCache', function($injector) {
return {
'request': function(cfg) {
// 'uib/' - we must skip bootstrap templates since they are in cache already
if(cfg.url.indexOf('.html') !== -1 && cfg.url.indexOf('uib/') === -1 && cfg.url.substr(0, 4) != 'mem/') {
cfg.url += (window.config.domains.current.urlArgs || '');
}
return cfg;
}
}
}).config(function($httpProvider) {
$httpProvider.interceptors.push('preventTemplateCache');
});