Experience-Monks / Experience-Monks/google-maps-api
How to load libraries with Promise example
- Dominant language
- JavaScript
- Stars
- 33
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I have an Aurelia app where I'm using the promise example from your docs to load the google-maps-api. I'm trying to figure out how to load the optional libraries, since there wasn't an example using promises. Here is what I tried
``` javascript
// class decorator:
@inject(mapsapi('AIzaSyDGLuTAy_zb724BrnVNWfbmUwmqC0A7rNo', ['places']))
// constructor
constructor(mapsapi) {
let vm = this;
let maps = mapsapi.then( function(maps) {
vm.maps = maps;
vm.geocoder = new google.maps.Geocoder();
});
}
```
It works, except that it doesn't pull in the places libary. google.maps.places => undefined.
Contributor guide
Assessment
This issue has not been assessed yet.