ngx-flag-icon-css

flag-icon-css for Angular 2+

Usage no npm install needed!

<script type="module">
  import ngxFlagIconCss from 'https://cdn.skypack.dev/ngx-flag-icon-css';
</script>

README

ngx-flag-icon-css

npm version


flag-icon-css for Angular 2+


Example:

<flag-icon country="fr" squared></flag-icon>
  • country (Input):
    the ISO 3166-1-alpha-2 code of the flag's country

  • squared (Input):
    if added, will render a squared version of the flag


Install:

  1. Install both this library as well as flag-icon-css
npm install ngx-flag-icon-css flag-icon-css
  1. Add the path to the flag-icon-css stylesheet to your angular.json file (inside the "styles" entry)
    Note: This key should still exist in the old .angular-cli.json format
"styles": [
  "src/styles.css",
  "node_modules/flag-icon-css/css/flag-icon.min.css"
],