【发布时间】:2017-06-26 14:17:26
【问题描述】:
我正在尝试使用敲除模板来填充我的 google 地图标记信息窗口,其中包含一个点击事件,以在模式中显示 wiki 文章。现在,我的标记是空白的,我没有收到任何错误。关于我做错了什么有什么想法吗?
html sn-p
<script type="text/html" id="info-template">
<div data-bind="with: currentLocation">
<div id="m-title" data-bind="text: title"></div>
</div>
<button id="wiki-a" data-bind="click: toggleWiki">
Wikipedia Articles
</button>
<div id="pano"></div>
</script>
js sn-p
infowindow.setContent('<div id="info-window" data-bind="template:' +
'{ name: \'info-template\'}"></div>');
【问题讨论】:
标签: javascript templates google-maps-api-3 knockout.js