Button Click on InfoWindows Ionic 2

Hey guys, im trying create a infowindow with a click button event, but when i click -> Uncaught ReferenceError: myFunction is not defined

addInfoWindow(marker){

    let infoWindow = new google.maps.InfoWindow({
      content: '<button onclick="myFunction('+id+')">GO!</button>'
    });

    google.maps.event.addListener(marker, 'click', () => {
      infoWindow.open(this.map, marker);
    });
  }
myFunction(id){
  console.log('clicked at ' + id);
}

If anyone can help me with it, I appreciate.

Tank You

Check out that Project

Thank You, I’ll Try it

i updated the project and added the marker click :wink: