npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@magic-software/ngx-magic-table

v0.1.16

Published

Easy to use table for Angular(4.x.x), it's magic!!

Downloads

63

Readme

ngx-magic-table

Magic Software

Easy to use table for Angular(4.x.x), it's magic!!

Its Magic

Warning

This library is in alpha testing, there are some issues to fix and new features will be implemented.

Angular 2 Style Guide Build Status codecov Greenkeeper badge

dependencies devDependencies Status peerDependencies Status

Live Demo

Live demo is available HERE.

Installation

Dependencies

$ npm install ngx-bootstrap --save 

You will need bootstrap styles (Bootstrap 3)

<!-- index.html -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

Or Bootstrap 4

<!--- index.html -->o
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" rel="stylesheet">

To enable bootstrap 4 theme templates in ngx-bootstrap, please read here.

More info in ngx-bootstrap repository.

Lib

To install this library, run:

$ npm install @magic-software/ngx-magic-table --save

Using

In your Angular AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

// Imports
import { BsDropdownModule, PaginationModule } from 'ngx-bootstrap';
import { NgxMagicTableModule } from '@magic-software/ngx-magic-table';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
	
	// Dependencies
	BsDropdownModule.forRoot(),
	PaginationModule.forRoot(),
    
    // Module
    NgxMagicTableModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Once is imported, you can use its components in your Angular application:

  • HTML Template:
...

<ngx-magic-table [columns]="columns" [data]="data" [tableOptions]="tableOptions"> </ngx-magic-table>

...
  • Component (TS):
import { Component } from '@angular/core';

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

  public columns: Array<any>;
  public data: Array<any>;
  public tableOptions: {

  };

  constructor() {
    this.prepareMagic();
  }

  private prepareMagic() {
  	  this.columns = [
	      {
	        field: 'id',
	        title: 'ID'
	      },
	      {
	        field: 'description',
	        title: 'Description',
	        sort: 'asc'
	      },
	      {
	        field: 'createdAt',
	        title: 'Created at',
	        format: 'dd/MM/yyyy HH:mm',
	        sort: 'desc'
	      },
	      {
	        field: 'amount',
	        title: 'Amount',
	        format: {
	          digits: '1.2-2'
	        }
	      },
	      {
	        field: 'price',
	        title: 'Price',
	        format: {
	          currencyCode: 'BRL',
	          symbolDisplay: true,
	          digits: '1.2-2'
	        }
	      },
	      {
	        title: 'Simple',
	        actions: {
	          type: 'simple',
	          buttons: [
	            {
	              title: 'Edit',
	              styleClass: 'btn btn-primary',
	              styleIcon: 'fa fa-pencil',
	              action: 'edit'
	            }
	          ]
	        }
	      }
      ];
      
      this.data = [
	      {
	        id: 1,
	        description: 'Potato',
	        createdAt: new Date('2011-10-10T14:47:00'),
	        amount: 10,
	        price: 4.20
	      },
	      {
	        id: 2,
	        description: 'Pineapple apple pen',
	        createdAt: new Date(),
	        amount: 150,
	        price: 4.50
	      }
      ];
      
      this.tableOptions = {
	      pagination: {
	        page: 1,
	        itemsPerPage: 5,
	        maxSize: 5,
	        numPages: 1
	      },
	      api: {
	        edit: this.onEdit
	      }
	    };
	 }
	 
	 private onEdit(data: any) {
	    console.log('Editing:', data);
	 }

}

Utilisation - API

Do you want to know more? Check the docs for API here.

Development

Implementing the Angular Package Format v4.0.

Common tasks are present as npm scripts:

  • npm start to run a live-reload server with the demo app
  • npm run test to test in watch mode, or npm run test:once to only run once
  • npm run build to build the library
  • npm run lint to lint
  • npm run clean to clean
  • npm run integration to run the integration e2e tests
  • npm install ./relative/path/to/lib after npm run build to test locally in another app

Roadmap

Do you want to know our feature roadmap? Check here.

License

MIT © Eron Rodrigues Alves