KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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: <div> <a href="/admin/post/1">Post 1</a> <a href="/admin/post/2">Post 2</a> <a href="/admin/post/3">Post 3</a> <table> <thead> <tr> <th>Posts</th> </tr> </thead> <tbody> <tr class="odd"></tr> <tr class="even"></tr> <tr class="odd"></tr> </tbody> </table> </div> So, any ideas?
Tags (comma-separated)
Save Edits
Cancel