<commit_before>'use strict';

angular.module('F1FeederApp', [
  'F1FeederApp.controllers'
]);

angular.module('F1FeederApp.controllers', []).controller('driversController', function($scope) {
    $scope.driversList = [
      {
          Driver: {
              givenName: 'Sebastian',
              familyName: 'Vettel'
          },
          points: 322,
          nationality: "German",
          Constructors: [
              {name: "<NAME>"}
          ]
      },
      {
          Driver: {
          givenName: 'Fernando',
              familyName: 'Alonso'
          },
          points: 207,
          nationality: "Spanish",
          Constructors: [
              {name: "Ferrari"}
          ]
      }
    ];
});<commit_msg>Show dynamic list of drivers<commit_after>'use strict';

angular.module('F1FeederApp', [
  'F1FeederApp.controllers',
  'F1FeederApp.services'
]);

angular.module('F1FeederApp.controllers', []).controller('driversController', function($scope, ergastAPIservice) {
    $scope.driversList = [];

    ergastAPIservice.getDrivers().success(function (response) {
        $scope.driversList = response.MRData.StandingsTable.StandingsLists[0].DriverStandings;
    });
});

angular.module('F1FeederApp.services', []).  factory('ergastAPIservice', function($http) {
    var ergastAPI = {};

    ergastAPI.getDrivers = function() {
      return $http({
        method: 'JSONP', 
        url: 'http://ergast.com/api/f1/2014/driverStandings.json?callback=JSON_CALLBACK'
      });
    }

    return ergastAPI;
  });
{'fraction_non_alphanumeric': 0.14928292046936115, 'fraction_numerical': 0.01303780964797914, 'mean_word_length': 2.4340044742729305, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3125976', 'n_tokens_mistral': 502, 'n_tokens_neox': 473, 'n_words': 65}