angular.treeview

AngularJS based Treeview (no jQuery)
15 people use it
Author: Assets.github.com%2fimages%2fgravatars%2fgravatar-user-420 eu81273

Angular Treeview

Pure AngularJS based tree menu directive.

ScreenShot

Installation

Copy the script and css into your project and add a script and link tag to your page.

Add a dependency to your application module.

Add a tree to your application. See Usage.

Usage

Attributes of angular treeview are below.

  • angular-treeview: the treeview directive
  • tree-model : the tree model on $scope.
  • node-id : each node's id
  • node-label : each node's label
  • node-children: each node's children

Here is a simple example.

Example model:

Selection

If tree node is selected, then that selected tree node is saved to $scope.currentNode. By using $watch, the controller can recognize the tree selection.

jsFiddle

ScreenShot

jsFiddle - http://jsfiddle.net/eu81273/8LWUc/18/

Browser Compatibility

Same with AngularJS. Safari, Chrome, Firefox, Opera, IE8, IE9 and mobile browsers (Android, Chrome Mobile, iOS Safari).

License

The MIT License.

Copyright ⓒ 2013 AHN JAE-HA.

See LICENSE

comments powered by Disqus
This page was last updated 12 months ago.