Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle async loading of google maps API #89

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mebibou
Copy link

@mebibou mebibou commented Apr 4, 2016

It is actually not necessary to directly initialize in the linking function the google maps API services, therefore we could only do it when we actually use them.

This fixes #69

@mebibou mebibou mentioned this pull request Apr 4, 2016
@ghost
Copy link

ghost commented Sep 8, 2016

This returns a console error:

angular.js?v=0123456789&m=6:11706 Error: [$injector:undef] Provider 'googlePlacesApi' must return a value from $get factory method.
http://errors.angularjs.org/1.3.20/$injector/undef?p0=googlePlacesApi
    at angular.js?v=0123456789&m=6:63
    at Object.enforcedReturnValue [as $get] (angular.js?v=0123456789&m=6:4074)
    at Object.invoke (angular.js?v=0123456789&m=6:4219)
    at angular.js?v=0123456789&m=6:4037
    at getService (angular.js?v=0123456789&m=6:4178)
    at Object.invoke (angular.js?v=0123456789&m=6:4210)
    at angular.js?v=0123456789&m=6:6547
    at forEach (angular.js?v=0123456789&m=6:326)
    at Object.<anonymous> (angular.js?v=0123456789&m=6:6545)
    at Object.invoke (angular.js?v=0123456789&m=6:4219)

@mebibou
Copy link
Author

mebibou commented Sep 12, 2016

It would mean that you are calling the directive before having loaded the google places api from google. I guess I am not, which is why I didn't see this error.

This doesn't happen when you still load synchronously right? only when async?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lazy loading google
1 participant