Google Places Autocomplete in Angularjs

4,332 views
Skip to first unread message

sreya...@gmail.com

unread,
Sep 24, 2012, 9:01:07 AM9/24/12
to ang...@googlegroups.com
Hello,

I have managed to create a Google Places Autocomplete  text field in Angularjs.
The problem is-
model updates when you use arrow keys and press enter/tab on the chosen place, but it does not update when you click on a place in the dropdown list.

You can see the same here-

Please help.

I can't thank the AngularJs team and community enough for creating and promoting something so brilliant. 

Cheers
Sreyans

Andy Joslin

unread,
Sep 24, 2012, 10:29:17 AM9/24/12
to ang...@googlegroups.com, sreya...@gmail.com
You should use the 'place_changed' event, from the documentation: https://developers.google.com/maps/documentation/javascript/places#places_autocomplete (search for place_changed)

Here's how I implemented it in the fiddle: http://jsfiddle.net/mwDQr/1/
Reply all
Reply to author
Forward
0 new messages