Ionic Push in map marker event click not working - google map



I tried to navigate to a new page when user click a map marker in Ionic2. Below is my code

addInfoWindow(marker, content){
        let infoWindow = new google.maps.InfoWindow({
            content: content

        google.maps.event.addListener(marker, 'click', function() {
            //, marker);



The problem is that you are in a different context inside that function, and I believe even outside the Angular 2 zone.

(Read this for more: )

But basically, try:

google.maps.event.addListener(marker, 'click', () => {
  //, marker);


Awesome.Yes my bad, Thanks for your help.



Ao basically what You are saying is that its is totally impossible to invoke navigation push from inside inFoWindow. hmm. thats really bad.


so could you find a solution for that problem


Thank you @nanexcool .
This worked for me.


I just tested here using your tip, but I got the following error:
Can not read property ‘push’ of undefined…

And using as in the link talks about the zone.js … also the ionic does not identify the zone within the scope of this.

Can anybody help me?


Hello, when using this command “ … etc” it does not have runtime, but when it is testing, as soon as it enters this error method does not parameter ‘bookmark’ - message
“bookmark is not set”

and soon after the following error: Unable to read ‘undefined’ push property …
Can anybody help me?