Reputation: 44600
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?
Upvotes: 1
Views: 234
Reputation: 10147
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
Upvotes: 2