如何将bootstrap表集成到Angular 2中?

时间:2017-01-15 09:58:49

标签: angular bootstrap-table

我想整合这个 bootstrap table example成为一个组件。即使我将源文件附加到index.html,它也不起作用,如果表格插入索引中的根组件下面,则表格可以正常工作。我找到了类似的question,但它没有解决,谈话在这个问题中以某种方式结束了吗?非常感谢您使用此表代码进行集成,mytable



<table data-toggle="table"
       data-url="/gh/get/response.json/wenzhixin/bootstrap-table/tree/master/docs/data/data1/"
       data-click-to-select="true">
    <thead>
    <tr>
        <th data-field="state" data-checkbox="true"></th>
        <th data-field="name">Name</th>
        <th data-field="stargazers_count">Stars</th>
        <th data-field="forks_count">Forks</th>
        <th data-field="description">Description</th>
    </tr>
    </thead>
</table>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

&#13;
&#13;
<table data-toggle="table"
       data-url="/gh/get/response.json/wenzhixin/bootstrap-table/tree/master/docs/data/data1/"
       data-click-to-select="true">
    <thead>
    <tr>
        <th data-field="state" data-checkbox="true"></th>
        <th data-field="name">Name</th>
        <th data-field="stargazers_count">Stars</th>
        <th data-field="forks_count">Forks</th>
        <th data-field="description">Description</th>
    </tr>
    </thead>
</table>
&#13;
&#13;
&#13;