Это часть кода в моем приложении ioni c 3.
google.maps.event.addListener(polygon, 'click', (event)=>{
if (event) {
point = event.latLng;
}
this.fence = fence
this.geoInfowindow.setContent(content +
'<button onclick="this.toEdit()">edit</button>' +
'<button onclick="this.toDelete()">delete</button>' +
'<button onclick="this.toEnable()">enable</button>');
this.geoInfowindow.setPosition(point);
this.geoInfowindow.open(this.map);
});
toEdit(){}
toDelete(){}
toEnable(){}
Когда я нажимаю кнопку, я получаю сообщение об ошибке ниже:
Uncaught TypeError: this.toEnable is not a function at HTMLButtonElement.onclick
Не могли бы вы помогите мне решить эту проблему? Спасибо