Home

Awesome

ng2-table npm version

Simple table extension with sorting, filtering, paging... for Angular2 apps

Follow me twitter to be notified about new releases.

Angular 2 Style Guide Build Status Code Climate Join the chat at https://gitter.im/valor-software/ng2-bootstrap Dependency Status devDependency Status Throughput Graph

Usage & Demo

http://valor-software.github.io/ng2-table/


Installation

  1. A recommended way to install ng2-table is through npm package manager using the following command:
npm i ng2-table --save

Alternatively, you can download it in a ZIP file.

  1. More information regarding using of ng2-table is located in demo and demo sources.

Documentation

Inputs (Properties)

Outputs (Events)

Filter

The responsibility of the filtering issue falls on user. You should choose on which columns the filter would be applied. You could add any number of different filters. Filter string - it's a string for matching values in raw data. Column name refers to the property name in raw data. The rest logic you could organize by yourself (the order of filters, data formats, etc). Even you could use filter for list of data columns.

Sorting

Data sorting could be in 3 modes: asc, desc and without sorting data (as it comes from backend or somewhere else). If you want to switch off the sorting for some of the columns then you should set it forcibly in columns config (set property sort to false value for each column you want)

Paging

Pagination could be used from ng2-bootstrap - pagination component. When the page is changed, the pagination component will emit event change-table with an object {page, itemsPerPage}. Then you can easily subscribe on it and request corresponding raw data.

Troubleshooting

Please follow this guidelines when reporting bugs and feature requests:

  1. Use GitHub Issues board to report bugs and feature requests (not our email address)
  2. Please always write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.

Thanks for understanding!

License

The MIT License (see the LICENSE file for the full text)