jQuery Templates have been deprecated for some time now.
I have some data in the form of a JavaScript object that I want to format as HTML and append to the DOM. What's the best way of doing that these days?
- Should I build up an HTML string?
- Should I create elements via jQuery such as
$('<li>',{id:'my-'+Id}).append($('<span>').text(myText))
? - Is there a replacement or mature substitute for jQuery templates?