2016-05-14 65 views
3

inculded角谷歌 - 地方 - 自動完成我的項目中使用使用角谷歌 - 地方 - 自動完成

bower install angular-google-places-autocomplete 

地自動完成顯示在控制檯

Global `google` var missing. Did you forget to include the places API script? 

錯誤的kuhnza以下/在google-places-autocomplete文檔中手動包含以下腳本,在index.html中

<script src="https://maps.googleapis.com/maps/api/js?libraries=places"></script> 

然後每一個工作正常,但當移動到生產應用程序使用grunt build構建然後縮小和uglified文件創建相同的錯誤再次出現。 我認爲手動添加的腳本在構建應用程序時被刪除。 做什麼來解決這個issues.how包括在應用properly.Thanks這個谷歌Places API的提前

回答

0

你需要你的構建之前將你的谷歌API調用腳本:JS中的index.html聲明

相關問題