postal-code-autocomplete
v0.0.8
Published
Librería para Angular con input y dropdown de código postales. Angular library with zipcode input and dropdown.
Downloads
20
Maintainers
Readme
Postal Code Autocomplete | Autocomplete de códigos postales
Install
npm install postal-code-autocomplete --save
Component
How use
<ng-postal-code-autocomplete [country]="country" [(zipCode)]="model"></ng-postal-code-autocomplete>
Inputs
country | string | default: es
Service
How to use
Inject service PostalCodeAutocomplete, example:
constructor(private readonly postalCode: PostalCodeAutocompleteService){
console.log(postalCode.getZipCodeByCode(this.country,'23009'))
}
Methods
getZipCodeByCity(country: string = 'es', city: string): ZipCode
getZipCodeByCode(country: string = 'es', code: string): ZipCode