# ng-st-table

> Generic table for angular projects

Latest version **0.0.4** (published 2024-06-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install ng-st-table
pnpm add ng-st-table
yarn add ng-st-table
bun add ng-st-table
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2024-06-15 |
| First published | 2022-06-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 43.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Saar T |
| Maintainers | saar25 |
| Keywords | angular, javascript, typescript, table, generic-table, angular-table |

## Links

- npm: https://www.npmjs.com/package/ng-st-table
- Repository: https://github.com/Saar25/NgStTable
- Issues: https://github.com/Saar25/NgStTable/issues
- npm.io page: https://npm.io/package/ng-st-table

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.3.0

## 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.0.4 (latest) — 2024-06-15
- 0.0.2 — 2022-06-03
- 0.0.1 — 2022-06-03

## README

# StTableLibrary

Generic table for angular projects

## How to use

Inside the component, initialize the elements and the columns of the table

```typescript
    public readonly elements: StTableElement[] = [...Array(100)].map(a => ({
        a: "Hello A",
        b: "World B",
        c: ":)) C",
    }));

    public readonly columns: StTableColumn[] = [
        {
            slot: 'A',
            title: 'First column',
        },
        {
            slot: 'B',
            title: 'Second column',
            width: 2
        },
        {
            slot: 'C',
            title: 'Third column',
        },
    ];
```

In the html, define how to display each of the slots
```html
    <st-table [columns]="columns" [elements]="elements">
        <ng-template stTableCell="A" let-element>
            <span>A is {{element.a}}</span>
        </ng-template>
        <ng-template stTableCell="B" let-element>
            <span>B is {{element.b}}</span>
        </ng-template>
        <ng-template stTableCell="C" let-element>
            <span>C is {{element.c}}</span>
        </ng-template>
    </st-table>
```

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