Skip to content
einarhuseby edited this page Jun 16, 2019 · 5 revisions

ngx-easy-table

Use app config or ngx-easy-table

App wide config

import { DefaultTableConfig } from 'app/interfaces/ngx-easy-table.interface';

Vanilla from package

import { DefaultConfig } from 'ngx-easy-table';

Component

import { Columns, Config, STYLE } from 'ngx-easy-table';
import { DefaultTableConfig } from 'app/interfaces/ngx-easy-table.interface';

tableConf: Config;
public columns: Columns[] = [
    { key: 'value', title: 'Value Title' },
];

ngOnInit() {

    this.tableConf = DefaultConfig;
    this.tableConf.tableLayout.style = STYLE.TINY;
    this.tableConf.headerEnabled = false;
}

Template

<ngx-table [configuration]="tableConf" [data]="functions" [columns]="columns">
  <ng-template let-row let-index="index">
      <td>
        ...
      </td>
  </ng-template>
</ngx-table>
<ng-template let-row let-index="index">

Clone this wiki locally