8

I want to include the Google Maps API in my Angular 6 project, so when I include the given link in the documentation: https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap to my project index.html page (with the generated api key of course), it works pretty good. But I am wondering if there isn't a better place to put that javascript file so that webpack can process it and bundle it with the vendors file ?

I tried in the angular.json file to put the url in the projects > projectName > architect > build > options > scripts and assets but both raised an error because angular was looking for a local path... Thus not recognizing an http url. Is it possible to include external script files in the angular cli config json file ?

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.