Google map is integrated the javascript way and I want to call a angular2 function inside an infowindow like the following code. Take a look at infoContent
for the
I'm search a lot and found the answer:
You must use: $compile(htmlString)(scope)
In your example try this:
var infoContent = '';
var scope = angular.element(document.getElementById('anyElementId')).scope();
var compiled = $compile(htmlElement)(scope);
And then use:
infowindow.setContent(compiled[0]);
Wala!