I use Knockout.js as a data binding framework and a plugin that allows the {{expr}} syntax in my views. So far, so good. But I would also like to use this syntax in HTML attributes. Any ideas how I can do this?
Work
<textarea>{{input}}</textarea>
<input type="text" data-bind="attr:{'value': input}" />
<input type="text" data-bind="value: input" />
Does not work
<input type="text" value="{{input}}" />
A working demo can be found here: http://jsfiddle.net/dC3Ge/1/
thank
source
share