visionmedia/jade — Issue #387: Problem generating HTML table
Author: PaquitoSoft
Created: 2011-10-28 08:46:30+00:00
State: open

I'm starting with node expressjs framework and I came across this problem I can't solve.

I'm trying to display a table with some blog posts (yes, a blog...) but I don't get it done.

This is the Jade template code:

div
table
thead
tr: th Posts
tbody
each post, i in userPosts
tr(class=(i % 2 == 0) ? 'odd' : 'even'): a(href='/admin/post/' + post.id) #{post.author} - #{post.title}

And this is the HTML output:

Post 1
Post 2
Post 3

Posts

So, any ideas?

Thanks a lot!