omar-ng-reusable-table
v0.0.7
Published
## Installation Process
Downloads
9
Maintainers
Readme
OmarNgReusableTable
Installation Process
npm i omar-ng-reusable-table
Configuration
App module :
imports: [ OmarNgReusableTableModule, ],
----Component Level (ts) :
header: any =
[
{
fieldName: 'Full Name',--this value is header text
datafield: 'name', --this value should be same as json key (Actual Data)
},
{
fieldName: 'Address',
datafield: 'address',
},
];
data: any = [
{
name: 'Md Omar Faruqe',
address: 'Gazipur',
action: { --action is optional ,
isEdit: true,
},
},
{
name: 'Omar',
address: 'UAE',
action: {
isEdit: true,
isDetails: true,
isDelete: true,
},
},
{
name: 'Omar fqrqe',
address: 'Canada',
action: {
isEdit: false,
isDetails: true,
isDelete: true,
},
},
];
----Component Level (html) :
<omar-NgReusableTable [data]="data" [header]="header"
(onDetails)="Details($event)" (onEdit)="Edit($event)" (onDelete)="Delete($event)" ></omar-NgReusableTable>