Basically I am coding a blog engine in Nodejs with express4 and jade, and I wish to be able to pass the posts as strings of html to jade, to then loop through them.
I have populated an array with valid strings of html like console.log(items[0]); // prints: <h1>test</h1>
however I cannot get my head around how I would print out the html within a DOM.
So far I have tried to make the array global and do something like
each item in items
item
or simply #{items}
however these methods print out html with < > notation in, and duplicates the data like
<<h1>test</h1>><!--<h1-->test>
I have also tried to pass the html through as a parameter in routes like res.render('index', {items: items});
, however this has exactly the same effect
My guess is that perhaps I am trying to render html outside of the html domain, so it can do it but it obfuscates the data. Any suggestions would be appreciated!!