Socket
Socket
Sign inDemoInstall

ngx-flags

Package Overview
Dependencies
5
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ngx-flags

Angular component to show country flags.


Version published
Maintainers
1
Install size
3.96 MB
Created

Readme

Source

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

14.0.4 - 24-AUG-22

  • [NEW] Added support for ENG (en), CRO (hr), URU (uy), DEN (dk), HON (hn), GER (de), and POR (pt).

14.0.0 - 22-AUG-22

  • [NEW] country attribute can now use ISO 3166-1-alpha-3 code or the name of the country in several languages.
  • [NEW] Support for Angular 14.

13.0.6 - 19-AUG-22

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

13.0.5 - 19-AUG-22

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

Keywords

FAQs

Last updated on 24 Aug 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc