我正在使用nodejs和jade以及bootstrap插件Bootstrap table。我很难让它正常工作。
这是用玉做的桌子的一部分
h1 Reported Users
table(data-toggle="table", data-url=reports)
thead
tr
th(data-toggle="matched_uid") Reported User ID
th(data-toggle="reported_name") Reported User Name
th(data-toggle="email") Reported User Email
th(data-toggle="message") Reported Offense(s)
th(data-toggle="reporter_name") Reported By该表的加载方式如下:

当我查看浏览器控制台时,我认为results -url中的数据加载正确:

我的data-url有效吗?有没有人知道可能出了什么问题?请帮帮忙。提前感谢!
发布于 2014-12-06 20:29:42
试试这个;
data-url="reports.json“
<thead>
<tr>
<th data-field="matched_uid">Reported User ID</th>
<th data-field="reported_name">Reported User Name</th>
<th data-field="email">Reported User Email</th>
<th data-field="message">Reported Offense(s)</th>
<th data-field="reporter_name">Reported By</th>
</tr>
</thead>你的json将会是
[
{
"matched_uid": "sample",
"reported_name": "sample",
"email": "sample",
"message": "sample",
"reporter_name":"sample"
},
{
"matched_uid": "sample",
"reported_name": "sample",
"email": "sample",
"message": "sample"
"reporter_name":"sample"
},
{MORE},
{MORE},
{LAST}]
https://stackoverflow.com/questions/27008920
复制相似问题