carrari / angular-country-select

Country select for AngularJS

Home Page:http://alexcheng1982.github.io/angular-country-select

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Country select for AngularJS

A simple AngularJS directive to create country select. It uses select2 to create auto-complete country select. Country data is from mledoze/countries.

Install

Install angular-country-select using Bower bower install angular-country-select.

Usage

Make your Angular module depend on module angular-country-select.

angular.module('countrySelectExample', ['angular-country-select']);

Then use directive country-select.

<input country-select data-ng-model="country">

Value of selected country is the ISO 3166-1 alpha-2 code, e.g. CN, US.

See example.html for a simple example.

Countries data

Countries JSON data is inlined into JavaScript file during Grunt build, so no extra download is required in runtime.

About

Country select for AngularJS

http://alexcheng1982.github.io/angular-country-select

License:MIT License


Languages

Language:JavaScript 57.6%Language:HTML 42.4%