Using AngularAutoMap you can use Google Places Autocomplete as an angularjs directive.
-
Include the following script in your application https://maps.googleapis.com/maps/api/js?libraries=places
-
Include
angularAutoMap.jsorangularAutoMap.min.jsinside your application. -
Include
autoCompleteAddressinside your angular module as dependency injection.angular.module('foo', [ 'autoCompleteAddress' ]); -
To make a text input field map autocomplete field add the attributes below your input field.
google-address-suggestion ng-focus="mv.geolocate()"
Example:
<input id="searchTextField" google-address-suggestion ng-focus="mv.geolocate()" />