Implement typeahead on ionic from $http get

Hi, I have a question for implementaion typeahead, my case is search address from google. I have a code from angularJS basic and use bootstrap like this.

//javascript code:
$scope.getLocation = function(val) {
    return $http.get('//', {
      params: {
        address: val,
        sensor: false
      var addresses = [];
      angular.forEach(, function(item){
      return addresses;

//jade code
input.form-control(type='text', ng-model='asyncSelected', placeholder='Locations loaded via $http', typeahead='address for address in getLocation($viewValue)')