blob: 25600aa611313b6b9b4550e830d07800325e9c89 [file] [log] [blame]
Matteo Scandolo817386b2015-11-04 16:07:09 +01001(function() {
2 'use strict';
3
Matteo Scandoloba4c9aa2016-02-11 09:35:29 -08004 angular.module('bugSnag', []).factory('$exceptionHandler', function () {
5 return function (exception, cause) {
6 Bugsnag.notifyException(exception, {diagnostics:{cause: cause}});
7 };
8 });
9
Matteo Scandolo817386b2015-11-04 16:07:09 +010010 angular
11 .module('xos.helpers',[
Matteo Scandolo3c217ad2015-11-05 16:02:11 +010012 'ngCookies',
13 'xos.xos',
14 'xos.hpcapi',
Matteo Scandoloba4c9aa2016-02-11 09:35:29 -080015 'xos.xoslib',
16 'bugSnag'
Matteo Scandolo817386b2015-11-04 16:07:09 +010017 ])
18 .config(config);
19
20 function config($httpProvider, $interpolateProvider, $resourceProvider) {
21 $httpProvider.interceptors.push('SetCSRFToken');
22
23 $interpolateProvider.startSymbol('{$');
24 $interpolateProvider.endSymbol('$}');
25
26 // NOTE http://www.masnun.com/2013/09/18/django-rest-framework-angularjs-resource-trailing-slash-problem.html
27 $resourceProvider.defaults.stripTrailingSlashes = false;
28 }
29})();