nxt-flags
v18.0.0
Published
Angular component to show country flags.
Downloads
796
Maintainers
Readme
nxt-flags
Angular component to show flags based on country ISO code.
Quick links
Installing
npm install --save nxt-flags
Import flags module
import { FlagsModule } from 'nxt-flags'
@NgModule({
...
imports: [
...
FlagsModule
]
})
Add flags SVGs to Angular compilation
{
...
"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):
<nxt-flag country="br"></nxt-flag>