14.0.4 • Published 2 years ago

ngx-flags v14.0.4

Weekly downloads
19
License
MIT
Repository
github
Last release
2 years ago

ngx-flags

GitHub license npm scope

Angular component to show country flags.

Install

Install the package with NPM:

$ npm install ngx-flags

Import the module to app.module.ts:

import { NgxFlagsModule } from 'ngx-flags';

@NgModule({
  ...
  imports: [
    ...,
    NgxFlagsModule,
    ...
  ],
  ...
})

Add this lines to angular.json:

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

Usage

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

<flag country="br"></flag>

Optional attributes

attributeoptionsdefaultdescription
size'xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl', 48sets the flag width
format'none', 'round', 'square''none'sets the flag format
classapply custom class to flag

Release notes

13.0.5 - 19-AUG-22

  • NEW Added Wales (gb-wls, wls, wales)
  • FIX #2 Flag for GB/UK was mapped wrongly.

13.0.6 - 19-AUG-22

  • FIX Fixed bug that prevented the flag to be shown under certain circumstances.
14.0.0

2 years ago

14.0.1

2 years ago

14.0.2

2 years ago

14.0.3

2 years ago

14.0.4

2 years ago

13.0.6

2 years ago

13.0.4

2 years ago

13.0.5

2 years ago

13.0.2

2 years ago

13.0.3

2 years ago

13.0.1

2 years ago

2.0.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago