Last active
August 9, 2016 19:20
-
-
Save dsadhanala/fadbb3ac5229b5cd35b2 to your computer and use it in GitHub Desktop.
Jade Snippet: Table iterator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//- compile and see the output online at below URL | |
http://jade-lang.com/ | |
//- table data | |
- var tableData = [['R1 Col1', 'R1 Col2', 'R1 Col3'], ['R2 Col1', 'R2 Col2', 'R2 Col3'], ['R3 Col1', 'R3 Col2', 'R3 Col3'], ['R4 Col1', 'R4 Col2', 'R4 Col3'], ['R5 Col1', 'R5 Col2', 'R5 Col3']] | |
//- table markup | |
table.table | |
//- table head | |
tr.t-head | |
th Name | |
th Phone | |
th Status | |
//- table body rows | |
for rows in tableData | |
tr.t-body | |
for col in rows | |
td.t-col= col |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment