I have a template like this:
<div data-bind='template: { name: "stringTemplate", foreach: stringCollection() }'> </div>
</div>
<script id='stringTemplate' type='text/html'>
// I want to display string from collection here
</script>
How do I get access to the string object in the template?
In a jQuery template, you can use
$datato refer to the overall object being bound.So, you would do something like:
or