All Projects → hjalmers → Angular Generic Table

hjalmers / Angular Generic Table

Licence: mit
A generic table for Angular 2+. Generic table uses standard markup for tables ie. table, tr and td elements etc. and has support for expanding rows, global search, filters, sorting, pagination, export to CSV, column clicks, custom column rendering, custom export values.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Angular Generic Table

Paper Kit 2 Angular
Free Bootstrap 4 UI Kit for Angular 2+
Stars: ✭ 133 (+33%)
Mutual labels:  angular2, bootstrap4, responsive, angular4
Ngx Datatable
✨ A feature-rich yet lightweight data-table crafted for Angular
Stars: ✭ 4,415 (+4315%)
Mutual labels:  grid, table, angular2, angular4
Coreui Free Bootstrap Admin Template
CoreUI is free bootstrap admin template
Stars: ✭ 11,038 (+10938%)
Mutual labels:  angular2, bootstrap4, angular4
Coreui Free Angular Admin Template
CoreUI Angular is free Angular 2+ admin template based on Bootstrap 4
Stars: ✭ 1,279 (+1179%)
Mutual labels:  angular2, bootstrap4, angular4
Ng2 Smart Table
Angular Smart Data Table component
Stars: ✭ 1,590 (+1490%)
Mutual labels:  table, angular2, angular4
Paperadmin
A flat admin dashboard using Angular JS 2/4
Stars: ✭ 80 (-20%)
Mutual labels:  angular2, responsive, angular4
ngx-widget-grid
Angular 2.x or in general ng-x module for dashboards
Stars: ✭ 65 (-35%)
Mutual labels:  grid, angular2, angular4
Ngx Admin
Customizable admin dashboard template based on Angular 10+
Stars: ✭ 23,286 (+23186%)
Mutual labels:  angular2, bootstrap4, responsive
ng-toggle
Bootstrap-styled Angular Toggle Component
Stars: ✭ 14 (-86%)
Mutual labels:  angular2, bootstrap4, angular4
use-table-tools
React Hooks for building kickass react table components
Stars: ✭ 18 (-82%)
Mutual labels:  grid, responsive, table
Angular Material App
基于最新Angular 9框架与Material 2技术的web中后台前端应用框架。
Stars: ✭ 509 (+409%)
Mutual labels:  angular2, bootstrap4, angular4
Angular2 Carousel
An lightweight , touchable and responsive library to create a carousel for angular 2 / 4 / 5
Stars: ✭ 26 (-74%)
Mutual labels:  angular2, responsive, angular4
Ngx Lazy Load Images
Image lazy load library for Angular 2+
Stars: ✭ 77 (-23%)
Mutual labels:  angular2, angular4
Ngx Jsonapi
JSON API client library for Angular 5+ 👌 :: Production Ready 🚀
Stars: ✭ 81 (-19%)
Mutual labels:  angular2, angular4
Ngx Papaparse
Papa Parse wrapper for Angular
Stars: ✭ 83 (-17%)
Mutual labels:  angular2, angular4
Easygrid
EasyGrid - VanillaJS Responsive Grid
Stars: ✭ 77 (-23%)
Mutual labels:  grid, responsive
Angular Websocket
↖️ The missing Angular WebSocket module for connecting client applications to servers by @AngularClass
Stars: ✭ 1,242 (+1142%)
Mutual labels:  angular2, angular4
Angular4 Primeng Admin
angular4-primeng-admin @angular/cli开发的后台模板
Stars: ✭ 99 (-1%)
Mutual labels:  angular2, angular4
Angular Seed
Angular Seed App with Angular 5.0, ngrx/store 4, bootstrap 4, ngrx/effects, immutable.js
Stars: ✭ 87 (-13%)
Mutual labels:  angular2, bootstrap4
Angular2
Angular 2 Seed
Stars: ✭ 75 (-25%)
Mutual labels:  angular2, angular4

angular-generic-table

Build Status code style: prettier Cypress.io Dashboard

A generic table for Angular 2+. This project is a re-write of this project for AngularJS, the idea is to have support for the same features and that the configuration should be the same. Generic table uses standard markup for tables ie. table, tr and td elements etc. and has support for expanding rows, search, filters, sorting, pagination, export to CSV, column clicks, custom column rendering, custom export values. View demo

Features

  • Uses standard HTML tables (no divs etc.)
  • Markup uses Twitter bootstrap class names
  • Client and server-side pagination, sorting and filtering
  • Lazy-loading of data from server
  • Expanding rows with custom component
  • Use custom functions for sorting, exporting and rendering of data
  • Configure table using json object (add columns etc.)
  • Toggle column visibility
  • Export to CSV

Installation and usage

Run npm install @angular-generic-table/core --save

Include generic table module in your project, for example if you want to add it to your app module:

App Module

import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { GenericTableModule } from '@angular-generic-table/core';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    GenericTableModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Configure the table in your component, in this case we're adding a basic example with static data to a component called StaticComponent.

Static Component

import { Component } from '@angular/core';
import { GtConfig } from '@angular-generic-table/core';

@Component({
  selector: 'app-static',
  templateUrl: './static.component.html'
})
export class StaticComponent {

  public configObject: GtConfig<any>;

  public data:Array<{
    id:number,
    name:string,
    lucky_number:number
  }> = [];

  constructor() {

    this.configObject = {
      settings:[{
        objectKey:'id',
        sort:'desc',
        columnOrder:0
      },{
        objectKey:'name',
        sort:'enable',
        columnOrder:1
      },{
        objectKey:'lucky_number',
        sort:'enable',
        columnOrder:2
      }],
      fields:[{
        name:'Id',
        objectKey:'id'
      },{
        name:'Name',
        objectKey:'name'
      },{
        name:'Lucky number',
        objectKey:'lucky_number'
      }],
      data:[{
        "id": 1,
        "name": "Anna",
        "lucky_number": 63
      }, {
        "id": 2,
        "name": "Julie",
        "lucky_number": 8
      }, {
        "id": 3,
        "name": "Lillian",
        "lucky_number": 30
      }, {
        "id": 4,
        "name": "Norma",
        "lucky_number": 13
      }, {
        "id": 5,
        "name": "Ralph",
        "lucky_number": 28
      }, {
        "id": 6,
        "name": "Benjamin",
        "lucky_number": 66
      }, {
        "id": 7,
        "name": "George",
        "lucky_number": 66
      }, {
        "id": 8,
        "name": "Ryan",
        "lucky_number": 65
      }, {
        "id": 9,
        "name": "Martha",
        "lucky_number": 57
      }, {
        "id": 10,
        "name": "Todd",
        "lucky_number": 65
      }]
    };
  }
}

Usage

<generic-table [gtSettings]="configObject.settings" [gtFields]="configObject.fields" [gtData]="configObject.data"></generic-table>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].