-
Notifications
You must be signed in to change notification settings - Fork 14
/
foie.js
47 lines (37 loc) · 1 KB
/
foie.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
36
37
38
39
40
41
42
43
44
45
46
47
var foie,
controllers;
foie = angular.module('foie', [
'ngRoute',
'foie.controllers'
]);
foie.config(['$routeProvider',
function($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'partials/overview.html',
controller: 'OverviewCtrl'
})
.otherwise({
redirectTo: '/'
});
}
]);
controllers = angular.module('foie.controllers', []);
controllers.controller('OverviewCtrl', [ '$scope',
function($scope) {
var data = JSON.parse(document.getElementById('request-data').innerHTML);
$scope.total = data.total;
$scope.refusedCount = data.refusedCount;
$scope.notHeldCount = data.notHeldCount;
$scope.successCount = data.successCount;
$scope.name = data.name;
$scope.site = data.site;
$scope.successful = data.successful;
$scope.popular = data.popular;
$scope.refused = data.refused;
$scope.notHeld = data.notHeld;
$scope.from = data.from;
$scope.to = data.to;
$scope.requests = data.requests;
}
]);