All Projects → janholinka → bs-table

janholinka / bs-table

Licence: MIT license
BsTable is an AngularJS directive that adds tfoot tag with pagination and page size selection to your table and watches changes on your collection in ng-repeat attribute.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to bs-table

schema.tl
📜 Easy-to-use TL-Schema viewer
Stars: ✭ 55 (+30.95%)
Mutual labels:  angularjs
spring-boot-security-oauth2-google
Microservice using OAuth 2.0 and OpenID Connect to authenticate into Google and get information to a user.
Stars: ✭ 75 (+78.57%)
Mutual labels:  angularjs
ovh-manager-web
OVH Control Panel Web UI — Official Repository
Stars: ✭ 61 (+45.24%)
Mutual labels:  angularjs
hanami-pagination
No description or website provided.
Stars: ✭ 14 (-66.67%)
Mutual labels:  pagination
fast-relay-pagination
Improve relay pagination performance with find and limit
Stars: ✭ 18 (-57.14%)
Mutual labels:  pagination
ag-grid
The best JavaScript Data Table for building Enterprise Applications. Supports React / Angular / Vue / Plain JavaScript.
Stars: ✭ 8,743 (+20716.67%)
Mutual labels:  pagination
react-example-paginated-list-infinite-scroll
Follow a React tutorial series with three parts to build a powerful component in React.
Stars: ✭ 43 (+2.38%)
Mutual labels:  pagination
encore-ui
UI Framework for Encore
Stars: ✭ 49 (+16.67%)
Mutual labels:  angularjs
materialdrive
Google Drive with Angular Material
Stars: ✭ 43 (+2.38%)
Mutual labels:  angularjs
Mobile.UP
Mobile.UP
Stars: ✭ 13 (-69.05%)
Mutual labels:  angularjs
react-native-paginated-listview
A simple paginated react-native ListView with a few customization options
Stars: ✭ 14 (-66.67%)
Mutual labels:  pagination
angulareact
A way to seamlessly integrate React and AngularJS
Stars: ✭ 17 (-59.52%)
Mutual labels:  angularjs
laravel-auto
Laravel Auto - a helper package to make automated lists with filters, sorting and paging like no other
Stars: ✭ 41 (-2.38%)
Mutual labels:  pagination
angular-8-boilerplate
Angular 8 Boilerplate with bootstrap
Stars: ✭ 23 (-45.24%)
Mutual labels:  angularjs
awesome-interface
AngularJS SPA interface for awesome lists. Awesome lists parsed using python.
Stars: ✭ 25 (-40.48%)
Mutual labels:  angularjs
manager
OVHcloud Control Panel
Stars: ✭ 153 (+264.29%)
Mutual labels:  angularjs
frontend-test
Teste para Frontend na DevPartner
Stars: ✭ 18 (-57.14%)
Mutual labels:  angularjs
angularjs-php-mysql-crud
ANGULARJS PHP MySQL CRUD With Pagination
Stars: ✭ 14 (-66.67%)
Mutual labels:  angularjs
goodmodule
JavaScript tips (ES6, CSS, Benchmarks, React, Redux, ...)
Stars: ✭ 31 (-26.19%)
Mutual labels:  angularjs
rails cursor pagination
Add cursor pagination to your ActiveRecord backed application
Stars: ✭ 21 (-50%)
Mutual labels:  pagination

bs-table

BsTable is an AngularJS directive which adds tfoot tag with pagination and page size selection to your table and watches changes on your collection in ng-repeat attribute.

working sample

You can find working sample here: http://janholinka.github.io/bs-table

how to use

  1. Include necessary source files
// add bootstrap theme from http://bootswatch.com
<link type="text/css" href="https://github.com/bootstrap/bootstrap.min.css" rel="stylesheet" />
// include latest jquery.min.js
<script type="text/javascript" src="https://github.com/js/jquery.min.js"></script>
// include bs-table.min.js
<script type="text/javascript" src="https://github.com/js/bs-table.min.js"></script>
  1. Import module to your application
angular.module("BsTableApplication", ["bsTable"]);
  1. Add this html code to your template
<table class="table table-hover table-bordered" bs-table>
    <thead>
        <tr>
            <th ng-click="predicate='FirstName'; reverse=!reverse">First name</th>
            <th ng-click="predicate='LastName'; reverse=!reverse">Last name</th>
            <th>Actions</th>
        </tr>
    </thead>
    <tbody> // you can use ng-repeat in tbody as below in tr html tag
        <tr ng-repeat="contact in contactList | orderBy:predicate:reverse">
            <td>{{contact.FirstName}}</td>
            <td>{{contact.LastName}}</td>
            <td class="action-column">
                <button type="button" class="btn btn-info btn-sm" ng-click="Edit(contact)">Edit</button>
            </td>
        </tr>
    </tbody>
</table>

READ ME: It is possible to use ng-repeat attribute in tr or tbody tag.

  1. Add this js code to your controller
// model for bs-table
$scope.contactList = [];

// get contact list
$scope.contactList = SomeService.GetAll();
  1. Additional css code (not necessary)
.table th:hover{
    text-decoration: underline;
    cursor: pointer;
}
.table .action-column{
    width: 230px;
}
.table .action-column:hover{
    text-decoration: none;
    cursor: default;
}
.table tfoot .pagination{
    float: right;
    margin: 0;
}
.table tfoot .pagination li{
    cursor: pointer;
}
.table tfoot select{
    width: 90px;
    float: right;
    margin-right: 8px;
}

license

BsTable is licensed under the MIT license. (http://opensource.org/licenses/MIT)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].