{"size": 847, "ext": "js", "max_stars_repo_path": "public/js/controllers/approvedController.js", "max_stars_repo_name": "nashgetch/ilts2", "max_stars_repo_stars_event_min_datetime": "2018-08-05T15:31:37.000Z", "max_stars_repo_stars_event_max_datetime": "2018-08-05T15:31:37.000Z", "max_issues_repo_path": "public/js/controllers/approvedController.js", "max_issues_repo_name": "nashgetch/ilts2", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "public/js/controllers/approvedController.js", "max_forks_repo_name": "nashgetch/ilts2", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 33.88, "max_line_length": 171, "alphanum_fraction": 0.5962219599}
app.controller('approvedController', ['$location', '$scope', 'approvedServices','$routeParams', '$sce', function($location, $scope, approvedServices, $routeParams, $sce) {

    approvedServices.viewApproved().success(function (response) {
        $scope.approved = response;
        console.log(response);
    });
    angular.extend($scope, {
        singleLetter: {}
    });
    if($routeParams.id){
        approvedServices.getSingleApproved($routeParams.id).success(function (response) {
            $scope.singleLetter = response;
            console.log(response);
        });
    }
    angular.extend($scope, {
        viewApprovedLetter: function(id){
            $location.path('/letter/approved/' + id);
        },
        viewFile: function(filename){
            $location.path('/letter/inbox/file/' + filename);
        }
    });
}]);
