ng-flags
ng-flags copied to clipboard
Simple directive for country flags
ng-flags - AngularJS country flags directive
Simple directive for country flags, The directive takes country iso code and creates a thumbnail of the country's flag.
Usage
-
Add ng-flag.js to your main file (index.html)
-
Set
ngFlag
as a dependency in your module
var myapp = angular.module('myapp', ['ngFlag'])
- Add the following line to the head section of your main file
<link rel="stylesheet" type="text/css" href="http://cloud.github.com/downloads/lafeber/world-flags-sprite/flags16.css" />
- Start drawing flags
<flag country="us" size="16"></flag>
* 32x32 thumbnails are also supported, just add the following line to your head:
```code
<link rel="stylesheet" type="text/css" href="http://cloud.github.com/downloads/lafeber/world-flags-sprite/flags32.css" />
And and specify the wanted sizein your html:
<flag country="us" size="32"></flag>