Google Places Autocomplete


#1

Hi guys, I am trying get the Google place search autocomplete working like in this tutorial and it’s working fine in the browser, but when I run this on a real device it is not working anymore.

Any idea ? I just spent the whole day trying to figure it out without any success…

Thanks


#2

Hi, you should have a look in the device log : adb logcat when you have it emulated or usb plugged.

Probably some rights refused.


#3

I figured it out ! It was the view that wasn’t displaying… So when I loaded the search page directly, it worked !


#4

For me it works on browser but on iOS I get this error .
Can’t find variable: google


#5

Have you declared it ? within the import, add declare var google;

import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
declare var google;

#6

This should help Solved