ng country flags

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

7
2
JavaScript

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