Phone input

Phone number input field for use with CountriesCollection

Contents

Phone input with no country priority set. The countries will purely be selected based on phone code length.

Flag of UNITED KINGDOM

Phone input with country priority set to US, CA, NZ, AU, GB. US and CA have the same country phone code, but US will be prioritized in the selection list since it is first in the countryPriority array.

Flag of UNITED STATES
Inputs in Country priority
countryPriority ?: string[] = [ CountryCode.US, CountryCode.CA, CountryCode.NZ, CountryCode.AU, CountryCode.GB, ]

Priority countries to show for country select

Also set in this example
formGroup : FormGroup<{ countryCode: FormControl<any>; phoneNumber: FormControl<string>; displayPhoneNumber: FormControl<string>; }>
countriesOptions ?: readonly Country[] = []