1.13.6 • Published 2 years ago

flag-angular-component v1.13.6

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Getting Started

npm s-flag-input provides the country flag dropdown along with country code and country name. Based on the default region which is given as the input in the application, the country list is displayed in the dropdown.

Installation

Install npm s-flag-input from npm:

npm i s-flag-input

Add wanted package to NgModule imports:

import { SCountryFlagInputModule } from 's-flag-input';
@NgModule({
  ...
  imports: [SCountryFlagInputModule,...]
  ...
})

Add component to your page:

<s-country-flag-input></s-country-flag-input> 

Installation in local

Properties

NameTypeDefaultDescription
defaultCountryObjectIndiaFlag should on loading the component
showFlagsBooleanfalseIf it is set to true, the dropdown values are shown
countriesDataListarray-It contains the list of countries List
flagComponentFormFormGroup-It contains the formgroup and validation of phone number input
countryarray-It contains the list of filtered countries List based on the default region input

Methods

NameParametersDescription
flagdataeventIt returns the selected value of flag data
phoneNumberInputeventIt returns the given phone number input
defaultRegionstringIt is input of default region which is given in the application.