Matteo Scandolo | 889ced3 | 2015-11-04 16:07:09 +0100 | [diff] [blame] | 1 | (function() { |
| 2 | 'use strict'; |
| 3 | |
| 4 | angular |
| 5 | .module('xos.helpers',[ |
Matteo Scandolo | 6328d9b | 2015-11-05 16:02:11 +0100 | [diff] [blame] | 6 | 'ngCookies', |
| 7 | 'xos.xos', |
| 8 | 'xos.hpcapi', |
| 9 | 'xos.xoslib' |
Matteo Scandolo | 889ced3 | 2015-11-04 16:07:09 +0100 | [diff] [blame] | 10 | ]) |
| 11 | .config(config); |
| 12 | |
| 13 | function config($httpProvider, $interpolateProvider, $resourceProvider) { |
| 14 | $httpProvider.interceptors.push('SetCSRFToken'); |
| 15 | |
| 16 | $interpolateProvider.startSymbol('{$'); |
| 17 | $interpolateProvider.endSymbol('$}'); |
| 18 | |
| 19 | // NOTE http://www.masnun.com/2013/09/18/django-rest-framework-angularjs-resource-trailing-slash-problem.html |
| 20 | $resourceProvider.defaults.stripTrailingSlashes = false; |
| 21 | } |
| 22 | })(); |