Javascript 如何更改信息窗口内不同标记的内容?
我正在使用AGM(angular google maps)库处理angular。我不知道如何让每个标记的信息窗口内容不同。我希望每个标记都有自己的信息弹出。 这是我的component.html:Javascript 如何更改信息窗口内不同标记的内容?,javascript,angular,google-maps,angular-google-maps,agm,Javascript,Angular,Google Maps,Angular Google Maps,Agm,我正在使用AGM(angular google maps)库处理angular。我不知道如何让每个标记的信息窗口内容不同。我希望每个标记都有自己的信息弹出。 这是我的component.html: <div class ="content"> <h2>Popular Locations around InComm</h2> <agm-map> [latitude]="latitude" [longitude]="longit
<div class ="content">
<h2>Popular Locations around InComm</h2>
<agm-map>
[latitude]="latitude"
[longitude]="longitude"
[zoom]="zoom" >
<agm-marker *ngFor="let location of locations"
[latitude]= "location.latitude"
[longitude] ="location.longitude"
[label]= "location.label"
(markerClick)="clickedMarker(infowindow)"
>
<agm-info-window #infowindow>
<strong>InfoWindow content</strong>
</agm-info-window>
</agm-marker>
</agm-map>
</div>
任何帮助都会得到帮助,谢谢 用要替换的内容替换信息窗口内容。例如,如果要显示标签,只需添加
{{location.label}}
<agm-info-window #infowindow>
<strong>{{location.label}}</strong>
</agm-info-window>
</agm-marker>
{{location.label}}
用要替换的内容替换信息窗口内容。例如,如果要显示标签,只需添加{{location.label}}
<agm-info-window #infowindow>
<strong>{{location.label}}</strong>
</agm-info-window>
</agm-marker>
{{location.label}}