【发布时间】:2013-02-15 05:47:59
【问题描述】:
更多的是“出于好奇的问题”,在创建 kendoUI 外部(脚本)模板时,他们说要使用这种语法:
<script type="text/x-kendo-template" id="templateNameHere">
<p>html here</p>
#= whatever #
</script>
我不喜欢这种 type 的一个原因是 html / etc 显示为全黑(在 Visual Studio 中)。
我注意到,如果我将其更改为更典型的:type="text/html",HTML 是丰富多彩的,至少能够显示 html 结构错误,缺少逗号/quotes,等等等等。所有常见的东西。
<script type="text/html" id="templateNameHere">
// now HTML has its usual colors, validation, etc
Example of it working with type="text/html"
剑道模板在以这种格式使用时仍然有效,有谁知道保持这种格式是否可以?在网上找不到任何其他说明!
【问题讨论】:
标签: javascript jquery kendo-ui templating