You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-8
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,18 @@
1
-
#Angular Data Grid
1
+
##Angular Data Grid
2
2
3
3
Light and flexible Data Grid for AngularJS, with built-in sorting, pagination and filtering options, unified API for client-side and server-side data fetching,
4
4
seamless synchronization with browser address bar and total freedom in choosing mark-up and styling suitable for your application.
5
5
6
-
### Features
6
+
Samples: http://angular-data-grid.github.io/
7
7
8
-
- Does not have any hard-coded template so you can choose any mark-up you need, from basic ```html <table>``` layout to any ```html <div>``` structure.
8
+
### Features
9
+
10
+
- Does not have any hard-coded template so you can choose any mark-up you need, from basic ```javascript <table>``` layout to any ```javascript <div>``` structure.
9
11
- Easily switch between the most popular Bootstrap and Google Material theming, or apply your own CSS theme just by changing several CSS classes.
10
12
- Built-in sync with browser address bar (URL), so you copy-n-paste sorting/filtering/pagination results URL and open it in other browser / send to anyone - even if pagination / filtering are done on a client-side.
11
13
- Unlike most part of other Angular DataGrids, we intentionally use non-isolated scope of the directive, so it can be easily synchronized with any data changes inside your controller. !With great power comes great responsibility, so be careful to use non-isolated API correctly.
12
14
13
-
## Setup
15
+
###Setup
14
16
15
17
1. Include scripts in you application: dataGrid.min.js and pagination.min.js (include the second one only if you need pagination), like:
You can use the sortable directive to have a built in sort feature. You add the attribute sortable to your table headers. This will specify the property name you want to sort by. Also if you add class sortable to your element, sort arrows will be displayed for acs/decs sort directions.
53
55
54
56
You can use Data Grid module to easily display data in grids with built-in sorting, outer filters and url-synchronization. To use it, you must add grid-data directive to element and pass 2 required parameters ```grid-options``` and ```grid-actions```.
@@ -59,11 +61,11 @@ You can use Data Grid module to easily display data in grids with built-in sort
59
61
60
62
Inside the ```grid-data``` directive you can use grid-pagination directive. It's just wrapper of angular-ui pagination directive. You can pass any parameters from pagination directive. Also you can use grid-item-per-page directive and pass into it array of value (f.e. "10, 25, 50"). If you need get size of current displayed items you can use filtered variable.
61
63
62
-
##Filters:
64
+
### Filters
63
65
Data Grid module has 4 types built in filters. To use it, you must add attribute filter-by to any element and pass property name, which you want filtering. Also you need add attribute filter-type with type of filter (text, select, dateFrom, dateTo). After that you need call filter() method in ng-change for text or select inputs and in ng-blur/ng-focus for datepickers. Filters synchronize with URL by ng-model value.
64
66
65
-
##Custom Filters:
67
+
### Custom Filters
66
68
If you need use some custom filters (f.e. filter by first letter), you must add filter-by to specify property name, which you want filtering and add ng-model property. Then create in gridOptions.customFilters variable named as it ng-model value and contain filtering function. Filtering function accept items, value, predicate arguments and must return filtered array.
67
69
68
-
##Others:
70
+
### Others
69
71
All filters has parameter disable-url. If you set it as true value - URL-synchronization for this filter will be disabled. If you need use 2 or more grids on page, you must add id to grids, and use grid-id attribute on filters to specify their grid.
0 commit comments