How to redirect to another page when infoClick


#1

Hi There,

How to redirect to another page when marker infoClick event fires up?

My marker looks like this:
map.addMarker({ 'position': latLngMarker, 'icon': 'www/img/fillingstation.png', 'title': name, 'snippet': vicinity, 'disableAutoPan': true, 'animation': plugin.google.maps.Animation.BOUNCE, 'markerClick': function (marker) { map.setClickable(true); marker.showInfoWindow(); }, 'infoClick': function (marker) { // marker.remove(); $location.path('/app/popUp'); map.setClickable(false); } });

Redirecting by location.path dosent work, and the code above is in .factory …