I am trying to open a modal when a button inside of a Mapbox popup is clicked. The HTML is rendering properly but I'm not sure as to why the function is not being executed.
let marker = new mapboxgl.Marker(el);
try {
marker.setLngLat([eventInfo.location[0], eventInfo.location[1]])
.setPopup(new mapboxgl.Popup({offset: 32})
.setHTML('<ion-button (click)="logger()">View Full</ion-button>'))
.addTo(this.map);
} catch (e) {
console.log(e.message);
}
Above is how I create the marker and attach a popup. logger() is the function that I expect to be executed.
logger(){
console.log('hi');
}