angular-google-maps API key from backend

五迷三道 提交于 2019-12-11 07:11:56

问题


Generally, this question is about how to use some dynamic content from a backend inside a module.config function in AngularJS.

Specifically, this question is regarding the GoogleMapApi provider in angular-google-maps

In my Angular Application the Google Maps API key is stored in a Firebase backend. What I would like to do is to set the API key for the GoogleMapApiProvider

.config(function(uiGmapGoogleMapApiProvider) {
    uiGmapGoogleMapApiProvider.configure({
    key: 'your api key',
    }); 
})

I know that I only have Providers and Constants available in the Angular module config function. So I struggle to think of a way to get the necessary API key from my Firebase backend using the $firebaseProvider Any help or direction is most appreciated! Thanks!

来源:https://stackoverflow.com/questions/28327778/angular-google-maps-api-key-from-backend

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!