Top Related Projects
UI Grid: an Angular Data Grid
The best JavaScript Data Table for building Enterprise Applications. Supports React / Angular / Vue / Plain JavaScript.
JavaScript data grid with a spreadsheet look & feel. Works with React, Angular, and Vue. Supported by the Handsontable team ⚡
A lightning fast JavaScript grid/spreadsheet
An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation, Vue.js)
Quick Overview
Smart-Table is a lightweight, flexible, and customizable table/grid component for AngularJS applications. It provides features like sorting, filtering, and pagination out of the box, while allowing developers to extend its functionality through custom directives and configurations.
Pros
- Easy integration with AngularJS applications
- Highly customizable with a wide range of configuration options
- Supports server-side operations for large datasets
- Lightweight and performant
Cons
- Limited to AngularJS, not compatible with newer Angular versions
- Documentation could be more comprehensive
- Some advanced features may require additional custom development
- Not actively maintained (last commit was in 2017)
Code Examples
- Basic table setup:
<table st-table="displayedCollection" st-safe-src="rowCollection">
<thead>
<tr>
<th st-sort="firstName">First name</th>
<th st-sort="lastName">Last name</th>
<th st-sort="birthDate">Birth date</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in displayedCollection">
<td>{{row.firstName}}</td>
<td>{{row.lastName}}</td>
<td>{{row.birthDate | date}}</td>
</tr>
</tbody>
</table>
- Adding global search:
<input type="text" st-search="" class="form-control" placeholder="global search ..." />
- Implementing pagination:
<tr>
<td colspan="5" class="text-center">
<div st-pagination="" st-items-by-page="itemsPerPage" st-displayed-pages="7"></div>
</td>
</tr>
Getting Started
-
Install Smart-Table using npm or bower:
npm install angular-smart-table
or
bower install angular-smart-table
-
Include the Smart-Table script in your HTML:
<script src="path/to/smart-table.min.js"></script>
-
Add the
smart-table
module to your Angular app dependencies:angular.module('myApp', ['smart-table']);
-
Use Smart-Table directives in your HTML templates as shown in the code examples above.
Competitor Comparisons
UI Grid: an Angular Data Grid
Pros of ui-grid
- More feature-rich with advanced functionalities like grouping, tree view, and custom cell templates
- Better performance for large datasets due to virtual scrolling
- More active development and community support
Cons of ui-grid
- Steeper learning curve due to its complexity
- Heavier and may impact page load times
- Requires more configuration for basic use cases
Code Comparison
Smart-Table basic usage:
<table st-table="displayedCollection" st-safe-src="rowCollection">
<thead>
<tr>
<th st-sort="firstName">First name</th>
<th st-sort="lastName">Last name</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in displayedCollection">
<td>{{row.firstName}}</td>
<td>{{row.lastName}}</td>
</tr>
</tbody>
</table>
ui-grid basic usage:
<div ui-grid="gridOptions" class="grid"></div>
$scope.gridOptions = {
enableSorting: true,
columnDefs: [
{ field: 'firstName' },
{ field: 'lastName' }
],
data: myData
};
Smart-Table is more straightforward for simple use cases, while ui-grid requires more JavaScript configuration but offers greater flexibility and features.
The best JavaScript Data Table for building Enterprise Applications. Supports React / Angular / Vue / Plain JavaScript.
Pros of ag-grid
- More feature-rich with advanced functionalities like pivoting, grouping, and aggregation
- Better performance for handling large datasets
- Extensive documentation and community support
Cons of ag-grid
- Steeper learning curve due to its complexity
- Larger bundle size, which may impact initial load times
- Some advanced features require a paid enterprise license
Code Comparison
Smart-Table:
<table st-table="displayedCollection" st-safe-src="rowCollection">
<thead>
<tr>
<th st-sort="firstName">First name</th>
<th st-sort="lastName">Last name</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in displayedCollection">
<td>{{row.firstName | uppercase}}</td>
<td>{{row.lastName}}</td>
</tr>
</tbody>
</table>
ag-grid:
<ag-grid-angular
style="width: 500px; height: 500px;"
class="ag-theme-alpine"
[rowData]="rowData"
[columnDefs]="columnDefs">
</ag-grid-angular>
Smart-Table is simpler to set up and use, especially for basic table needs. It integrates well with AngularJS and provides essential sorting and filtering capabilities. ag-grid offers more advanced features and better performance for complex use cases, but comes with a steeper learning curve and potentially higher costs for enterprise features.
JavaScript data grid with a spreadsheet look & feel. Works with React, Angular, and Vue. Supported by the Handsontable team ⚡
Pros of Handsontable
- More feature-rich with advanced functionalities like cell merging, filtering, and custom cell types
- Better performance for large datasets due to virtual rendering
- Extensive documentation and active community support
Cons of Handsontable
- Larger file size and potentially higher memory usage
- Steeper learning curve due to more complex API
- Commercial license required for some features
Code Comparison
Smart-Table:
<table st-table="displayedCollection" st-safe-src="rowCollection">
<thead>
<tr>
<th st-sort="firstName">First name</th>
<th st-sort="lastName">Last name</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in displayedCollection">
<td>{{row.firstName}}</td>
<td>{{row.lastName}}</td>
</tr>
</tbody>
</table>
Handsontable:
const container = document.getElementById('example');
const hot = new Handsontable(container, {
data: [
['', 'Ford', 'Volvo', 'Toyota', 'Honda'],
['2016', 10, 11, 12, 13],
['2017', 20, 11, 14, 13],
['2018', 30, 15, 12, 13]
],
rowHeaders: true,
colHeaders: true,
filters: true,
dropdownMenu: true
});
A lightning fast JavaScript grid/spreadsheet
Pros of SlickGrid
- More feature-rich and powerful, with advanced functionalities like frozen columns and rows
- Better performance for handling large datasets (100,000+ rows)
- More customizable with a wider range of plugins and extensions
Cons of SlickGrid
- Steeper learning curve due to its complexity
- Less modern and more challenging to integrate with current frontend frameworks
- Requires more setup and configuration compared to Smart-Table
Code Comparison
Smart-Table basic usage:
<table st-table="displayedCollection" st-safe-src="rowCollection">
<thead>
<tr>
<th st-sort="firstName">First name</th>
<th st-sort="lastName">Last name</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in displayedCollection">
<td>{{row.firstName | uppercase}}</td>
<td>{{row.lastName | uppercase}}</td>
</tr>
</tbody>
</table>
SlickGrid basic usage:
var grid;
var columns = [
{ id: "title", name: "Title", field: "title" },
{ id: "duration", name: "Duration", field: "duration" }
];
var options = {
enableCellNavigation: true,
enableColumnReorder: false
};
grid = new Slick.Grid("#myGrid", data, columns, options);
An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation, Vue.js)
Pros of bootstrap-table
- More extensive feature set, including pagination, sorting, and filtering out of the box
- Better documentation and examples, making it easier for developers to implement
- Larger community and more frequent updates, ensuring better long-term support
Cons of bootstrap-table
- Heavier footprint, which may impact page load times for smaller projects
- Steeper learning curve due to the abundance of features and options
- Less flexibility for custom styling compared to Smart-Table's minimalist approach
Code Comparison
Smart-Table:
<table st-table="displayedCollection" st-safe-src="rowCollection">
<thead>
<tr>
<th st-sort="firstName">First name</th>
<th st-sort="lastName">Last name</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in displayedCollection">
<td>{{row.firstName | uppercase}}</td>
<td>{{row.lastName}}</td>
</tr>
</tbody>
</table>
bootstrap-table:
<table data-toggle="table" data-url="data1.json">
<thead>
<tr>
<th data-field="id">ID</th>
<th data-field="name">Item Name</th>
<th data-field="price">Item Price</th>
</tr>
</thead>
</table>
Both libraries offer easy-to-use table implementations, but bootstrap-table provides more built-in features with less custom JavaScript required. Smart-Table focuses on simplicity and integration with AngularJS, while bootstrap-table offers a more comprehensive solution for various frameworks and use cases.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Hey I am not too much into angular these days. If someone wants to maintain this project, please contact me !
Smart Table
Smart Table is a table module for angular js. It allows you to quickly compose your table in a declarative way including sorting, filtering, row selection, and pagination. It is lightweight (around 3kb minified) and has no other dependencies than Angular itself. Check the documentation website for more details
Submitting an issue
Please be responsible -- investigate potential issues yourself to eliminate the possibility that your issue isn't just an error. If you are still having problems, try posting on our gitter. When submitting an issue try as much as possible to:
-
Search in the already existing issues or on stackoverflow if your issue has not been raised before.
-
Give a precise description mentionning angular version, smart-table version.
-
Give a way to reproduce your issue, the best would be with a running example, you can use plunkr (smart-table is the list of available packages). Note if you want to mimic ajax loading behaviour you can use $timeout angular service or $httpBackend.
-
Isolate your code sample on the probable issue to avoid pollution and noise.
-
Close your issue when a solution has been found (and share it with the community).
Note that 80% of the open issues are actually not issues but due to lack of good investigation. These issues create unnecessary work, so please be considerate.
Any open issue which do not follow the steps above will be closed without investigation.
Install
The easiest way is to run bower install angular-smart-table
, then you just have to add the script and register the module smart-table
to you application.
You can also install using NPM npm install angular-smart-table
, so you can use with browserify or webpack
Test
Run npm install
after you have installed the dependencies (npm install
and bower install
).
Custom builds
Smart Table is based around a main directive which generate a top level controller whose API can be accessed by sub directives
(plugins). If you don't need some of these, simply edit the gulpfile (the pluginList variable) and run gulp build
.
Older versions
Smart Table used to be configuration based and if you rely on this version, you can still access the code on the 0.2.x branch. You will be able to find the documentation related to this version here (simply open index.html in a browser).
Note, I have closed all the issues related to these versions as people get confused when reading these issues and commented on them like it was related to the newer version. Feel free to reopen any of them (or open a new one), but don't forget to mention it is related to the older versions.
License
Smart Table module is under MIT license:
Copyright (C) 2016 Laurent Renard.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Top Related Projects
UI Grid: an Angular Data Grid
The best JavaScript Data Table for building Enterprise Applications. Supports React / Angular / Vue / Plain JavaScript.
JavaScript data grid with a spreadsheet look & feel. Works with React, Angular, and Vue. Supported by the Handsontable team ⚡
A lightning fast JavaScript grid/spreadsheet
An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation, Vue.js)
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot