I've been facing some challenges with info-windows that display when clicking on custom markers. I managed to get them to show up, but the outcome is not quite right. What happens is, when I click on the first marker, the info box displays its content correctly. However, if I click on any other marker after the first one, the info-window shows up with the previous content instead of the current content. This issue occurs with every marker: the first clicked works fine, but the subsequent ones show the previous content.
Here's my code:
<map data-ng-model="mymap" zoom="4" center="[38.50, -95.00]" style="heigth:375px">
<info-window id="foo">
<div ng-non-bindable="">
<ul>
<li ng-repeat="item in list">{{item.name}}</li>
</ul>
</div>
</info-window>
<marker ng-repeat="item in list"
position="[{{item.coordinates}}]" itemTitle="{{item.name}}"
icon="./images/i.png" on-click="showInfoWindow('bar')" />
<info-window id="bar">
<div class="infowindowtexttitle">{{this.itemTitle}}</div>
</div>
</info-window>