Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/iamartyom/ngx-flag-picker


https://github.com/iamartyom/ngx-flag-picker

angular angular10 angular8 angular9 countries flags ngx

Last synced: 8 days ago
JSON representation

Awesome Lists containing this project

README

        

# How to use

Add a link tag with [flag-icon-css](https://cdnjs.com/libraries/flag-icon-css) library to your index.html file.

Add **NgxFlagPickerModule** to your module in the import section.

After:

```
import { Component } from '@angular/core';

@Component({
selector: 'app-root',
template: `


{{ selectedCountryCode }}


`
})
export class AppComponent {
selectedCountryCode = 'us';
countryCodes = ['us', 'lu', 'de', 'bs', 'br', 'pt'];

changeSelectedCountryCode(value: string): void {
this.selectedCountryCode = value;
}
}
```

## Input parameters:

Name | Type
------------ | -------------
selectedCountryCode | string
countryCodes | string[]
customLabels | Record\
showFlags | boolean
showLabels | boolean
showArrow | boolean

## Output parameters:

Name | Type
------------ | -------------
changedCountryCode | EventEmitter\

## [Demo](https://iamartyom.github.io/ngx-flag-picker/)