ngAutocomplete icon indicating copy to clipboard operation
ngAutocomplete copied to clipboard

How to use details in controller

Open programming-kid opened this issue 10 years ago • 8 comments

i wanted to know how i can use details values in controller to get only lat,lng

Thanks .

programming-kid avatar Aug 05 '14 20:08 programming-kid

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;

vivekm26 avatar Aug 25 '14 12:08 vivekm26

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.

czieler avatar Sep 18 '14 02:09 czieler

i fixed it using : https://gist.github.com/5a90b75874d1ddbf95f6.git and in my controller : $scope.details = function(details){ };

dam1 avatar Nov 03 '14 02:11 dam1

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 avatar Dec 01 '14 22:12 Aman-US-Punjabi

Aman-US-Punjabi just remove the .git from dam1's url.

https://gist.github.com/dam1/5a90b75874d1ddbf95f6

sheldonwjones avatar Jan 06 '15 21:01 sheldonwjones

dam1 I tried your edit and am getting error scope is not a function. Any ideas?

ghost avatar Jun 30 '15 15:06 ghost

problem is with $scope.$apply() ? what if we need it as a property

syalanuj avatar Nov 27 '15 20:11 syalanuj

Hey did anyone find a solution for this?

ShawnSantiago avatar Dec 16 '15 02:12 ShawnSantiago