我正在创建一个这样的 KendoUI 模板:
<ul class="nav nav-list flow-list">
<li class="nav-header">Flows in action</li>
<script id="flow-list" type="text/x-kendo-template">
#for (var i = 0; i < data.length; i++ {#
<li>#=data[i]#</li>
#}#
</script>
</ul>
这是我传递数据的方式:
//Get the external template definition using a jQuery selector
var template = kendo.template($("#flow-list").html());
//Create some dummy data
var data = ["Todd", "Steve", "Burke"];
//Execute the template
template(data);
运行上面的代码告诉我一个错误说"Invalid template"
任何指针?