javascript - How to get access to the string when foreach-binding to a list of strings? -


i have template this:

<div data-bind='template: { name: "stringtemplate", foreach: stringcollection() }'> </div> </div>  <script id='stringtemplate' type='text/html'>  // want display string collection here  </script> 

how access string object in template?

in jquery template, can use $data refer overall object being bound.

so, like:

<span data-bind="text: $data"></span> 

or

${ $data } 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -