Pregunta

I am using Knockout with jQuery tmpl.

How can I pass some data inside a template "filter-string" if I call it like that:

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

My template looks like that:

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

How can I apply jquery date picker on textbox after template rendered?

¿Fue útil?

Solución

From the knockout.js tutorial, here's how you pass the data into template when you do your binding:

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

provide more code if that's not what you're after

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top