After creating a div in my HTML file and referencing it in my TS file using document.getElementByID, I utilized its inner HTML as the content for an infowindow. However, despite my efforts, I am unable to get clicks working. Adding event listeners to any element within that div has proven to be unsuccessful.
I have attempted using (click)="functionName()" and even tried saving the document.getElementByID in a variable and adding an event listener.
HTML snippet:
<div id="newpininfo" class="newpininfo">
<ion-item detail-push>
Save Spot
<ion-icon color="white" name="ios-add-outline" item-left></ion-icon>
</ion-item>
</div>
TS snippet:
var testelement = document.getElementByID('newpininfo');
testelement.addEventListener('click', function() =>{
//do something
});