-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
35 lines (32 loc) · 760 Bytes
/
app.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
26
27
28
29
30
31
32
33
34
35
'use strict';
angular
.module('hackathon', [
'ngRoute',
'ngCookies',
'ngMessages',
'naif.base64',
'facebook',
'ngVidBg',
'ngDraggable'
])
.config(routesConfig)
.config(['$httpProvider', resetHeaders])
.config(function(FacebookProvider) {
FacebookProvider.init('1798131777068500');
});
function routesConfig($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'views/home.html'
})
.otherwise({
redirectTo: '/'
});
}
function resetHeaders($httpProvider) {
//Reset headers to avoid OPTIONS request (aka preflight)
$httpProvider.defaults.headers.common = {};
$httpProvider.defaults.headers.post = {};
$httpProvider.defaults.headers.put = {};
$httpProvider.defaults.headers.patch = {};
}