0
Нокаут не находит мой шаблон:Нокаут не находит мой шаблон
Uncaught Error: Cannot find template with ID response
Что я не так? Я правильно определил шаблон.
VIEW
<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>
ViewModel
return function()
{
var currentChildTemplate = ko.observable(response);
var selectedListItem = ko.observable();
return {
currentChildTemplate: currentChildTemplate
};
}
Вы заметили свою ошибку в типографии –