2016-05-14 54 views
-2

可有人告诉我使用引导和AngularJS与引导+ AngularJS - 如何排序/搜索/编辑/分页表列

  • 排序
  • 搜索
  • 编辑,创建表列的一个例子
  • 分页
+0

检查这个例子它将给你的CRUD(ANGULARJS + BOOTSTRAP + PHP)HTTPS的充分理解://www.codeofaninja。 com/2015/12/angularjs-crud-example-php.html –

+1

只需在Google中输入“angular bootstrap”,就可以为您提供这样的例子,第一行显示AngularUI,这是......好吧,主要是Angular + Bootstrap 。 –

回答

0

您可以使用下面的代码(而不是JSON数据,你可以简单地把你的数据直接在表):

<table id="resultTable" 
    data-toggle="table" 
    data-url="json.php" 
    data-show-refresh="true" 
    data-show-toggle="true" 
    data-show-columns="true" 
    data-search="true" 
    data-select-item-name="toolbar1" 
    data-pagination="true"> 
    <thead> 
    <tr> 
     <th data-field="id" data-align="right" data-sortable="true">Item ID</th> 
     <th data-field="column1" data-sortable="true">Column1</th> 
    </tr> 
    </thead> 
</table> 

所以你看看什么是data-search="true"(搜索)和data-pagination="true"(分页)以及data-sortable="true"(排序)。

对于编辑我认为你需要使用额外的插件,像这样的:https://mindmup.github.io/editable-table/