Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

angular2-datatable

> 编程语言
Open source

DataTable - Simple table component with sorting and pagination for Angular2

199 stars0 likes2 views
WebsiteGitHub

About

DataTable - Simple table component with sorting and pagination for Angular2

Table component with sorting and pagination for Angular2

Demo

Check live demo in plunker

Installation

bash
npm i -S angular2-datatable

Usage example

AppModule.ts

typescript
import {NgModule} from "@angular/core";
...
import {DataTableModule} from "angular2-datatable";

@NgModule({
    imports: [
        ...
        DataTableModule
    ],
    ...
})
export class AppModule {

}

AppComponent.html

xml

    
    

        
            Name
        
        
            Email
        
        
            Age
        
        
            City
        
    

    
    
    

        {{item.name}}
        {{item.email}}
        {{item.age}}
        {{item.city | uppercase}}
    

    
    
    

        
            
        
    

    

API

mfData directive

  • selector: table[mfData]
  • exportAs: mfDataTable
  • inputs
    • mfData: any[] - array of data to display in table
    • mfRowsOnPage: number - number of rows should be displayed on page (default: 1000)
    • mfActivePage: number - page number (default: 1)
    • mfSortBy: any - sort by parameter
    • mfSortOrder: string - sort order parameter, "asc" or "desc"
  • outputs
    • mfSortByChange: any - sort by parameter
    • mfSortOrderChange: any - sort order parameter

mfDefaultSorter component

  • selector: mfDefaultSorter
  • inputs
    • by: any - specify how to sort data (argument for lodash function _.sortBy )

mfBootstrapPaginator component

Displays buttons for changing current page and number of displayed rows using bootstrap template (css for bootstrap is required). If array length is smaller than current displayed rows on page then it doesn't show button for changing page. If array length is smaller than min value rowsOnPage then it doesn't show any buttons.

  • selector: mfBootstrapPaginator
  • inputs
    • rowsOnPageSet: number - specify values for buttons to change number of diplayed rows

Issues· 93 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言