wix-incubator / angular-tree-control

Angular JS Tree
http://wix.github.io/angular-tree-control
MIT License
708 stars 277 forks source link

Nested children #84

Open softengi opened 9 years ago

softengi commented 9 years ago

Can i somehow define the children from the second level JSON object? like -

function Children($scope) { $scope.treedata=[ {id:"id1", label: "Node 1", linkParent: {links: [ {id:"id1.1", label: "Node 1.1", linkParent: {links: {}}}, {id:"id1.2", label: "Node 1.1", links: {}} ]}}, {id:"id2", label: "Node 2", linkParent: {links: []}}, {id:"id3", label: "Node 3", linkParent: {links: []}}, {id:"id4", label: "Node 4", linkParent: {links: []}} ];

 $scope.opts = {
     nodeChildren: "linkParent.links"
 };

}

yoavaa commented 9 years ago

have you tried that? looking at the tree implementation this may just work...

softengi commented 9 years ago

Yup. Have tried that. Does not work. No children get listed at all.