Angular country list factory based on https://github.com/fannarsh/country-list
angular.module('myModule', ['ngCountryList']);angular.module('myModule').controller('myController', ['$countryList', function($countryList) {
}]);$countryList.getCode('Spain'); // Output: 'ES'$countryList.getName('ES'); // Output: 'Spain'Returns an array containing every country names.
$countryList.getNames();Returns an array containing every country codes.
$countryList.getCodes();Returns an object containing every country following the { "code": "ES", "name": "Spain" } schema.
$countryList.getData();Proudly sponsored by
