Using knockout.js, how do I include a carriage return in the text that is bound to the text attribute of a paragraph element.
In my ViewModel I g
You can use the html binding.
JS:
function AppViewModel() { this.firstName = "BertTest"; this.lastName = "Bertington"; } // Activates knockout.js ko.applyBindings(new AppViewModel());
View :
First name: todo Last name: todo
First name: todo
Last name: todo
See fiddle