user1162084
user1162084

Reputation: 462

yeoman including google map api

I am using yeoman to build an angular js application. For this I am using google map api like this<script src="http://maps.google.com/maps/api/js?sensor=false&libraries=weather" type="text/javascript"></script>

But after build the project using "grunt build" the file is not included in the html in the dist folder.

Can anyone suggest me how to include this file?

Thanks in advance.

Nabaraj

Upvotes: 1

Views: 591

Answers (1)

Preview
Preview

Reputation: 35836

You have to put your Google Map <script> tag outside of the commentaries which looks like

<!-- build:js(.) scripts/vendor.js -->

The fact is that all the scripts contained inside are concatenated and minified after a build, breaking the Google Maps API since it's a CDN.

Upvotes: 3

Related Questions