我有一个 AngularJs 作为 javascript 框架的 Asp.net MVC 项目。
我正在为我的表格\网格要求使用智能表格角度插件。一切正常,但寻呼机根本没有出现在页面上。
下面是我的html代码:
<div data-ng-controller="gridcontroller" class="row">
<label>Grid demo</label>
<table data-st-table="griddata" class="table striped">
<thead>
<tr>
<th>first name</th>
<th>last name</th>
<th>birth date</th>
<th>balance</th>
<th>email</th>
</tr>
</thead>
<tbody>
<tr data-ng-repeat="row in griddata">
<td data-ng-bind='row.firstName'></td>
<td data-ng-bind='row.lastName'></td>
<td data-ng-bind='row.birthDate'></td>
<td data-ng-bind='row.balance'></td>
<td data-ng-bind='row.email'></td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="5" class="text-center">
<div st-template="~/Scripts/Angular/Plugins/pagination.html" st-pagination=""
st-items-by-page="10">
</div>
</td>
</tr>
</tfoot>
</table>
Pagination.html 标记如下:
<div class="pagination" ng-if="pages.length >= 2">
<ul class="pagination">
<li ng-if="currentPage > 1">
<a ng-click="selectPage(1)"><<</a>
</li>
<li ng-if="currentPage > 1">
<a ng-click="selectPage(currentPage-1)"><</a>
</li>
<li ng-repeat="page in pages" ng-class="{active: page==currentPage}">
<a ng-click="selectPage(page)">{{page}}</a>
</li>
<li ng-if="currentPage < numPages">
<a ng-click="selectPage(currentPage+1)">></a>
</li>
<li ng-if="currentPage < numPages">
<a ng-click="selectPage(numPages)">>></a>
</li>
</ul>
当我运行该站点时,我会看到包含所有记录的网格(在我的情况下为 60 条),并且寻呼机标记如下所示:
<tfoot>
<tr>
<td colspan="5" class="text-center">
<div st-template="/Scripts/Angular/Plugins/pagination.html" st-pagination="" st-items-by-page="itemsByPage" class="ng-isolate-scope">
<!-- ngIf: pages.length >= 2 -->
</div>
</td>
</tr>
</tfoot>
我做了网站上提到的每一步,但无法使寻呼机工作。任何帮助都深表感谢。