ngAutocomplete icon indicating copy to clipboard operation
ngAutocomplete copied to clipboard

display only countries.

Open nidzovito opened this issue 10 years ago • 2 comments
trafficstars

I would like to display only countries in the dropdown, but I can't find the option in the parameter. How can i do that? I also can't find the code place to filter the result.

nidzovito avatar Aug 13 '15 11:08 nidzovito

Google does not offer this service. So it's not in the autocomplete. It is possible with a workaround though. But it would require to iterate through all returned objects to find out which objects have the type not set to country, and then remove those.

If implemented wrong this could give odd behaviour, so be careful :)

cmddavid avatar Aug 21 '15 15:08 cmddavid

You should extend your autocompleteService.getPlacePrediction arg with the opts build previously to get same results.

pimpin avatar Oct 27 '15 17:10 pimpin