Skip to content

minor chagest #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 14, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update README.md
  • Loading branch information
khan4019 committed Jun 14, 2014
commit 128febed384c9203b1c21aa2fcd18d7f1d08c1f9
42 changes: 40 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ angular-bootstrap-grid-tree

A grid that has tree structure rows. using angular, bootstrap

#### Check it out [http://khan4019.github.io/angular-bootstrap-grid-tree/test/abgTree.html](http://khan4019.github.io/angular-bootstrap-grid-tree/test/abgTree.html)
#### Demo:: [http://khan4019.github.io/angular-bootstrap-grid-tree/test/abgTree.html](http://khan4019.github.io/angular-bootstrap-grid-tree/test/abgTree.html)

##### Mininum to start
Include abgTree.css and abg-tree-directive.js
Expand Down Expand Up @@ -38,6 +38,44 @@ In you html add the following
{Name:"Texas",Area:268581,Population:26448193,TimeZone:"Mountain"}
];

**col_defs:** is an array of objects that allows you to customized column header. if displayName is not provided, field is used as display Name.

$scope.col_defs = [
{ field: "Description"},
{ field: "DemographicId", displayName: "Demographic Id"},
{ field: "ParentId", displayName: "Parent Id"},
{ field: "Area"},
{ field: "Population"},
{ field: "TimeZone", displayName: "Time Zone"}
];

**style and concept** inspired by [abn teee](https://github.com/nickperkinslondon/angular-bootstrap-nav-tree)
**expand_property:** this is the property of the objects in 'tree_data' where you want to put the ability to expand and collapse.

### More Options

<abg-tree
tree-data = "my_treedata"
col-Defs = "col_defs"
expand-on = "expand_on"
tree-control = "my_tree"
icon-leaf = "icon-file"
icon-expand = "icon-plus-sign"
icon-collapse = "icon-minus-sign"
on-select = "my_tree_handler(branch)"
expand-level = "2">
</abg-tree>


**tree-control:** you can use 'tree-control' to use expand all and collapse all. check it out in the link provided for demo

**icon:** define Font Awesome, bootstrap glyphicon for expand, collapse and leaf

**expand-level:** depth of the tree, you want to expand while loading

**on-select:** a click handler while you are clicking on +/-

$scope.my_tree_handler = function(branch){
console.log('you clicked on', branch)
}

####disclaimer: **style and concept** inspired by [abn teee](https://github.com/nickperkinslondon/angular-bootstrap-nav-tree)