Google Places Autocomple in Ionic 2


#1

I’m trying to implement the Google Places library in an Ionic 2 app as describe here, but I’m not getting.

Apparently it is related to the order of the things are loaded, but I do not know how I can solve it in ionic.

In the index.html:

<script src="http://maps.google.com/maps/api/js?key=AIzaSyACxoGc4hbs9eZzOiXsbL7_SDJ0IdmGitt&libraries=places"></script>

The error from the console:

Uncaught TypeError: Cannot read property 'value' of nullp$ @ places_impl.js:9C$.S @ places_impl.js:35(anonymous function) @ js?key=AIzaSyACxoGc4hbs9eZzOiXsbL7_SDJ0IdmGitt&libraries=places&callback=initMap:134(anonymous function) @ js?key=AIzaSyACxoGc4hbs9eZzOiXsbL7_SDJ0IdmGitt&libraries=places&callback=initMap:100(anonymous function) @ js?key=AIzaSyACxoGc4hbs9eZzOiXsbL7_SDJ0IdmGitt&libraries=places&callback=initMap:47(anonymous function) @ js?key=AIzaSyACxoGc4hbs9eZzOiXsbL7_SDJ0IdmGitt&libraries=places&callback=initMap:100(anonymous function) @ js?key=AIzaSyACxoGc4hbs9eZzOiXsbL7_SDJ0IdmGitt&libraries=places&callback=initMap:47(anonymous function) @ js?key=AIzaSyACxoGc4hbs9eZzOiXsbL7_SDJ0IdmGitt&libraries=places&callback=initMap:100(anonymous function) @ js?key=AIzaSyACxoGc4hbs9eZzOiXsbL7_SDJ0IdmGitt&libraries=places&callback=initMap:47(anonymous function) @ js?key=AIzaSyACxoGc4hbs9eZzOiXsbL7_SDJ0IdmGitt&libraries=places&callback=initMap:100jc @ js?key=AIzaSyACxoGc4hbs9eZzOiXsbL7_SDJ0IdmGitt&libraries=places&callback=initMap:49gc.Qc @ js?key=AIzaSyACxoGc4hbs9eZzOiXsbL7_SDJ0IdmGitt&libraries=places&callback=initMap:100(anonymous function) @ util.js:1

Any ideas how I might get this to work? Thanks!