0.9.9 • Published 2 years ago

angular-table-component v0.9.9

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

AngularTableComponent

Angular Component to display data in tabular form. (Example : https://stackblitz.com/edit/angular-khyxjb?file=src/app/app.component.html) alt text

Installing and Importing

  • npm install angular-table-component
  • In app.module.ts (importing component) : import {AngularTableComponent } from 'angular-table-component'
  • In app.module.ts (declaring component) : imports: [ AngularTableComponent ] `

Usage

  • <AngularTableComponent [maxHeight]='maxHeight' [rows]='ROWS' [columns]='COLS'> </AngularTableComponent>

Inputs

NameDatatypeExampleRequired
rowsarray'Rank', 'Name', 'City'Yes
columnsarray of array['#1','Indian Institute of Science (IISc)', 'Bangalore','#3','Banaras Hindu University', 'Varanasi']Yes
maxHeightstring'400px'No (by default 500px)

Example - https://stackblitz.com/edit/angular-khyxjb?file=src/app/app.component.html

  • app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppComponent } from './app.component';
import { TableComponent } from './table/table.component';
import { AngularTableComponent } from 'angular-table-component'
@NgModule({
  declarations: [ AppComponent ],
  imports: [BrowserModule, AngularTableComponent],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
  • app.component.ts
import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})

export class AppComponent {
  COLS = ['Rank', 'Name', 'City'];
  ROWS = [
    ['#1','Indian Institute of Science (IISc)',  'Bangalore'],
    ['#2','Jawaharlal Nehru University', 'New Delhi'],
    ['#3','Banaras Hindu University',  'Varanasi'],
    ['#4','Calcutta University', 'Kolkata'],
    ['#5','Amrita Vishwa Vidyapeetham', 'Coimbatore'],
 
  ];
}
  • app.component.html
<AngularTableComponent [rows]='ROWS' [columns]='COLS' > </AngularTableComponent>
0.8.9

2 years ago

0.7.9

2 years ago

0.9.9

2 years ago

0.4.9

2 years ago

0.3.9

2 years ago

0.6.9

2 years ago

0.5.9

2 years ago

0.2.9

2 years ago

0.1.9

2 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.3

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.6

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago