0.0.4 • Published 4 years ago

ngu-mx-table v0.0.4

Weekly downloads
8
License
MIT
Repository
github
Last release
4 years ago

Installation

install library from npm

npm i ngu-mx-table

How to use

  1. Import the 'NguMatrixTableModule' in the app.module.ts
import { NguMatrixTableModule } from 'ngu-mx-table';
  1. Add to NgModule import section
@NgModule({
	declarations: [],
	imports: [NguMatrixTableModule],
	providers: [],
	bootstrap: []
})
export class AppModule { }
  1. Use the ngu-mx-table in the html or templat where ever required.
 <ngu-mx-table>
    <ngu-mx-th [headers]="headers"></ngu-mx-th>
    <ngu-mx-tr [data]="dataList" *ngFor="let row of dataList">
      <ngu-mx-td *ngFor="let data of row.values">
       // your component goes here
      </ngu-mx-td>
    </ngu-mx-tr>
  </ngu-mx-table>

Components and attributes

CompoenetAttributesComments
ngu-mx-tableIts the table contains the child components
ngu-mx-thheadersIts the table header component and pass array od string which will the table header labels
ngu-mx-trdataIts the table row like traditional tr of the table
ngu-mx-tdIts the table data and in the body we can set any html component and render