0

淘汰赛没有找到我的模板:

Uncaught Error: Cannot find template with ID response 

我错了什么?我已经正确定义了模板。

看法

<script id="map" type="text/html">
    <div style="position:absolute;top:200px;background-color: green;width:100px;height:200px;" data-bind="text: streetName"></div>    
</script>

<script id="reponse" type="text/html">
    <div style="position:absolute;top:200px;background-color: red;width:100px;height:200px;" data-bind="text: alarmNumber">3333</div>
</script>

<div data-bind="template: { name: currentChildTemplate(), data: selectedListItem() }"></div>

视图模型

return function()
{
  var currentChildTemplate = ko.observable(response);
  var selectedListItem = ko.observable();

   return {
            currentChildTemplate: currentChildTemplate          
        };
}
4

1 回答 1

2

你有错字:

错误中的响应

在 html 中回复

于 2013-07-18T14:54:30.263 回答