How to associate a tree structure with an accordion using angular. The tree structure is similar to the parent and child. How to get it? I can link the complete list.
angular code:
$scope.groups = [ { ID: 1, Name: "parent", ParentID:0 }, { ID: 2, Name: "child", ParentID: 1 }, { ID: 3, Name: "subchild1", ParentID: 2 }, { ID: 4, Name: "subchild2", ParentID: 2 } ];
View: I tried to connect the tree with the accordion, but I donβt get
<uib-accordion close-others="oneAtATime"> <div uib-accordion-group class="panel-default" ng-repeat="grp in groups" is-open="status.open"> <uib-accordion-heading> {{grp.Name}} <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.open, 'glyphicon-chevron-right': !status.open}"></i> </uib-accordion-heading> {{grp.Name}} </div> </uib-accordion>
are there any options to bind the tree in another way either using the accordion but using angular
source share