{"id":19719326,"url":"https://github.com/magic-software-lab/ngx-magic-table","last_synced_at":"2025-04-29T21:30:25.707Z","repository":{"id":71663609,"uuid":"91700684","full_name":"magic-software-lab/ngx-magic-table","owner":"magic-software-lab","description":"Simple, customizable and magic table for Angular 4.x.x","archived":false,"fork":false,"pushed_at":"2020-06-02T18:15:54.000Z","size":2577,"stargazers_count":9,"open_issues_count":60,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-13T00:35:02.543Z","etag":null,"topics":["angular","angular2","angular4","datatable","datatables","library","magic","magic-software","ngx-bootstrap","table"],"latest_commit_sha":null,"homepage":"https://magic-software-lab.github.io/ngx-magic-table/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magic-software-lab.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.MD","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-18T14:04:35.000Z","updated_at":"2025-04-05T11:31:19.000Z","dependencies_parsed_at":"2023-05-13T17:15:13.524Z","dependency_job_id":null,"html_url":"https://github.com/magic-software-lab/ngx-magic-table","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magic-software-lab%2Fngx-magic-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magic-software-lab%2Fngx-magic-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magic-software-lab%2Fngx-magic-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magic-software-lab%2Fngx-magic-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magic-software-lab","download_url":"https://codeload.github.com/magic-software-lab/ngx-magic-table/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251585708,"owners_count":21613267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular2","angular4","datatable","datatables","library","magic","magic-software","ngx-bootstrap","table"],"created_at":"2024-11-11T23:07:45.176Z","updated_at":"2025-04-29T21:30:25.685Z","avatar_url":"https://github.com/magic-software-lab.png","language":"TypeScript","readme":"# ngx-magic-table\n### Magic Software\n\nEasy to use table for Angular(4.x.x), it's magic!!\n\n\n\n![Its Magic](http://www.reactiongifs.com/r/mgc.gif)\n\n### Warning\n\nThis library is in alpha testing, there are some issues to fix and new features will be implemented.\n\n[![Angular 2 Style Guide](https://mgechev.github.io/angular2-style-guide/images/badge.svg)](https://github.com/mgechev/angular2-style-guide)\n[![Build Status](https://travis-ci.org/magic-software-lab/ngx-magic-table.svg?branch=master)](https://travis-ci.org/magic-software-lab/ngx-magic-table)\n[![codecov](https://codecov.io/gh/magic-software-lab/ngx-magic-table/branch/master/graph/badge.svg)](https://codecov.io/gh/magic-software-lab/ngx-magic-table)\n[![Greenkeeper badge](https://badges.greenkeeper.io/magic-software-lab/ngx-magic-table.svg)](https://greenkeeper.io/)\n\n[![dependencies](https://david-dm.org/magic-software-lab/ngx-magic-table.svg)](https://codecov.io/gh/magic-software-lab/ngx-magic-table)\n[![devDependencies Status](https://david-dm.org/magic-software-lab/ngx-magic-table/dev-status.svg)](https://david-dm.org/magic-software-lab/ngx-magic-table?type=dev)\n[![peerDependencies Status](https://david-dm.org/magic-software-lab/ngx-magic-table/peer-status.svg)](https://david-dm.org/magic-software-lab/ngx-magic-table?type=peer)\n\n## Live Demo\n\nLive demo is available [HERE](https://magic-software-lab.github.io/ngx-magic-table/).\n\n## Installation\n\n### Dependencies\n\n- [ngx-bootstrap](https://github.com/valor-software/ngx-bootstrap).\n\n```bash\n$ npm install ngx-bootstrap --save \n```\n\nYou will need bootstrap styles (Bootstrap 3)\n\n```\n\u003c!-- index.html --\u003e\n\u003clink href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\" rel=\"stylesheet\"\u003e\n```\n\nOr Bootstrap 4\n\n```\n\u003c!--- index.html --\u003eo\n\u003clink href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css\" rel=\"stylesheet\"\u003e\n```\nTo enable bootstrap 4 theme templates in ngx-bootstrap, please read\n[here](https://github.com/valor-software/ngx-bootstrap/blob/development/docs/getting-started/bootstrap4.md).\n\nMore info in ngx-bootstrap repository.\n\n### Lib\n\nTo install this library, run:\n\n```bash\n$ npm install @magic-software/ngx-magic-table --save\n```\n\n## Using\n\nIn your Angular `AppModule`:\n\n```typescript\nimport { BrowserModule } from '@angular/platform-browser';\nimport { NgModule } from '@angular/core';\n\nimport { AppComponent } from './app.component';\n\n// Imports\nimport { BsDropdownModule, PaginationModule } from 'ngx-bootstrap';\nimport { NgxMagicTableModule } from '@magic-software/ngx-magic-table';\n\n@NgModule({\n  declarations: [\n    AppComponent\n  ],\n  imports: [\n    BrowserModule,\n\t\n\t// Dependencies\n\tBsDropdownModule.forRoot(),\n\tPaginationModule.forRoot(),\n    \n    // Module\n    NgxMagicTableModule\n  ],\n  providers: [],\n  bootstrap: [AppComponent]\n})\nexport class AppModule { }\n```\n\nOnce is imported, you can use its components in your Angular application:\n\n* HTML Template:\n\n```xml\n...\n\n\u003cngx-magic-table [columns]=\"columns\" [data]=\"data\" [tableOptions]=\"tableOptions\"\u003e \u003c/ngx-magic-table\u003e\n\n...\n```\n\n* Component (TS):\n\n```javascript\nimport { Component } from '@angular/core';\n\n@Component({\n  selector: 'app-root',\n  templateUrl: './app.component.html',\n  styleUrls: ['./app.component.css']\n})\nexport class AppComponent {\n\n  public columns: Array\u003cany\u003e;\n  public data: Array\u003cany\u003e;\n  public tableOptions: {\n\n  };\n\n  constructor() {\n    this.prepareMagic();\n  }\n\n  private prepareMagic() {\n  \t  this.columns = [\n\t      {\n\t        field: 'id',\n\t        title: 'ID'\n\t      },\n\t      {\n\t        field: 'description',\n\t        title: 'Description',\n\t        sort: 'asc'\n\t      },\n\t      {\n\t        field: 'createdAt',\n\t        title: 'Created at',\n\t        format: 'dd/MM/yyyy HH:mm',\n\t        sort: 'desc'\n\t      },\n\t      {\n\t        field: 'amount',\n\t        title: 'Amount',\n\t        format: {\n\t          digits: '1.2-2'\n\t        }\n\t      },\n\t      {\n\t        field: 'price',\n\t        title: 'Price',\n\t        format: {\n\t          currencyCode: 'BRL',\n\t          symbolDisplay: true,\n\t          digits: '1.2-2'\n\t        }\n\t      },\n\t      {\n\t        title: 'Simple',\n\t        actions: {\n\t          type: 'simple',\n\t          buttons: [\n\t            {\n\t              title: 'Edit',\n\t              styleClass: 'btn btn-primary',\n\t              styleIcon: 'fa fa-pencil',\n\t              action: 'edit'\n\t            }\n\t          ]\n\t        }\n\t      }\n      ];\n      \n      this.data = [\n\t      {\n\t        id: 1,\n\t        description: 'Potato',\n\t        createdAt: new Date('2011-10-10T14:47:00'),\n\t        amount: 10,\n\t        price: 4.20\n\t      },\n\t      {\n\t        id: 2,\n\t        description: 'Pineapple apple pen',\n\t        createdAt: new Date(),\n\t        amount: 150,\n\t        price: 4.50\n\t      }\n      ];\n      \n      this.tableOptions = {\n\t      pagination: {\n\t        page: 1,\n\t        itemsPerPage: 5,\n\t        maxSize: 5,\n\t        numPages: 1\n\t      },\n\t      api: {\n\t        edit: this.onEdit\n\t      }\n\t    };\n\t }\n\t \n\t private onEdit(data: any) {\n\t    console.log('Editing:', data);\n\t }\n\n}\n```\n\n## Utilisation - API\n\nDo you want to know more? Check the docs for API [here](https://github.com/magic-software-lab/ngx-magic-table/blob/master/docs/getting-started/API.MD).\n\n## Development\n\nImplementing the [Angular Package Format v4.0](https://docs.google.com/document/d/1CZC2rcpxffTDfRDs6p1cfbmKNLA6x5O-NtkJglDaBVs/edit#heading=h.k0mh3o8u5hx).\n\nCommon tasks are present as npm scripts:\n\n- `npm start` to run a live-reload server with the demo app\n- `npm run test` to test in watch mode, or `npm run test:once` to only run once\n- `npm run build` to build the library\n- `npm run lint` to lint \n- `npm run clean` to clean\n- `npm run integration` to run the integration e2e tests\n- `npm install ./relative/path/to/lib` after `npm run build` to test locally in another app\n\n## Roadmap\n\nDo you want to know our feature roadmap? Check [here](https://github.com/magic-software-lab/ngx-magic-table/blob/master/ROADMAP.MD).\n\n\n## License\n\nMIT © [Eron Rodrigues Alves](mailto:eronra@gmail.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagic-software-lab%2Fngx-magic-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagic-software-lab%2Fngx-magic-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagic-software-lab%2Fngx-magic-table/lists"}