1.0.2 • Published 5 years ago

angular-data-table-library v1.0.2

Weekly downloads
19
License
MIT
Repository
github
Last release
5 years ago

Angular DataTable

  • Component for creating data table for array of objects.
  • It is developed using Angular >=7.0.0 and its newly introduced ng g library schematics.
  • Library location: projects/angular-data-table directory of this repository.

Examples/Demo

Live Demo Example

angular-data-table

Installation

npm i angular-data-table-library

API

import { AngularDataTableModule } from 'angular-data-table-library' selector: ang-data-table

@Inputs()

InputTypeRequiredDescription
dataobjectYESarray of objects that need to be shown in the data table .
itemPerPagenumberOptional, default: 12items to be shown on each page.
colorstringOptional, default: Blackset color of table header and button, color list

Usage

  • Register the AngularDataTableModule in module.

    import { AngularDataTableModule } from 'angular-data-table-library';

@NgModule({ declarations: [], imports: AngularDataTableModule, providers: [], bootstrap: [] }) export class AppModule {}

* Use of component via selector 'ang-data-table'.

```typescript

@Component({
 selector: 'angDataTable',
 template: `<ang-data-table [data]='data' [itemPerPage]='dataPerPage' [color]='color'>`,
})
export class AppComponent {

 ngOnInit() {
   let data = {
         [key1: value, key2: value],
         [key1: value, key2: value],
         [key1: value, key2: value]
     } 
   let dataPerPage = 6;
   let color = 'Blue';
 }
}

Test

Run tests

npm test

License

MIT © Vishal Hasnani

Thanks for Installing

Conatct me for any suggestion/issues -> hasnanivishal@gmail.com

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

0.0.0

5 years ago