GithubHelp home page GithubHelp logo

aeraphe / aero-table-component-angular2 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 20 KB

A Table grid component for angular 2 with subcomponent: Aero Pagination, Aero OnOff Swittch, Aero Filter . All css is Bootstrap

TypeScript 100.00%

aero-table-component-angular2's Introduction

aero-table-component-angular2

A Table grid component for angular 2 with subcomponent:

Aero Pagination, Aero OnOff Swittch, Aero Filter .

All css is from Bootstrap

This is a Table Grid for Angular 2.

The Table grid can use or not the above subcomponents:

Aero Pagination Aero OnOff Swittch Aero Filter Aero Button (New 21/6/2016)

All the css is from Bootstrap.

0 - How to use:

/* *First import the Files Above */ import {AeroTableComponent} from '../aero-table/aero-table.component'; import {IAeroTableDataColumn,IAeroTableActions,IAeroTableDataRow} from '../aero-table/aero-table.interface.component';

@Component({

selector:'speed-list-users', /* *Insert in the template the tag above / template: '<aero-table (aeroEvent)="aeroGetClickEvent($event)" [aeroColumns]="columns" [aeroRows]="tableData">', / *Set the directive */ directives: [AeroTableComponent]

})

1 - Define the variable on your component that will import the Aero Table Component.

/**

  • The rows data / @Output() tableData:Array=[]; /*
  • The columns data configuration */ @Output() public columns:Array=[];

2 - On the ngInti set the columns:

ngOnInit(){

this.columns=[ { id:1, //column id cssClass:" ", //css class name:"Nome", sort:true

    }

]

}

3 - Create a method on your component for prepar the data for table rows (this.dataTable):

export interface IAeroTableDataRow {

    row: { id: number };
    cell: [{
            id?: number,
            value?: any,
            cssClass?: string,
            component?: string, //Not Required 
            componentState?: boolean //Not Required 
    }];

}

Aero Button Component

This component can be use in Aero Table. The Aero Button use ngSwitch to select glyphicon icon

On Cell Array of Objecs just define the below properties:

{id:1,value:'',cssClass:'',component:"aero-button",componentOptions:'edit'}

The componentOptions: Define the type of the button

aero-table-component-angular2's People

Contributors

aeraphe avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.