Angular: Empty Fiddle

http://angularjs.org/

by ahonaker

HTML

<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
<body>
<div ng-controller="MyCtrl">Selected: {{itemselected}}
    <navtree items="organizations.children" select-function="selectFunctionRoot()"></navtree>
</div>
</body>

JavaScript

var app = angular.module('myApp', []);

//myApp.directive('myDirective', function() {});
//myApp.factory('myService', function() {});

function MyCtrl($scope) {
    $scope.itemselected = "None";
    $scope.organizations = {
        "_id": "SEC Power Generation",
            "Entity": "OPUNITS",
            "EntityIDAttribute": "OPUNIT_SEQ_ID",
            "EntityID": 2,
            "descendants": ["Eastern Conf Business Unit", "Western Conf Business Unit", "Atlanta", "Sewanee"],
        children: [{
            "_id": "Eastern Conf Business Unit",
                "Entity": "",
                "EntityIDAttribute": "",
                "EntityID": null,
                "parent": "SEC Power Generation",
                "descendants": ["Lexington", "Columbia", "Knoxville", "Nashville"],
            children: [{
                "_id": "Lexington",
                    "Entity": "OPUNITS",
                    "EntityIDAttribute": "OPUNIT_SEQ_ID",
                    "EntityID": 10,
                    "parent": "Eastern Conf Business Unit"
            }, {
                "_id": "Columbia",
                    "Entity": "OPUNITS",
                    "EntityIDAttribute": "OPUNIT_SEQ_ID",
                    "EntityID": 12,
                    "parent": "Eastern Conf Business Unit"
            }, {
                "_id": "Knoxville",
                    "Entity": "OPUNITS",
                    "EntityIDAttribute": "OPUNIT_SEQ_ID",
                    "EntityID": 14,
                    "parent": "Eastern Conf Business Unit"
            }, {
                "_id": "Nashville",
                    "Entity": "OPUNITS",
                    "EntityIDAttribute": "OPUNIT_SEQ_ID",
                    "EntityID": 4,
                    "parent": "Eastern Conf Business Unit"
            }]
        }, {
            "_id": "Western Conf Business Unit",
                "Entity": "",
                "EntityIDAttribute": "",
                "EntityID": null,
                "parent":...