Skip to content

AngularJS directive to embed country flags by using flag-icon-css library

License

Notifications You must be signed in to change notification settings

OscarYuen/ng-country-flags

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ng-country-flags

GitHub license npm scope

AngularJS directive to embed country flags by using flag-icon-css library

Install

You can either download the whole project as is or install it via NPM:

$ npm install ng-country-flags

Usage

Put the css, flags, js folders under dist foler into the path where your appliaction css,svg and js resources locates.

Use the tag 'countryflags' with attribute 'country="xx"' (where xx is the ISO 3166-1-alpha-2 code of a country). If you want to have a squared version flag then add the attribute 'is-square="true"' as well. Example:

<countryflag country="en">English</countryflag>
<countryflag country="en" is-square="true">English <span class="caret"></span></countryflag>

Development

Run the npm install to install the dependencies after cloning the project and you'll be able to:

To build minified js and css

$ grunt

To build non-minified js and css

$ grunt dev