1.1.2 • Published 10 months ago

@ng-aks/table v1.1.2

Weekly downloads
-
License
-
Repository
-
Last release
10 months ago

Angular Reusable Table

This library was generated with Angular CLI version 16.2.0.

How to use reusable table in our project

Run npm i @ng-aks/table to install this library in your project. After install add module in app.module file.

import { NgAksTableLibModule } from '@ng-aks/table';

@NgModule({
  imports: [
    NgAksTableLibModule
  ],
}) 

now you have to add html part like this

<ng-aks-table [tableConfig]="tableConfig"></ng-aks-table>

After add html part, add tableConfig in your .ts file like this.

export class AppComponent {
  title = 'example';
  tableConfig = DUMMY_DATA_TABLE_CONFIG;
}
export const DUMMY_DATA_TABLE_CONFIG = {
  title: 'Reusable Table',
  tableHeaders: [
      {
          label:'Name',
          value:'name'
      },
      {
          label:'City',
          value:'city'
      },
      {
          label:'Country',
          value:'country'
      }
  ],
  tableData: [
      {
          name: 'Ankit',
          city: 'Delhi',
          country: 'India'
      },
      {
          name: 'Manish',
          city: 'Gurgaon',
          country: 'India'
      },
      {
          name: 'Rahul',
          city: 'Bangalore',
          country: 'India'
      }
  ]
}

the above data, you can use your api data or constant data as per your requirement. Please make sure, you are using correct data format.

Further help

To get more help on the this , please contact to Ankit Kumar Sharma

Thanks

1.1.2

10 months ago

1.1.1

10 months ago

1.0.1

10 months ago