You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

j-ng2-table

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

j-ng2-table

"j-ng2-table is an open source table library designed for angular 2 that supports a lot of features such as pinning, toggleing, sorting, filtering"

0.0.14
latest
Source
npmnpm
Version published
Weekly downloads
14
180%
Maintainers
1
Weekly downloads
 
Created
Source

j-ng2-table

j-ng2-table is an open source table library designed for angular 2 that supports a lot of features such as pinning, toggleing, sorting, filtering, paging ... etc

##NPM Install: npm install j-ng2-table

##Importing: important: please import font awesome

app.module.ts

import { AppComponent } from './app.component';
import { JNG2TableComponent } from 'j-ng2-table/j-ng2-table.component';
@NgModule({
  declarations: [
    AppComponent,
    JNG2TableComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

your-component.component.html

<j-ng2-table [data]="data" [options]="options"></j-ng2-table>
    

your-component.component.ts

import { Component, OnInit } from '@angular/core';
@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
  options = {
    itemsPerPage : 10
  };
  data = [    
    {"name":"Ram", "email":"ram@gmail.com", "age":23},    
    {"name":"Shyam", "email":"shyam23@gmail.com", "age":28},  
    {"name":"John", "email":"john@gmail.com", "age":33},    
    {"name":"Bob", "email":"bob32@gmail.com", "age":41}
  ];
}

###Options: itemsPerPage: Number of rows per page

Keywords

ng2

FAQs

Package last updated on 01 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts