angular2-data-table
Version:
angular2-data-table is a Angular2 component for presenting large and complex data.
56 lines (46 loc) • 1.28 kB
Markdown
# Getting Started
After [Installing](installing.md), include `Angular2DataTableModule`
in your application module like:
```javascript
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { Angular2DataTableModule } from 'angular2-data-table';
import { AppComponent } from './app.component';
export class AppModule { }
```
then in your `app.component.ts` you define a table like:
```javascript
import { Component } from '@angular/core';
export class AppComponent {
rows = [
{ name: 'Austin', gender: 'Male', company: 'Swimlane' },
{ name: 'Dany', gender: 'Male', company: 'KFC' },
{ name: 'Molly', gender: 'Female', company: 'Burger King' },
];
columns = [
{ prop: 'name' },
{ name: 'Gender' },
{ name: 'Company' }
];
}
```
and your off to the races!
For more examples, visit the
[demos](https://github.com/swimlane/angular2-data-table/tree/master/demo) directory
in the source code!