小编Raj*_*bel的帖子

在谷歌地图信息窗口angular2中显示自定义标签

map.component.ts 代码:

......
infoWindow = new google.maps.InfoWindow(
{
    content: `<custom-tag></custom-tag>`    //***not displaying anything***
});
infoWindow.open(map, marker);
......
Run Code Online (Sandbox Code Playgroud)

map.component.html 代码:

<custom-tag></custom-tag>      <!--***displays hi***-->
<div class="google-maps"></div>
Run Code Online (Sandbox Code Playgroud)

custom-tag.component.html 代码:

<h2>hi</h2>
Run Code Online (Sandbox Code Playgroud)

module.ts、routing.ts 文件肯定没有错误。信息窗口只是打开并没有显示任何内容,请帮助我弄清楚为什么信息窗口没有显示任何内容。

google-maps angular

4
推荐指数
1
解决办法
1668
查看次数

标签 统计

angular ×1

google-maps ×1