{"size": 594, "ext": "js", "max_stars_repo_path": "src/app/programmerhumor/controller.js", "max_stars_repo_name": "jonathonlaylo/ngReddit", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/app/programmerhumor/controller.js", "max_issues_repo_name": "jonathonlaylo/ngReddit", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/app/programmerhumor/controller.js", "max_forks_repo_name": "jonathonlaylo/ngReddit", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.8260869565, "max_line_length": 78, "alphanum_fraction": 0.5656565657}
/*jshint esversion: 6 */
export const programmerhumorCtrl = class programmerhumorCtrl{
  constructor($scope, programmerhumorService){
    this.title =  "programmerhumor";
    programmerhumorService.getPosts()
    .then(({
      status,
      data : {
        data : {
          childrenK
        }
      }
    }) => {
      if (status !== 200){
        $scope.error = `Error fetching /r/programmerhumor\nStatus: ${status}`;
      }
      $scope.posts = children
        .filter(child => child.data.precview)
        .map(child => child.data);
    })
    .catch( err => console.log(err));
  }
};