In general, this question is about how to use some dynamic content from the backend inside the module.config function in AngularJS.
In particular, this question relates to the GoogleMapApi provider in angular-google-maps
In my Angular app, the Google Maps API key is stored in the Firebase firewall. What I would like to do is set the API key for GoogleMapApiProvider
.config(function(uiGmapGoogleMapApiProvider) {
uiGmapGoogleMapApiProvider.configure({
key: 'your api key',
});
})
I know that I only have providers and constants available in the configuration function of the Angular module. So I try to think about how to get the required API key from my Firebase firewall using $ firebaseProvider
Any help or direction is most appreciated! Thanks!
source
share