AlexSuleap / angular-tree-widget

Angularjs tree control, which does not require jquery.
http://AlexSuleap.github.io
MIT License
34 stars 13 forks source link

Agular Tree Widget

Light AngularJS tree widget control, without jQuery dependency.

ScreenShot

Features

Demo

Watch the tree in action on the demo page.

Installation

Download the project.

Load the style and the script in your project:

<script type="text/javascript" src="https://github.com/AlexSuleap/angular-tree-widget/raw/master/angular-tree-widget.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://github.com/AlexSuleap/angular-tree-widget/blob/master/angular-tree-widget.min.css">

Add a dependency to your application module.

angular.module('myApp', ['TreeWidget']);

Add data for the tree

$scope.treeNodes =[{
    name: "Node 1",
        children: [{
            name: "Node 1.1",
            children:[
                {name:"Node 1.1.1"},
                {name: "Node 1.1.2"}]
        }]
    },{
        name: "Node 2",
        children: [
            {name: "Node 2.1"},
            {name: "Node 2.2"}
        ]
    }];

Add the tree tag to your application.

<tree nodes='treeNodes'>

Do not forget to add AngularJS, AngularJS.Animate and Angular Recursion references to your project.

Usage

License

The MIT License.

Copyright ⓒ 2016 Alex Suleap

See LICENSE