The problem is that to click on the name of infoWindow redirection does not work with ui- sref or ng-click inside marker.content
index.html
<div ng-controller="MapCtrl">
<div id="mapPage" class="mapPageStyle left" >
<div id="mapPageContent" style="height:100%;background:#fff;">
<div id="mapContainer" ng-repeat="marker in markers">
</div>
</div>
</div>
</div>
controller_map.js (MapCtrl)
function createMarker(info) {
var marker = new google.maps.Marker({
map: $scope.map,
position: new google.maps.LatLng(info.lat, info.long),
title: info.name,
icon: info.markerImage
});
var myClass = [];
marker.content = '<div id="hook" class="hook" >' +
'<div class="nameInfoWindow" ui-sref="page_center/comercio({IdBusiness: info.id })">' + info.name + '</div>' +
'<div style="text-align: center;">' +
'<div class="ec-stars-wrapper">' +
'</div>' +
'</div>' +
'</div>';
google.maps.event.addListener($scope.map, 'click', function () {
infoWindow.close();
});
google.maps.event.addListener(marker, 'click', function () {
infoWindow.setContent(marker.content);
infoWindow.open($scope.map, marker);
});
$scope.markers.push(marker);
}