I'm new in AngularJS world
My question is about integration AngularJS and Google Maps API.
For example, in common JavaScript approach(as per Google Docs Specification) we just need to add init function like
function initMap() {
var mapDiv = document.getElementById('map');
var map = new google.maps.Map(mapDiv, {
center: {lat: 44.540, lng: -78.546},
zoom: 8
});
}
And then pass our defined global function as a callback parameter to async script:
<script src="https://maps.googleapis.com/maps/api/js?callback=initMap"
async defer></script>
In AngularJS 2 we have components so my question is: Do we have ability to define initMap() function in component and then pass it like callback function?