Skip to content

Commit fc1616a

Browse files
Zhuk, AlexanderZhuk, Alexander
Zhuk, Alexander
authored and
Zhuk, Alexander
committed
more docs updates
1 parent 76fb41b commit fc1616a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

Diff for: README.md

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
#Angular Data Grid
1+
##Angular Data Grid
22

33
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,
44
seamless synchronization with browser address bar and total freedom in choosing mark-up and styling suitable for your application.
55

6-
### Features
6+
Samples: http://angular-data-grid.github.io/
77

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.
911
- Easily switch between the most popular Bootstrap and Google Material theming, or apply your own CSS theme just by changing several CSS classes.
1012
- 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.
1113
- 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.
1214

13-
## Setup
15+
### Setup
1416

1517
1. Include scripts in you application: dataGrid.min.js and pagination.min.js (include the second one only if you need pagination), like:
1618

@@ -48,7 +50,7 @@ angular.module('myApp', ['dataGrid', 'pagination'])
4850
};
4951
```
5052
51-
## Sorting
53+
### Sorting
5254
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.
5355

5456
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
5961

6062
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.
6163

62-
##Filters:
64+
### Filters
6365
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.
6466

65-
##Custom Filters:
67+
### Custom Filters
6668
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.
6769

68-
##Others:
70+
### Others
6971
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

Comments
 (0)