ngAutocomplete icon indicating copy to clipboard operation
ngAutocomplete copied to clipboard

Blank value when place is not found

Open eduardmartinez opened this issue 11 years ago • 1 comments
trafficstars

I was testing the plunker simple example and I found when I typed 'ssdfssd' or another value out of the allowed values, the value was stored in scope anyway and I didn't need it. So, I fixed this validating 'geometry' position:

google.maps.event.addListener(scope.gPlace, 'place_changed', function() { scope.$apply(function() { scope.details = scope.gPlace.getPlace(); if (!scope.details.geometry) { scope.ngAutocomplete = ''; } else scope.ngAutocomplete = element.val(); //scope.ngAutocomplete = JSON.stringify(scope.details); }); })

is it a good way to fix it or what do you suggest instead of it?

Thanks in advance and excuses for my bad english :)

eduardmartinez avatar Nov 10 '14 20:11 eduardmartinez

I would like to see some kind of implementation for this as well.

dnlmzw avatar Feb 08 '15 12:02 dnlmzw