0.0.9 • Published 7 years ago

ovh-angular-simple-country-list v0.0.9

Weekly downloads
8
License
-
Repository
github
Last release
7 years ago

OVH simple country list

githubbanner

Maintenance Chat on gitter Build Status

NPM

OVH simple country list provide a "full" (ISO-3166-1) list of countries with translation possibility. (translations are not available yet)

Example

  • The list is sorted by the iso contry name and not by the country code.
angular.module("app", ["ovh-angular-simple-country-list"]).controller("YourController", function (OvhSimpleCountryList) {
    // set the disired language. Default is iso/en
    OvhSimpleCountryList.setLanguage('en_GB');

    var countryListAsValueLabel = OvhSimpleCountryList.asDataForSelect; //lazy builded property
    // [{'value':'AD', 'label': 'ANDORRA'}, {'value':'AE', 'label': 'UNITED ARAB EMIRATES'}, ... ]

    var countryListAsSimpleArray = OvhSimpleCountryList.asArray; //lazy builded property
    // ['ANDORRA', 'UNITED ARAB EMIRATES', 'AFGHANISTAN', ...]

    var countryListAsSimpleArray = OvhSimpleCountryList.asObject; //lazy builded property
    // {'AD': 'ANDORRA', 'AE': 'UNITED ARAB EMIRATES', ... }
});

Installation

Bower

bower install ovh-angular-manager-navbar --save

NPM

npm install ovh-angular-manager-navbar --save

Get the sources

    git clone https://github.com/ovh-ux/ovh-angular-simple-country-list.git
    cd ovh-angular-simple-country-list
    npm install
    bower install

You've developed a new cool feature? Fixed an annoying bug? We'd be happy to hear from you!

Have a look in CONTRIBUTING.md

Related links

License

See https://github.com/ovh-ux/ovh-angular-simple-country-list/blob/master/LICENSE