<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<div class="container" ng-app="myApp" ng-controller="myCtrl">
<h1>Angular Recursive Tree</h1>
<h3>Basic and Simple Tree without "css styling"</h3>
<p>It is a example based on web references. | <strong>Required Level: Angularjs basic / intermedio</strong></p>
<div class="alert alert-danger">
<strong>If you don't see the tree, please: <button onClick="location.reload();">Reload</button></strong>
</div>
<script type="text/ng-template" id="tree_item.html">
<div>
<button ng-click="toggleChildren(data)">
<span ng-bind="data.name"></span>
<span class="icon-plus" ng-class="data.iconDisplay"></span>
</button>
</div>
<div id="expanded-data" ng-if="data.childrenVisible">
<div id="nested-rowchild">
<div ng-repeat="data in data.nodes" ng-include="'tree_item.html'"></div>
</div>
</div>
</script>