@petkit/ngx-table-descartes

v1.0.4
Angular descartes table component
angular table descartes

ngx-table-descartes

Angular descartes table component

example

Installation

npm install --save @petkit/ngx-table-descartes

Usage

Import Module

import {
  TableDescartesModule,
} from '@petkit/ngx-table-descartes';

@NgModule({
  imports: [
    TableDescartesModule,
  ],
}

Simple

<ngx-table-descartes [data]="data"></ngx-table-descartes>
import { Component, OnInit } from '@angular/core';
// mock data
import Mock from 'mockjs';

@Component({
  selector: 'ngx-table-descartes-simple',
  templateUrl: './table-descartes-simple.component.html',
  styleUrls: ['./table-descartes-simple.component.scss']
})
export class TableDescartesSimpleComponent implements OnInit {
  data: {[key: string]: string}[] = Mock.mock({
    'data|10-20': [{
      'type|1': ['typeA', 'typeB', 'typeC'],
      'size|1': ['big', 'middle', 'small'],
      'name': '@name()',
    }]
  }).data;

  constructor() { }

  ngOnInit() {
  }

}

License

MIT

npm i @petkit/ngx-table-descartes

Metadata

  • MIT
  • Whatever
  • liuxin
  • released 10/17/2018

Downloads

Maintainers