-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
54 lines (47 loc) · 1.69 KB
/
app.js
File metadata and controls
54 lines (47 loc) · 1.69 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
var app = angular.module('app', ['ui.router', 'ui.bootstrap', 'uiGmapgoogle-maps']);
app.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise("/home");
$stateProvider.state('home', {
url: "/home",
templateUrl: "templates/home.html"
}).state('wedding', {
url: "/wedding",
templateUrl: "templates/wedding/wedding.html",
controller: "WeddingController"
}).state('bitcoin', {
url: "/bitcoin",
templateUrl: "templates/bitcoin.html"
}).state('umich', {
url: "/umich",
templateUrl: "templates/layouts/gifList.html",
controller: "UMichController"
}).state('robotics', {
url: "/robotics",
templateUrl: "templates/layouts/gifList.html",
controller: "RoboticsController"
}).state('graphics', {
url: "/graphics",
templateUrl: "templates/layouts/gifList.html",
controller: "GraphicsController"
});
});
app.provider('FrameworkAJAX', function(){
return {
$get: ['$http', function( $http ){
return {
sendRequest: function(request, successCallback, errorCallback){
if( !request.method || !request.url ){
console.log('Error making AJAX request: missing method, url, or data.');
return;
}
return $http( request ).success( successCallback ).error( errorCallback );
}
};
}]
};
});
app.directive('header', function(){
return {
templateUrl: 'templates/headers/headerHomeTemplate.html'
};
});