ngAutocomplete
ngAutocomplete copied to clipboard
How to use details in controller
i wanted to know how i can use details values in controller to get only lat,lng
Thanks .
In your markup use details attr i.e
In your controller access it by $scope.detail . $scope.detail will return a detailed JSON response you can parse from that. var lat = $scope.detail.geometry.B; var long = $scsope.detail.geometry.k;
I've tried doing this and it doesn't seem to work. It seems like the properties set in the ngautocomplete.js aren't being set on the $scope in the controller.
i fixed it using : https://gist.github.com/5a90b75874d1ddbf95f6.git and in my controller : $scope.details = function(details){ };
dam1 can you plz show the code the link you mentioned is not working. i am having two location input box , and i want to get latlng for both but only last one is coming, so help to find it for each one
Aman-US-Punjabi just remove the .git from dam1's url.
https://gist.github.com/dam1/5a90b75874d1ddbf95f6
dam1 I tried your edit and am getting error scope is not a function. Any ideas?
problem is with $scope.$apply() ? what if we need it as a property
Hey did anyone find a solution for this?