Due to requirement i have created the custom infobox and able to displayed when pushpin is clicked. But I need to add event in custom infobox. I have added the button and other controls but the click event/events are not working/fired . below is sample source code
infoboxTemplate = '<div><div class="title">{title}</div><button (click)="btnclick()" type="button">test</button></div>';
var pin = new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location(this.locLat, this.locLong), {
icon: this.iconUrl,
anchor: new Microsoft.Maps.Point(25, 25), text: this.icount.toString()
});
pin.metadata = {
title: this.PCPname,
description: this.PCPname,
PCPaddr: this.PCPname,
htmldiv: this.infoboxTemplate
};
this.infobox = new Microsoft.Maps.Infobox(
this.map.getCenter(),
{ htmlContent: this.infoboxTemplate, visible: false }
);
this.infobox.setMap(this.map);
Microsoft.Maps.Events.addHandler(pin, 'click', this.pushpinClicked.bind(this));
this.map.entities.push(pin);