我正在使用
Angular-google-map库来显示带有这样的窗口的标记:
<google-map center="map.center" zoom="map.zoom" draggable="true" bounds="" options ="{styles:map.options}" > <marker ng-repeat="hotel in hotelsFiltered" idKey="hotel.id" coords="{latitude:hotel.latitude,longitude:hotel.longitude}" hoteldata="hotel" icon="icon"> </marker> <window ng-repeat="hotel in hotelsFiltered" coords="{latitude:hotel.latitude,longitude:hotel.longitude}" templateUrl="hotel.templateUrl" templateParameter="{title:'myTitle'}" show="hotel.show" > </window> </google-map>
所以在window指令中我提供了templateUrl,并且标记成功显示了信息窗口,但问题是我在templateParameter中提供的参数似乎无法在模板视图中访问.
这是我的infoWindow的模板视图以及我如何尝试从window指令访问传递的参数:
<div> {{title}} the title was not showed successfully </div>