Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iamartyom/ngx-flag-picker
https://github.com/iamartyom/ngx-flag-picker
angular angular10 angular8 angular9 countries flags ngx
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/iamartyom/ngx-flag-picker
- Owner: iamartyom
- License: mit
- Created: 2019-09-20T23:57:44.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-19T02:07:53.000Z (over 1 year ago)
- Last Synced: 2024-09-18T01:18:01.559Z (3 months ago)
- Topics: angular, angular10, angular8, angular9, countries, flags, ngx
- Language: TypeScript
- Homepage: https://iamartyom.github.io/ngx-flag-picker/
- Size: 3.76 MB
- Stars: 14
- Watchers: 2
- Forks: 5
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-angular - ngx-flag-picker - 😻 Customizable component which containing a dropdown with country flags (Uncategorized / Uncategorized)
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/)