Angular component to show country flags.
Install the package with NPM:
$ npm install nxt-flags
Import the module to app.module.ts:
import { FlagsModule } from 'nxt-flags';
@NgModule({
...
imports: [
...,
FlagsModule,
...
],
...
})
Add this lines to angular.json:
{
...
"assets": [
...,
{
"glob": "**/*",
"input": "./node_modules/nxt-flags/assets/flags",
"output": "./assets/flags"
}
].
...
}
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>
| attribute | options | default | description |
|---|---|---|---|
| size | 'xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl', |
48 |
sets the flag width |
| format | 'none', 'round', 'square' |
'none' |
sets the flag format |
Generated using TypeDoc