Tuesday, July 2, 2013

Angular treeview directive 0.1v

Hi,

UPDATE: The latest plugin is in this blog.

In continuation to my previous blog here, I am releasing new version of the treeview directive.

You can download the plugin from this link.

This version supports searching and has place for checking nodes.

For searching you have to bind a model which has search text in the current scope to the attribute search-model of treeview directive, as shown below.

<input type="text" width="50px" ng-model="searchText" placeholder="Search products"/>
<treeview style="width: 300px;" search-model="searchText" treeview-data="productData" unique-id="id" display-attr="Name">
</treeview>

The same model can be bound to some other control also, for example input text control. In this way when there's any update to the model the tree nodes will be sought and displayed.

Tri-state support, retrieving checked nodes, user template etc. will be following in next blog posts.

Happy Coding.