• Stars
    star
    1,624
  • Rank 27,637 (Top 0.6 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 7 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Angular Smart Data Table component

Build Status

Angular Smart Table Component

ng2-smart-table component made with ❀️ by Akveo team. Follow us on Twitter to get latest news about this component first!

⚠ Low Maintenance

Due to project priority and resource constraints, this project is currently on low maintenance. We recognize that there are a lot of activities around this package. However, we are unable to accommodate the maintenance this project requires.

Demo

Live Demo

alt tag

Installation

The library is available as npm package, so all you need to do is to run the following command:

npm install --save ng2-smart-table

This command will create a record in your package.json file and install the package into the npm modules folder.

Minimal Setup Example

First thing you need to do is to import the ng2-smart-table directives into your component.


import { Ng2SmartTableModule } from 'ng2-smart-table';

Then register it by adding to the list of directives of your module:

// ...

@NgModule({
  imports: [
    // ...
    
    Ng2SmartTableModule,
    
    // ...
  ],
  declarations: [ ... ]
})
// ...

Now, we need to configure the table and add it into the template. The only required setting for the component to start working is a columns configuration. Let's register settings property inside of the component where we want to have the table and configure some columns Settings documentation:

settings = {
  columns: {
    id: {
      title: 'ID'
    },
    name: {
      title: 'Full Name'
    },
    username: {
      title: 'User Name'
    },
    email: {
      title: 'Email'
    }
  }
};

Finally let's put the ng2-smart-table component inside of the template:

// ...

@Component({
  template: `
    <ng2-smart-table [settings]="settings"></ng2-smart-table>
  `
})
// ...

At this step you will have a minimal configured table. All functions are available by default and you don't need to configure them anyhow, so now you can add/edit/delete rows, sort or filter the table, etc.

Still it seems like something is missing... Right, there is no data in the table by default. To add some, let's create an array property with a list of objects in the component. Please note that object keys are the same as in the columns configuration.

data = [
  {
    id: 1,
    name: "Leanne Graham",
    username: "Bret",
    email: "[email protected]"
  },
  {
    id: 2,
    name: "Ervin Howell",
    username: "Antonette",
    email: "[email protected]"
  },
  
  // ... list of items
  
  {
    id: 11,
    name: "Nicholas DuBuque",
    username: "Nicholas.Stanton",
    email: "[email protected]"
  }
];

And pass the data to the table:

// ...

@Component({
  template: `
    <ng2-smart-table [settings]="settings" [source]="data"></ng2-smart-table>
  `
})
// ...

Now you have some data in the table.

Further Documentation

Installation, customization and other useful articles: https://akveo.github.io/ng2-smart-table/

UI Bakery

Try low-code internal tool builder for free

How can I support developers?

  • Star our GitHub repo ⭐
  • Create pull requests, submit bugs, suggest new features or documentation updates πŸ”§
  • Follow us on Twitter 🐾
  • Like our page on Facebook πŸ‘

Can I hire you guys?

Yes! Visit our homepage or simply leave us a note to [email protected]. We will be happy to work with you!

Features

  • Local data source (Server/API DataSource is on its way)
  • Filtering
  • Sorting
  • Pagination
  • Inline Add/Edit/Delete
  • Flexible event model

License

MIT license.

Special thanks to our awesome contributors!

nnixaalexzhukovdamnkoTibingEzeonDeilanhosweystacyakveoAkshaymisal5geneeblackvvandoorneananthhhbis-sbtadashi-aikawa

nurehavlupu10zhouhao27hkb1990liaosongktriek

From akveo

Enjoy 🀘 We're always happy to hear your feedback!

More Repositories

1

ngx-admin

Customizable admin dashboard template based on Angular 10+
TypeScript
24,955
star
2

blur-admin

AngularJS Bootstrap Admin Panel Framework
JavaScript
11,355
star
3

react-native-ui-kitten

πŸ’₯ React Native UI Library based on Eva Design System 🌚✨Dark Mode
TypeScript
10,075
star
4

eva-icons

A pack of more than 480 beautifully crafted Open Source icons. SVG, Sketch, Web Font and Animations support.
TypeScript
8,560
star
5

nebular

πŸ’₯ Customizable Angular UI Library based on Eva Design System 🌚✨Dark Mode
TypeScript
7,986
star
6

kittenTricks

React Native starter kit with over 40 screens and modern Light and Dark theme for creating stunning cross-platform mobile applications.
TypeScript
7,078
star
7

react-native-reddit-reader

react native
JavaScript
359
star
8

polymer-admin

Polymer admin dashboard
HTML
296
star
9

angular-progress-button-styles

AngularJS version of codrops progress buttons for the use with promises
CSS
216
star
10

react-native-ui-kitten-demo-app

React Native UI-Kitten demo app
JavaScript
211
star
11

react-native-eva-icons

⭐Eva Icons for React Native
TypeScript
202
star
12

ngx-admin-dotnet-starter

TypeScript
179
star
13

chernika-mobile

Tinder-like app in Ionic framework
JavaScript
150
star
14

ngx-admin-bundle-support

Support repository for ngx-admin backend bundles with issues tracking, instructions and code samples
TypeScript
58
star
15

digitsquare

Angular and Cordova / Phonegap powered hybrid mobile application (puzzle game)
C#
44
star
16

chernika-server

Node.js backend for chernika-mobile
JavaScript
33
star
17

akveo-react-native-boilerplate

JavaScript
27
star
18

nebular-seed

Angular + Nebular ❀️ seed project
TypeScript
19
star
19

doc-prsr

Simple parser to normalize typdoc and doc.js output
TypeScript
14
star
20

meetup-samples

TypeScript
13
star
21

cordova-vk

cordova/phonegap adapter for vksdk
Java
8
star
22

nebular-todo

Nebular TODO application showcase
TypeScript
6
star
23

styleguide

JavaScript
5
star
24

akveo-banner

TypeScript
4
star
25

akveo.github.io

HTML
4
star
26

nebular-icons

Nebular icons (deprecated - use Eva Icons instead - https://akveo.github.io/eva-icons/)
CSS
3
star
27

dotnet-starter-bundle

1
star