Skip to content

devnix/ngCountryList

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

ngCountryList

Angular country list factory based on https://github.com/fannarsh/country-list

Examples

Require module

angular.module('myModule', ['ngCountryList']);

Call factory from a controller

angular.module('myModule').controller('myController', ['$countryList', function($countryList) {
	
}]);

API

$countryList.getCode(name)

Example

$countryList.getCode('Spain'); // Output: 'ES'

$countryList.getName(code)

Example

$countryList.getName('ES'); // Output: 'Spain'

$countryList.getNames()

Returns an array containing every country names.

Example

$countryList.getNames();

$countryList.getCodes()

Returns an array containing every country codes.

Example

$countryList.getCodes();

$countryList.getData()

Returns an object containing every country following the { "code": "ES", "name": "Spain" } schema.

Example

$countryList.getData();

Proudly sponsored by

Ecomputer

About

Angular country list factory based on https://github.com/fannarsh/country-list

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors