bootstrap-table 未填充在 angular 视图中
bootstrap-table does not populate inside angular view
在主页上放置 bootstrap-table 1 似乎可行,但一旦将其放置到视图中,就没有任何反应。
这里是重现问题的 plunker:http://plnkr.co/edit/n0J91B?p=preview。
问题:如何修改这个plunker让两个表都显示数据?
<table data-toggle="table"
data-url="/gh/get/response.json/wenzhixin/bootstrap-table/tree/master/docs/data/data1/">
<thead>
<tr>
<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>
在 plunker 中应该有两个表,但只显示顶部的一个,底部的只有 header 显示:
1 http://bootstrap-table.wenzhixin.net.cn/examples/
这里是 plunker URL:
现在一切正常,两个表都显示数据
http://plnkr.co/edit/n0J91B?p=preview
.state('about', {
url: '/about',
views: {
'': { templateUrl: 'partial-about.html' },
'columnOne@about': { template: 'Look I am a column!' },
'columnTwo@about': {
templateUrl: 'table-data.html',
controller: 'scotchController'
}
}
});
与组件作者和开发人员取得联系:
https://github.com/wenzhixin/bootstrap-table/issues/650
这导致以下解决方案(请参阅上面 link 中的详细信息):
// HOME STATES AND NESTED VIEWS ========================================
.state('home', {
url: '/home',
templateUrl: 'partial-home.html',
controller: function($scope) {
$(function () {
$('[data-toggle="table"]').bootstrapTable();
});
}
})
在主页上放置 bootstrap-table 1 似乎可行,但一旦将其放置到视图中,就没有任何反应。
这里是重现问题的 plunker:http://plnkr.co/edit/n0J91B?p=preview。 问题:如何修改这个plunker让两个表都显示数据?
<table data-toggle="table"
data-url="/gh/get/response.json/wenzhixin/bootstrap-table/tree/master/docs/data/data1/">
<thead>
<tr>
<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>
在 plunker 中应该有两个表,但只显示顶部的一个,底部的只有 header 显示:
这里是 plunker URL: 现在一切正常,两个表都显示数据 http://plnkr.co/edit/n0J91B?p=preview
.state('about', {
url: '/about',
views: {
'': { templateUrl: 'partial-about.html' },
'columnOne@about': { template: 'Look I am a column!' },
'columnTwo@about': {
templateUrl: 'table-data.html',
controller: 'scotchController'
}
}
});
与组件作者和开发人员取得联系: https://github.com/wenzhixin/bootstrap-table/issues/650
这导致以下解决方案(请参阅上面 link 中的详细信息):
// HOME STATES AND NESTED VIEWS ========================================
.state('home', {
url: '/home',
templateUrl: 'partial-home.html',
controller: function($scope) {
$(function () {
$('[data-toggle="table"]').bootstrapTable();
});
}
})