Open diegobill opened 8 years ago
using Ionic 1.7.12
i think it is just because ion-google-place call the google API before it is loaded.
How can I fix this?
well with the way you did it i don't know, but i used Angular google map where there a callback to know it the google map plugin is loaded (http://angular-ui.github.io/angular-google-maps/#!/api/GoogleMapApi). Then it up to you to fix your code using the link above.
I just follow the Installation on README:
<script src="http://maps.googleapis.com/maps/api/js?libraries=places&sensor=false"></script>
and ion-google-place as a dependency on your Ionic appDo I need to use another dependency like angular-google-maps ??
Now is working:
just add ion-google-place on index.html:
<script src="lib/ion-google-place/ion-google-place.js"></script>
<link href="lib/ion-google-place/ion-google-place.css">
This could be included on README
I agree with degobill. This should be included in the README. It helped solve my problem as well. @diegobill @israelidanny
I agree too!
Installation not working:
https://docs.angularjs.org/error/$injector/modulerr?p0=pay4that&p1=Error:%20%5B$injector:modulerr%5D%20http:%2F%2Ferrors.angularjs.org%2F1.4.3%2F$injector%2Fmodulerr%3Fp0%3Dion-google-place%26p1%3DError%253A%2520%255B%2524injector%253Anomod%255D%2520http%253A%252F%252Ferrors.angularjs.org%252F1.4.3%252F%2524injector%252Fnomod%253Fp0%253Dion-google-place%250A%2520%2520%2520%2520at%2520Error%2520(native)%250A%2520%2520%2520%2520at%2520http%253A%252F%252Flocalhost%253A8100%252Flib%252Fionic%252Frelease%252Fjs%252Fionic.bundle.min.js%253A40%253A416%250A%2520%2520%2520%2520at%2520http%253A%252F%252Flocalhost%253A8100%252Flib%252Fionic%252Frelease%252Fjs%252Fionic.bundle.min.js%253A58%253A66%250A%2520%2520%2520%2520at%2520a%2520(http%253A%252F%252Flocalhost%253A8100%252Flib%252Fionic%252Frelease%252Fjs%252Fionic.bundle.min.js%253A57%253A109)%250A%2520%2520%2520%2520at%2520http%253A%252F%252Flocalhost%253A8100%252Flib%252Fionic%252Frelease%252Fjs%252Fionic.bundle.min.js%253A57%253A352%250A%2520%2520%2520%2520at%2520http%253A%252F%252Flocalhost%253A8100%252Flib%252Fionic%252Frelease%252Fjs%252Fionic.bundle.min.js%253A71%253A381%250A%2520%2520%2520%2520at%2520m%2520(http%253A%252F%252Flocalhost%253A8100%252Flib%252Fionic%252Frelease%252Fjs%252Fionic.bundle.min.js%253A41%253A322)%250A%2520%2520%2520%2520at%2520g%2520(http%253A%252F%252Flocalhost%253A8100%252Flib%252Fionic%252Frelease%252Fjs%252Fionic.bundle.min.js%253A71%253A229)%250A%2520%2520%2520%2520at%2520http%253A%252F%252Flocalhost%253A8100%252Flib%252Fionic%252Frelease%252Fjs%252Fionic.bundle.min.js%253A71%253A398%250A%2520%2520%2520%2520at%2520m%2520(http%253A%252F%252Flocalhost%253A8100%252Flib%252Fionic%252Frelease%252Fjs%252Fionic.bundle.min.js%253A41%253A322)%0A%20%20%20%20at%20Error%20(native)%0A%20%20%20%20at%20http:%2F%2Flocalhost:8100%2Flib%2Fionic%2Frelease%2Fjs%2Fionic.bundle.min.js:40:416%0A%20%20%20%20at%20http:%2F%2Flocalhost:8100%2Flib%2Fionic%2Frelease%2Fjs%2Fionic.bundle.min.js:72:154%0A%20%20%20%20at%20m%20(http:%2F%2Flocalhost:8100%2Flib%2Fionic%2Frelease%2Fjs%2Fionic.bundle.min.js:41:322)%0A%20%20%20%20at%20g%20(http:%2F%2Flocalhost:8100%2Flib%2Fionic%2Frelease%2Fjs%2Fionic.bundle.min.js:71:229)%0A%20%20%20%20at%20http:%2F%2Flocalhost:8100%2Flib%2Fionic%2Frelease%2Fjs%2Fionic.bundle.min.js:71:398%0A%20%20%20%20at%20m%20(http:%2F%2Flocalhost:8100%2Flib%2Fionic%2Frelease%2Fjs%2Fionic.bundle.min.js:41:322)%0A%20%20%20%20at%20g%20(http:%2F%2Flocalhost:8100%2Flib%2Fionic%2Frelease%2Fjs%2Fionic.bundle.min.js:71:229)%0A%20%20%20%20at%20eb%20(http:%2F%2Flocalhost:8100%2Flib%2Fionic%2Frelease%2Fjs%2Fionic.bundle.min.js:74:503)%0A%20%20%20%20at%20Ac.d%20(http:%2F%2Flocalhost:8100%2Flib%2Fionic%2Frelease%2Fjs%2Fionic.bundle.min.js:53:339
I added the Google Maps javascript API in my HEAD tag:
`
I added ion-google-place as a dependency on your Ionic app:
angular.module('pay4that', ['ionic', 'pay4that.controllers', 'ionic-material', 'pay4thatServices', 'gettext', 'ngCookies', 'monospaced.qrcode', 'pay4thatInterceptor', 'angularPayments', 'jett.ionic.filter.bar', 'ngCordovaOauth', 'ion-google-place'])