alanrs2020 / ngx-country-dropdown

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NgxCountryDropdown

An Angular Material package for selecting country from list.

Supports:

  • Angular
  • Angular Material
  • ReactiveFormsModule

Images

alt text alt text alt text

Installation

Install This Library

$ npm install ngx-country-dropdown --save

Usage

Import

import { NgxCountryDropdownModule } from "ngx-country-dropdown";

Add NgxCountryDropdownModule to your module file:

imports: [
    NgxCountryDropdownModule,
  ]

Example

Refer to test app in this repository for working example.

<form action="" [formGroup]="testForm" (submit)="onSubmit()">
    <ngx-country-dropdown defaultValue="India" formControlName="country"></ngx-country-dropdown>
    <input class="btn" type="submit" value="Show">
</form>

<p> {{ selectedCountry}} </p>

Options

Options Type Default Description
defaultValue string "" Default country value.

Library Contributions

  • Fork repo.
  • Go to ./projects/ngx-country-dropdown
  • Update ./src/lib with new functionality.
  • Update README.md
  • Pull request.

keywords

angular npm countrylist dropdown input

About