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 &deg; f") };  ko.applybindings(vm); 

here working fiddle: http://jsfiddle.net/svu82/

read more in ko documentation: http://knockoutjs.com/documentation/html-binding.html


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -