如何在一次调用中使用jquery从外部文件中获取多个剑道ui模板

how to get multiple kendo ui templates from external file using jquery in a single call

本文关键字:获取 文件 从外部 模板 ui jquery 调用 一次      更新时间:2023-10-09

嗨,我有关于外部化剑道模板的问题。我在一个html页面中有多个模板(4到5个模板)。我想在一个调用中加载这些模板,而不是为每个模板调用。我想在jquery代码上实现它。任何一个都可以建议我。

对我来说,剑道的官方方式是:

我实现了templateLoader.js.

在HTML模板文件中,您可以执行以下操作:

<!-- template 1 -->
<script type="text/html" id="editProductPopupTpl">
    <!-- template content -->
</script>
<!-- template 2 -->
<script type="text/html" id="editProductPopupTpl">
    <!-- template content -->
</script>