ng-smart-datatable
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

ng-smart-table

Simple table extension with sorting, filtering, exporting ... for Angular apps.

Get started now


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

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

Usage

  1. Import NgSmartDatatableModule in your module
import { NgSmartDatatableModule } from 'ng-smart-datatable';
@NgModule({
  declarations: [
    ...
  ],
  imports: [
    ...
    NgSmartDatatableModule
  ],
})
export class YourModule { }
  1. Use ng-smart-datatable in your component
<ng-smart-datatable [data]="data" [model]="model">
</ng-smart-datatable>
  1. 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.

Package Sidebar

Install

npm i ng-smart-datatable

Weekly Downloads

0

Version

1.2.2

License

MIT

Unpacked Size

1.2 MB

Total Files

149

Last publish

Collaborators

  • ahmeticat