javascript - Special characters in bound knockout data model -
i have data model special characters in (degree signs).. property contains following: "48 ° f". however, when ui updates data, see "°", not degree sign. have tried "°", doesn't work either.
how put special characters in data model , have them appear on ui?
you should use html binding this:
<span data-bind="html: test"></span> var vm = { test: ko.observable("48 ° f") }; ko.applybindings(vm); here working fiddle: http://jsfiddle.net/svu82/
read more in ko documentation: http://knockoutjs.com/documentation/html-binding.html
Comments
Post a Comment