I was trying to use promise from geocoder lattitude and langitude. that need to be trigger from the ng-init directive. but I was not able to use promise inside a function. plunker for example my ng-init look like this:
<div>Address {{ $index + 1 }}: {{ facility.address }}<span ng-init="distance = maps(facility)" > distance = {{distance}}</span></div>
the whole code is inside a ng-repeat. since my codes are in ng-repeat i cannot use timeout. i think so span having ng-init is replaced with {}
this. you can check that out in plunker. I don't know what is happening.