0.2.3 • Published 6 years ago

angu-tree-view v0.2.3

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

AnguTreeView

A tree view directive for AngularJS.

Install

npm

npm install angu-tree-view --save

Bower

bower install angu-tree-view --save

Features

  • Unlimited tree nodes
  • Checkbox supported
  • Support ngModel to get the list of nodes

Demo

Demo #1

Set is-init=true for over-writing the original treeNodes to ngModel, click Show to console ngModel

Demo #2

Set is-init=false for use the default ngModel, click Show to console ngModel

Demo #3

This sample use Font-awesome to display the Expansion/Collapse buttons on tree node

Description of attributes

AttributeDescriptionRequired
treeNodesTree nodes in jsonYes
ngModelFull list of nodes and selected statusNo
isEnableCheckedSet 'true' to enable(display) checkbox for every nodeNo
isInitSet 'true' to overwrite ngModel when directive initializedNo
plusCssCustom css class name for the Expand button imageNo
minusCssCustom css class name for the Collapse button imageNo

Usage

<angu-tree-view tree-nodes="treeNodes" ng-model="myMenus" is-enable-checked="true" is-init="true"></tree-view>

treeNodes example

$scope.treeNodes = [{"Id":1,"Title":"System","ParentId":null,"IsSelected":false,"Nodes":[{"Id":101,"Title":"Users","ParentId":1,"IsSelected":false,"Nodes":[]},{"Id":102,"Title":"Functions","ParentId":1,"IsSelected":false,"Nodes":[]}]}]

License

The AnguTreeView project is covered by the MIT License.

The MIT License (MIT)

Copyright (c) 2016 KarateJB, and contributors to the AnguTreeView project.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago