ng-smart-datatable
v1.2.2
Published
Simple Angular table components with sorting, filtering, exporting...
Downloads
22
Maintainers
Readme
ng-smart-table
Simple table extension with sorting, filtering, exporting ... for Angular apps.
Getting started
Dependencies
Smart datatable is an library for Angular. View the quick start guide for more information. Smart datatable requires no special plugins and can run on Angular.
Quick start
- A recommended way to install ng-smart-datatable is through npm package manager using the following command:
npm i ng-smart-datatable --save
Usage
- Import NgSmartDatatableModule in your module
import { NgSmartDatatableModule } from 'ng-smart-datatable';
@NgModule({
declarations: [
...
],
imports: [
...
NgSmartDatatableModule
],
})
export class YourModule { }
- Use ng-smart-datatable in your component
<ng-smart-datatable [data]="data" [model]="model">
</ng-smart-datatable>
- Example: Initialize data
data = [
{
Name: 'Airi',
Surname: 'Satou',
Position: 'Accountant',
Office: 'Tokyo',
Age: '33'
},
{
Name: 'Angelica',
Surname: 'Ramos',
Position: 'Chief Executive Officer (CEO)',
Office: 'London',
Age: '47'
},
{
Name: 'Ashton',
Surname: 'Cox',
Position: 'Junior Technical Author',
Office: 'San Francisco',
Age: '66'
},
{
Name: 'Bradley',
Surname: 'Greer',
Position: 'Software Engineer',
Office: 'London',
Age: '41'
},
{
Name: 'Brenden',
Surname: 'Wagner',
Position: 'Software Engineer',
Office: 'San Francisco',
Age: '28'
}
];
and model
model: SmartModel = {
properties: [
{
title: 'NAME',
key: 'Name',
width: '300px'
},
{
title: 'SURNAME',
key: 'Surname',
width: '30%'
},
{
title: 'POSITION',
key: 'Position',
width: '30%'
}
]
};
Configure Just the Docs
About the project
Smart Datatable is © 2020 by Ahmet ICAT.
License
Smart Datatable is distributed by an MIT license.
Contributing
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. Read more about becoming a contributor in our GitHub repo.