Child: [9b8d78] (diff)

Download this file

statisticsCtrl.js    23 lines (19 with data), 780 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
/*made by Miguel Rodrigues @ KBZ miguel.rodrigues@knowledgebiz.pt*/
console.log("Defining statisticsCtrl");
angular.module('mainApp')
.controller('statisticsCtrl', function($scope, $routeParams, $http, appService) {
$scope.appID = $routeParams.appid;
console.log("Running statisticsCtrl for developerid (" + $routeParams.developerid + ")");
appService.getRuleStatistics($routeParams.rulesid).then(function(response){
if(response.data.success){
console.log("getRuleStatistics response: " + JSON.stringify(response.data));
$scope.statistics = response.data.data;
}else{
//call notification service
console.log("Something went wrong...");
}
}).then(function(){
console.log("getRuleStatistics timed out");
});
console.log("Loading statisticsCtrl");
});