nxt-flags

GitHub license npm scope

Angular component to show flags based on country ISO code.

Quick links

Installing

Example :
npm install --save nxt-flags

Import flags module

Example :
import { FlagsModule } from 'nxt-flags'

@NgModule({
    ...
    imports: [
        ...
        FlagsModule
    ]
})

Add flags SVGs to Angular compilation

Example :
{
    ...
    "assets": [
        ...,
        {
            "glob": "**/*",
            "input": "./node_modules/nxt-flags/assets/flags",
            "output": "./assets/flags"
        }
    ]
}

Include it in HTML template

Use the tag nxt-flag with attribute country="xx" (where xx is the ISO 3166-1-alpha-2 code of a country):

Example :
<nxt-flag country="br"></nxt-flag>

results matching ""

    No results matching ""