【问题标题】:jQuery tmpl call another template from templatejQuery tmpl 从模板调用另一个模板
【发布时间】:2013-06-28 06:43:46
【问题描述】:

我正在使用带有 jQ​​uery tmpl 的 Knockout。

如果我这样称呼它,如何在模板“过滤器字符串”中传递一些数据:

{{tmpl() '#filter-string'}}

我的模板是这样的:

<script type="text/html" id="filter-string">
   <input type="text" data-bind="value: $data" />
</script>

如何在模板渲染后在文本框上应用 jquery 日期选择器?

【问题讨论】:

    标签: jquery knockout.js jquery-templates


    【解决方案1】:

    来自knockout.js tutorial,以下是您在进行绑定时将数据传递到模板的方式:

    <div data-bind="template: { name: 'person-template', data: buyer }"></div>
    

    如果这不是您想要的,请提供更多代码

    【讨论】:

      猜你喜欢
      • 2012-07-05
      • 2014-02-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-14
      • 1970-01-01
      • 2011-08-18
      • 2011-05-28
      相关资源
      最近更新 更多