HTML Entities with Knockout

后端 未结 1 846
时光取名叫无心
时光取名叫无心 2020-12-18 21:46

How can I output HTML Entities in fields that are bound to a variable in the viewModel? I would like to display an HTML Entity like ← () in a fie

相关标签:
1条回答
  • 2020-12-18 22:28

    You can use the html binding for something like this one. It would look like:

    <p>Knockout: <span data-bind='html: field.value'></span></p>
    

    Sample: http://jsfiddle.net/rniemeyer/KES2j/1/

    0 讨论(0)
提交回复
热议问题