# ng2-easy-table

> Angular2 simple beautifull table

Latest version **0.1.18** (published 2016-06-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install ng2-easy-table
pnpm add ng2-easy-table
yarn add ng2-easy-table
bun add ng2-easy-table
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.18 |
| Published | 2016-06-24 |
| First published | 2016-03-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.4.0 |
| Dependencies | 13 |
| Known vulnerabilities | 0 (+23 in 4 direct dependencies) |
| Install scripts | yes |
| GitHub stars | 378 |
| Author | Sebastian Superczynski |
| Maintainers | ssuperczynski |
| Keywords | angular2, ng2, table, angular table, angular2 table, angular 2 table, angular2-table, ng2-easy-table |

## Links

- npm: https://www.npmjs.com/package/ng2-easy-table
- Repository: https://github.com/ssuperczynski/ng2-easy-table
- Homepage: https://github.com/ssuperczynski/ng2-table
- Issues: https://github.com/ssuperczynski/ng2-table/issues
- npm.io page: https://npm.io/package/ng2-easy-table

## Dependencies (13)

- [rxjs](https://npm.io/package/rxjs.md) 5.0.0-beta.6
- [zone.js](https://npm.io/package/zone.js.md) ^0.6.12
- [es6-shim](https://npm.io/package/es6-shim.md) ^0.35.0
- [systemjs](https://npm.io/package/systemjs.md) 0.19.27
- [node-sass](https://npm.io/package/node-sass.md) ^3.4.2
- [es6-promise](https://npm.io/package/es6-promise.md) ^3.0.2
- [@angular/core](https://npm.io/package/@angular/core.md) ^2.0.0-rc.3
- [@angular/http](https://npm.io/package/@angular/http.md) ^2.0.0-rc.3
- [@angular/common](https://npm.io/package/@angular/common.md) ^2.0.0-rc.3
- [reflect-metadata](https://npm.io/package/reflect-metadata.md) 0.1.3
- [@angular/compiler](https://npm.io/package/@angular/compiler.md) ^2.0.0-rc.3
- [@angular/platform-browser](https://npm.io/package/@angular/platform-browser.md) ^2.0.0-rc.3
- [@angular/platform-browser-dynamic](https://npm.io/package/@angular/platform-browser-dynamic.md) ^2.0.0-rc.3

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 0.1.18 (latest) — 2016-06-24
- 0.1.17 — 2016-05-31
- 0.1.16 — 2016-05-17
- 0.1.15 — 2016-05-06
- 0.1.14 — 2016-05-06
- 0.1.13 — 2016-05-05
- 0.1.12 — 2016-05-05
- 0.1.11 — 2016-04-29
- 0.1.10 — 2016-04-28
- 0.1.9 — 2016-04-27
- 0.1.8 — 2016-04-27
- 0.1.7 — 2016-04-15
- 0.1.6 — 2016-04-15
- 0.1.5 — 2016-04-14
- 0.1.4 — 2016-04-13
- … 32 more at https://npm.io/package/ng2-easy-table/versions

## README

![Imgur](http://i.imgur.com/gwjpUqe.png "logo")


[![npm version](https://badge.fury.io/js/ng2-easy-table.svg)](https://badge.fury.io/js/ng2-easy-table)
[![Build Status](https://travis-ci.org/ssuperczynski/ng2-easy-table.svg?branch=master)](https://travis-ci.org/ssuperczynski/ng2-easy-table)

Proudly powered by [![Imgur](http://i.imgur.com/qbbb6ah.png)](http://espeo.eu/)

Beta version. Component may contains some issues, but feel free to add it to your page!

<h3><a href="http://angular2-table.espeo.pl/" target="_blank">DEMO</a></h3>

This table always will be easy to add to every page.

#Installation

`npm install ng2-easy-table`
### app.component.ts

```typescript
///<reference path="./../typings/browser/ambient/es6-shim/index.d.ts"/>
import {Component}     from '@angular/core';
import {bootstrap}     from '@angular/platform-browser-dynamic';
import {AppComponent}  from 'ng2-easy-table/app/app.component';
import {ConfigService} from "./config-service";

@Component({
  selector: 'app',
  directives: [AppComponent],
  providers: [ConfigService],
  template: `
    <ng2-table [configuration]="configuration"></ng2-table>
  `
})
export class App {
  constructor(private configuration:ConfigService) {}
}

bootstrap(App, [ConfigService]);
```

### config-service.ts:

```typescript
import {Injectable} from "@angular/core";
@Injectable()
export class ConfigService {
  public searchEnabled = false;
  public orderEnabled = true;
  public globalSearchEnabled = false;
  public footerEnabled = false;
  public paginationEnabled = false;
  public exportEnabled = false;
  public editEnabled = false;
  public resourceUrl = "app/data.json";
  public rows = 10;
}
```
![table](http://i.imgur.com/yqlYtVR.png "table")

###Available config settings:

| field               |      type      |  options   | example                                     |
|---------------------|:--------------:|:----------:|---------------------------------------------|
| searchEnabled       | bool           | true false | public searchEnabled = true;                |
| exportEnabled       | bool           | true false | public exportEnabled = true;                |
| orderEnabled        | bool           | true false | public orderEnabled = true;                 |
| paginationEnabled   | bool           | true false | public paginationEnabled = true;            |
| globalSearchEnabled | bool           | true false | public globalSearchEnabled = true;          |
| resourceUrl         | string         |            | public resourceUrl = "api/v1/persons.json"; |
| rows                | int            |            | public rows = 10;                           |


If you have problem displaying table, check `systemsj.config.js` configuration

```js
(function(global) {

  // map tells the System loader where to look for things
  var map = {
    'app':                        'app', // 'dist',
    'rxjs':                       'node_modules/rxjs',
    'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api',
    '@angular':                   'node_modules/@angular',
    'ng2-easy-table':             'node_modules/ng2-easy-table/dist'
  };

  // packages tells the System loader how to load
  // when no filename and/or no extension
  var packages = {
    'app':                        { main: 'index.component.js',  defaultExtension: 'js' },
    'rxjs':                       { defaultExtension: 'js' },
    'angular2-in-memory-web-api': { defaultExtension: 'js' },
    'ng2-easy-table':             { format: 'register', defaultExtension: 'js' },
     dist:                        { format: 'register', defaultExtension: 'js' }
  };

  var packageNames = [
    '@angular/common',
    '@angular/compiler',
    '@angular/core',
    '@angular/http',
    '@angular/platform-browser',
    '@angular/platform-browser-dynamic',
    '@angular/router',
    '@angular/router-deprecated',
    '@angular/testing',
    '@angular/upgrade'
  ];

  // add package entries for angular packages in the form
  // '@angular/common': { main: 'index.js', defaultExtension: 'js' }
  packageNames.forEach(function(pkgName) {
    packages[pkgName] = { main: 'index.js', defaultExtension: 'js' };
  });

  var config = {
    map: map,
    packages: packages
  };

  // filterSystemConfig - index.html's chance
  // to modify config before we register it.
  if (global.filterSystemConfig) { global.filterSystemConfig(config); }

  System.config(config);

})(this);
```


run tests by typing:
`npm test`

---
_Source: https://npm.io/package/ng2-easy-table · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
